wasmer/Makefile

46 lines
1.2 KiB
Makefile
Raw Normal View History

2018-11-20 20:32:23 -08:00
ifeq (test, $(firstword $(MAKECMDGOALS)))
runargs := $(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS))
$(eval $(runargs):;@true)
endif
.PHONY: spectests emtests clean build install lint precommit
2018-10-23 23:54:07 +02:00
# This will re-generate the Rust test files based on spectests/*.wast
spectests:
WASMER_RUNTIME_GENERATE_SPECTESTS=1 cargo build -p wasmer-runtime
2018-10-23 23:54:07 +02:00
2018-12-09 19:21:28 -08:00
emtests:
2019-01-10 21:46:02 -08:00
WASM_EMSCRIPTEN_GENERATE_EMTESTS=1 cargo build -p wasmer-emscripten
2018-12-09 19:21:28 -08:00
2018-10-23 23:54:07 +02:00
# clean:
2018-11-13 10:28:50 -08:00
# rm -rf artifacts
2018-10-23 23:54:07 +02:00
build:
cargo build
install:
cargo install --path .
lint:
cargo fmt --all -- --check
2019-01-10 23:18:40 -06:00
cargo clippy --all
precommit: lint test
2018-10-23 23:54:07 +02:00
test:
# We use one thread so the emscripten stdouts doesn't collide
2019-01-18 10:10:16 -08:00
# cargo test --all -- --test-threads=1 $(runargs)
# cargo test --all --exclude wasmer-emscripten -- --test-threads=1 $(runargs)
2019-01-18 10:10:16 -08:00
cargo test -p wasmer-runtime -- --test-threads=1 $(runargs)
2018-11-13 10:28:50 -08: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
2018-11-26 11:47:33 -08:00
debug-release:
cargo build --release --features "debug"
2018-11-13 10:28:50 -08:00
publish-release:
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./artifacts/