2018-11-21 04:32:23 +00:00
|
|
|
ifeq (test, $(firstword $(MAKECMDGOALS)))
|
|
|
|
runargs := $(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS))
|
|
|
|
$(eval $(runargs):;@true)
|
|
|
|
endif
|
|
|
|
|
2018-12-15 06:45:03 +00:00
|
|
|
.PHONY: spectests emtests clean build install lint precommit
|
2018-10-23 21:54:07 +00:00
|
|
|
|
|
|
|
# This will re-generate the Rust test files based on spectests/*.wast
|
|
|
|
spectests:
|
2019-01-22 19:02:06 +00:00
|
|
|
WASMER_RUNTIME_GENERATE_SPECTESTS=1 cargo build -p wasmer-runtime-core
|
2018-10-23 21:54:07 +00:00
|
|
|
|
2018-12-10 03:21:28 +00:00
|
|
|
emtests:
|
2019-01-11 05:46:02 +00:00
|
|
|
WASM_EMSCRIPTEN_GENERATE_EMTESTS=1 cargo build -p wasmer-emscripten
|
2018-12-10 03:21:28 +00:00
|
|
|
|
2018-10-23 21:54:07 +00:00
|
|
|
# clean:
|
2018-11-13 18:28:50 +00:00
|
|
|
# rm -rf artifacts
|
2018-10-23 21:54:07 +00:00
|
|
|
|
|
|
|
build:
|
2019-02-26 23:39:54 +00:00
|
|
|
cargo build --features debug
|
2018-10-23 21:54:07 +00:00
|
|
|
|
|
|
|
install:
|
|
|
|
cargo install --path .
|
|
|
|
|
2019-01-18 20:20:13 +00:00
|
|
|
integration-tests: release
|
|
|
|
echo "Running Integration Tests"
|
2019-02-09 01:47:51 +00:00
|
|
|
./integration_tests/lua/test.sh
|
2019-02-08 18:55:32 +00:00
|
|
|
./integration_tests/nginx/test.sh
|
2019-01-18 20:20:13 +00:00
|
|
|
|
2018-12-15 06:45:03 +00:00
|
|
|
lint:
|
2019-01-11 00:35:48 +00:00
|
|
|
cargo fmt --all -- --check
|
2019-03-12 18:04:52 +00:00
|
|
|
cargo clippy # --all
|
2018-12-15 06:45:03 +00:00
|
|
|
|
|
|
|
precommit: lint test
|
|
|
|
|
2018-10-23 21:54:07 +00:00
|
|
|
test:
|
2018-12-11 03:19:46 +00:00
|
|
|
# We use one thread so the emscripten stdouts doesn't collide
|
2019-03-06 20:44:19 +00:00
|
|
|
cargo test --all --exclude wasmer-runtime-c-api --exclude wasmer-emscripten --exclude wasmer-spectests -- $(runargs)
|
2019-01-18 18:11:14 +00:00
|
|
|
# cargo test --all --exclude wasmer-emscripten -- --test-threads=1 $(runargs)
|
2019-03-06 06:15:07 +00:00
|
|
|
cargo test --manifest-path lib/spectests/Cargo.toml --features clif
|
|
|
|
cargo test --manifest-path lib/spectests/Cargo.toml --features llvm
|
2019-02-03 19:21:59 +00:00
|
|
|
cargo build -p wasmer-runtime-c-api
|
2019-02-03 02:16:53 +00:00
|
|
|
cargo test -p wasmer-runtime-c-api -- --nocapture
|
2018-11-13 18:28:50 +00:00
|
|
|
|
2019-03-06 20:44:19 +00:00
|
|
|
test-emscripten:
|
2019-03-07 05:58:07 +00:00
|
|
|
cargo test --manifest-path lib/emscripten/Cargo.toml --features clif -- --test-threads=1 $(runargs)
|
|
|
|
cargo test --manifest-path lib/emscripten/Cargo.toml --features llvm -- --test-threads=1 $(runargs)
|
2019-03-12 19:01:55 +00:00
|
|
|
cargo test --manifest-path lib/emscripten/Cargo.toml _vfs --features clif,vfs -- --test-threads=1 $(runargs)
|
|
|
|
cargo test --manifest-path lib/emscripten/Cargo.toml _vfs --features llvm,vfs -- --test-threads=1 $(runargs)
|
2019-03-06 20:44:19 +00:00
|
|
|
|
2018-11-13 18:28:50 +00:00
|
|
|
release:
|
|
|
|
# If you are in OS-X, you will need mingw-w64 for cross compiling to windows
|
|
|
|
# brew install mingw-w64
|
|
|
|
cargo build --release
|
|
|
|
|
2019-02-26 23:39:54 +00:00
|
|
|
debug-release:
|
|
|
|
cargo build --release --features debug
|
|
|
|
|
2018-11-26 19:47:33 +00:00
|
|
|
debug-release:
|
|
|
|
cargo build --release --features "debug"
|
|
|
|
|
2018-11-13 18:28:50 +00:00
|
|
|
publish-release:
|
|
|
|
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./artifacts/
|