Added test-stable to the mix

This commit is contained in:
Syrus 2019-07-05 18:57:30 -07:00
parent 03b0bdfbbe
commit 685ed53070
4 changed files with 92 additions and 51 deletions

View File

@ -36,12 +36,13 @@ jobs:
command: | command: |
git config --global --unset url."ssh://git@github.com".insteadOf || true git config --global --unset url."ssh://git@github.com".insteadOf || true
rustup toolchain install nightly-2019-05-20 rustup toolchain install nightly-2019-05-20
rustup component add rustfmt --toolchain=nightly-2019-05-20 rustup default nightly-2019-05-20
rustup component add clippy --toolchain=nightly-2019-05-20 || cargo +nightly-2019-05-20 install --git https://github.com/rust-lang/rust-clippy/ --force clippy rustup component add rustfmt
rustup component add clippy || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
- run: - run:
name: Execute lints name: Execute lints
command: | command: |
cargo +nightly-2019-05-20 fmt --all -- --check cargo fmt --all -- --check
- save_cache: - save_cache:
paths: paths:
- /usr/local/cargo/registry - /usr/local/cargo/registry
@ -50,7 +51,7 @@ jobs:
- target/debug/deps - target/debug/deps
key: v8-lint-{{ arch }}-{{ checksum "Cargo.lock" }} key: v8-lint-{{ arch }}-{{ checksum "Cargo.lock" }}
test: test-stable:
docker: docker:
- image: circleci/rust:latest - image: circleci/rust:latest
<<: *run_with_build_env_vars <<: *run_with_build_env_vars
@ -60,16 +61,15 @@ jobs:
keys: keys:
- v8-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }} - v8-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }}
- <<: *run_install_dependencies - <<: *run_install_dependencies
- run: rustup default nightly-2019-05-20
- run: - run:
name: Tests name: Tests
command: make test command: make test
- run:
name: Integration Tests
command: make integration-tests
- run: - run:
name: Release name: Release
command: make fast-release command: make fast-release
- run:
name: Integration Tests
command: make integration-tests
- save_cache: - save_cache:
paths: paths:
- /usr/local/cargo/registry - /usr/local/cargo/registry
@ -78,6 +78,38 @@ jobs:
- target/debug/deps - target/debug/deps
key: v8-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }} key: v8-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }}
test:
docker:
- image: circleci/rust:latest
<<: *run_with_build_env_vars
steps:
- checkout
- restore_cache:
keys:
- v8-test-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
- <<: *run_install_dependencies
- run: rustup default nightly-2019-05-20
- run:
name: Tests
command: make test
- run:
name: Debug flag checked
command: |
cargo check --features "debug" --release
- run:
name: Release
command: make fast-release
- run:
name: Integration Tests
command: make integration-tests
- save_cache:
paths:
- /usr/local/cargo/registry
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: v8-test-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
test-macos: test-macos:
macos: macos:
xcode: "9.0" xcode: "9.0"
@ -85,7 +117,7 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- v8-cargo-cache-darwin-stable-{{ arch }}-{{ checksum "Cargo.lock" }} - v8-cargo-cache-darwin-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
- run: - run:
name: Install crate dependencies name: Install crate dependencies
command: | command: |
@ -101,7 +133,7 @@ jobs:
command: | command: |
curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2019-05-20 curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2019-05-20
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH"
cargo +nightly --version cargo --version
- run: - run:
name: Tests name: Tests
command: | command: |
@ -112,6 +144,11 @@ jobs:
ulimit -n 8000 ulimit -n 8000
sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680 sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680
make test make test
- run:
name: Release
command: |
export PATH="$HOME/.cargo/bin:$PATH"
make fast-release
- run: - run:
name: Integration Tests name: Integration Tests
command: | command: |
@ -119,18 +156,13 @@ jobs:
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH" export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/" export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/"
make integration-tests make integration-tests
- run:
name: Release
command: |
export PATH="$HOME/.cargo/bin:$PATH"
make fast-release
- save_cache: - save_cache:
paths: paths:
- ~/.cargo/registry/ - ~/.cargo/registry/
- target/release/.fingerprint - target/release/.fingerprint
- target/release/build - target/release/build
- target/release/deps - target/release/deps
key: v8-cargo-cache-darwin-stable-{{ arch }}-{{ checksum "Cargo.lock" }} key: v8-cargo-cache-darwin-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
test-and-build: test-and-build:
docker: docker:
@ -152,10 +184,6 @@ jobs:
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
- run: rustup default nightly-2019-05-20 - run: rustup default nightly-2019-05-20
- run:
name: Debug flag checked
command: |
cargo +nightly check --features "debug" --release
- run: - run:
name: Tests name: Tests
command: | command: |
@ -166,7 +194,7 @@ jobs:
command: | command: |
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/" export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/"
make release make release
cargo +nightly build --release --manifest-path wapm-cli/Cargo.toml --features telemetry cargo build --release --manifest-path wapm-cli/Cargo.toml --features telemetry
mkdir -p artifacts mkdir -p artifacts
VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2) VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
# GIT_VERSION=$(git describe --exact-match --tags) # GIT_VERSION=$(git describe --exact-match --tags)
@ -177,7 +205,7 @@ jobs:
- run: - run:
name: Dynamic library name: Dynamic library
command: | command: |
cargo +nightly build --release --manifest-path lib/runtime-c-api/Cargo.toml cargo build --release --manifest-path lib/runtime-c-api/Cargo.toml
cp target/release/libwasmer_runtime_c_api.so ./artifacts cp target/release/libwasmer_runtime_c_api.so ./artifacts
- persist_to_workspace: - persist_to_workspace:
root: . root: .
@ -222,7 +250,7 @@ jobs:
command: | command: |
curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2019-05-20 curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly-2019-05-20
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH"
cargo +nightly --version cargo --version
- run: - run:
name: Tests name: Tests
command: | command: |
@ -241,7 +269,7 @@ jobs:
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH"
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/" export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/"
make release make release
cargo +nightly build --release --manifest-path wapm-cli/Cargo.toml --features telemetry cargo build --release --manifest-path wapm-cli/Cargo.toml --features telemetry
mkdir -p artifacts mkdir -p artifacts
make build-install make build-install
cp ./wasmer.tar.gz ./artifacts/$(./binary-name.sh) cp ./wasmer.tar.gz ./artifacts/$(./binary-name.sh)
@ -251,7 +279,7 @@ jobs:
name: Generate dynamic library for the runtime C API name: Generate dynamic library for the runtime C API
command: | command: |
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH"
cargo +nightly build --release --manifest-path lib/runtime-c-api/Cargo.toml cargo build --release --manifest-path lib/runtime-c-api/Cargo.toml
install_name_tool -id "@rpath/libwasmer_runtime_c_api.dylib" target/release/libwasmer_runtime_c_api.dylib install_name_tool -id "@rpath/libwasmer_runtime_c_api.dylib" target/release/libwasmer_runtime_c_api.dylib
cp target/release/libwasmer_runtime_c_api.dylib ./artifacts cp target/release/libwasmer_runtime_c_api.dylib ./artifacts
- persist_to_workspace: - persist_to_workspace:
@ -344,6 +372,12 @@ workflows:
only: only:
- trying - trying
- staging - staging
- test-stable:
filters:
branches:
only:
- trying
- staging
- publish-github-release: - publish-github-release:
requires: requires:
- lint - lint

View File

@ -2,83 +2,83 @@
# Generate files # Generate files
generate-spectests: generate-spectests:
WASMER_RUNTIME_GENERATE_SPECTESTS=1 cargo +nightly build -p wasmer-runtime-core --release WASMER_RUNTIME_GENERATE_SPECTESTS=1 cargo build -p wasmer-runtime-core --release
generate-emtests: generate-emtests:
WASM_EMSCRIPTEN_GENERATE_EMTESTS=1 cargo +nightly build -p wasmer-emscripten --release WASM_EMSCRIPTEN_GENERATE_EMTESTS=1 cargo build -p wasmer-emscripten --release
generate-wasitests: generate-wasitests:
WASM_WASI_GENERATE_WASITESTS=1 cargo +nightly build -p wasmer-wasi --release WASM_WASI_GENERATE_WASITESTS=1 cargo build -p wasmer-wasi --release
generate: generate-spectests generate-emtests generate-wasitests generate: generate-spectests generate-emtests generate-wasitests
# Spectests # Spectests
spectests-singlepass: spectests-singlepass:
cargo +nightly test --manifest-path lib/spectests/Cargo.toml --release --features singlepass cargo test --manifest-path lib/spectests/Cargo.toml --release --features singlepass
spectests-cranelift: spectests-cranelift:
cargo +nightly test --manifest-path lib/spectests/Cargo.toml --release --features clif cargo test --manifest-path lib/spectests/Cargo.toml --release --features clif
spectests-llvm: spectests-llvm:
cargo +nightly test --manifest-path lib/spectests/Cargo.toml --release --features llvm cargo test --manifest-path lib/spectests/Cargo.toml --release --features llvm
spectests: spectests-singlepass spectests-cranelift spectests-llvm spectests: spectests-singlepass spectests-cranelift spectests-llvm
# Emscripten tests # Emscripten tests
emtests-singlepass: emtests-singlepass:
cargo +nightly test --manifest-path lib/emscripten/Cargo.toml --release --features singlepass -- --test-threads=1 cargo test --manifest-path lib/emscripten/Cargo.toml --release --features singlepass -- --test-threads=1
emtests-cranelift: emtests-cranelift:
cargo +nightly test --manifest-path lib/emscripten/Cargo.toml --release --features clif -- --test-threads=1 cargo test --manifest-path lib/emscripten/Cargo.toml --release --features clif -- --test-threads=1
emtests-llvm: emtests-llvm:
cargo +nightly test --manifest-path lib/emscripten/Cargo.toml --release --features llvm -- --test-threads=1 cargo test --manifest-path lib/emscripten/Cargo.toml --release --features llvm -- --test-threads=1
emtests: emtests-singlepass emtests-cranelift emtests-llvm emtests: emtests-singlepass emtests-cranelift emtests-llvm
# Middleware tests # Middleware tests
middleware-singlepass: middleware-singlepass:
cargo +nightly test --manifest-path lib/middleware-common/Cargo.toml --release --features singlepass cargo test --manifest-path lib/middleware-common/Cargo.toml --release --features singlepass
middleware-cranelift: middleware-cranelift:
cargo +nightly test --manifest-path lib/middleware-common/Cargo.toml --release --features clif cargo test --manifest-path lib/middleware-common/Cargo.toml --release --features clif
middleware-llvm: middleware-llvm:
cargo +nightly test --manifest-path lib/middleware-common/Cargo.toml --release --features llvm cargo test --manifest-path lib/middleware-common/Cargo.toml --release --features llvm
middleware: middleware-singlepass middleware-cranelift middleware-llvm middleware: middleware-singlepass middleware-cranelift middleware-llvm
# Wasitests # Wasitests
wasitests-singlepass: wasitests-singlepass:
cargo +nightly test --manifest-path lib/wasi/Cargo.toml --release --features singlepass -- --test-threads=1 cargo test --manifest-path lib/wasi/Cargo.toml --release --features singlepass -- --test-threads=1
wasitests-cranelift: wasitests-cranelift:
cargo +nightly test --manifest-path lib/wasi/Cargo.toml --release --features clif -- --test-threads=1 cargo test --manifest-path lib/wasi/Cargo.toml --release --features clif -- --test-threads=1
wasitests-llvm: wasitests-llvm:
cargo +nightly test --manifest-path lib/wasi/Cargo.toml --release --features llvm -- --test-threads=1 cargo test --manifest-path lib/wasi/Cargo.toml --release --features llvm -- --test-threads=1
wasitests: wasitests-singlepass wasitests-cranelift wasitests-llvm wasitests: wasitests-singlepass wasitests-cranelift wasitests-llvm
# Backends # Backends
singlepass: spectests-singlepass emtests-singlepass middleware-singlepass wasitests-singlepass singlepass: spectests-singlepass emtests-singlepass middleware-singlepass wasitests-singlepass
cargo +nightly test -p wasmer-singlepass-backend --release cargo test -p wasmer-singlepass-backend --release
cranelift: spectests-cranelift emtests-cranelift middleware-cranelift wasitests-cranelift cranelift: spectests-cranelift emtests-cranelift middleware-cranelift wasitests-cranelift
cargo +nightly test -p wasmer-clif-backend --release cargo test -p wasmer-clif-backend --release
llvm: spectests-llvm emtests-llvm middleware-llvm wasitests-llvm llvm: spectests-llvm emtests-llvm middleware-llvm wasitests-llvm
cargo +nightly test -p wasmer-llvm-backend --release cargo test -p wasmer-llvm-backend --release
# All tests # All tests
test-rest: test-rest:
cargo +nightly test --release --all --exclude wasmer-emscripten --exclude wasmer-spectests --exclude wasmer-wasi --exclude wasmer-middleware-common --exclude wasmer-singlepass-backend --exclude wasmer-clif-backend --exclude wasmer-llvm-backend cargo test --release --all --exclude wasmer-emscripten --exclude wasmer-spectests --exclude wasmer-wasi --exclude wasmer-middleware-common --exclude wasmer-singlepass-backend --exclude wasmer-clif-backend --exclude wasmer-llvm-backend
circleci-clean: circleci-clean:
@if [ ! -z "${CIRCLE_JOB}" ]; then rm -f /home/circleci/project/target/debug/deps/libcranelift_wasm* && rm -f /Users/distiller/project/target/debug/deps/libcranelift_wasm*; fi; @if [ ! -z "${CIRCLE_JOB}" ]; then rm -f /home/circleci/project/target/debug/deps/libcranelift_wasm* && rm -f /Users/distiller/project/target/debug/deps/libcranelift_wasm*; fi;
@ -96,27 +96,27 @@ integration-tests: release
# Utils # Utils
lint: lint:
cargo +nightly fmt --all -- --check cargo fmt --all -- --check
precommit: lint test precommit: lint test
build: build:
cargo +nightly build --release --features debug cargo build --release --features debug
install: install:
cargo +nightly install --release --path . cargo install --release --path .
release: release:
cargo +nightly build --release --features backend:singlepass,backend:llvm,loader:kernel cargo build --release --features backend:singlepass,backend:llvm,loader:kernel
# Only one backend (cranelift) # Only one backend (cranelift)
release-fast: release-fast:
# If you are in OS-X, you will need mingw-w64 for cross compiling to windows # If you are in OS-X, you will need mingw-w64 for cross compiling to windows
# brew install mingw-w64 # brew install mingw-w64
cargo +nightly build --release cargo build --release
bench: bench:
cargo +nightly bench --all cargo bench --all
# Build utils # Build utils

View File

@ -153,6 +153,12 @@ nginx and Lua do not work on Windows. See [this issue](https://github.com/wasmer
Wasmer is built with [Cargo](https://crates.io/), the Rust package manager. Wasmer is built with [Cargo](https://crates.io/), the Rust package manager.
Set Rust Nightly:
```
rustup default nightly
```
And install Wasmer
```sh ```sh
# checkout code # checkout code
git clone https://github.com/wasmerio/wasmer.git git clone https://github.com/wasmerio/wasmer.git
@ -170,6 +176,7 @@ Thanks to [spec tests](https://github.com/wasmerio/wasmer/tree/master/lib/specte
You can run all the tests with: You can run all the tests with:
```sh ```sh
rustup default nightly
make test make test
``` ```

View File

@ -2,7 +2,7 @@ status = [
"ci/circleci: lint", "ci/circleci: lint",
"ci/circleci: test", "ci/circleci: test",
"ci/circleci: test-macos", "ci/circleci: test-macos",
"ci/circleci: test-rust-nightly", "ci/circleci: test-stable",
"continuous-integration/appveyor/branch" "continuous-integration/appveyor/branch"
] ]
required_approvals = 1 required_approvals = 1