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

View File

@ -2,83 +2,83 @@
# Generate files
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:
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:
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
# Spectests
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:
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:
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
# Emscripten tests
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:
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:
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
# Middleware tests
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:
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:
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
# Wasitests
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:
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:
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
# Backends
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
cargo +nightly test -p wasmer-clif-backend --release
cargo test -p wasmer-clif-backend --release
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
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:
@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
lint:
cargo +nightly fmt --all -- --check
cargo fmt --all -- --check
precommit: lint test
build:
cargo +nightly build --release --features debug
cargo build --release --features debug
install:
cargo +nightly install --release --path .
cargo install --release --path .
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)
release-fast:
# If you are in OS-X, you will need mingw-w64 for cross compiling to windows
# brew install mingw-w64
cargo +nightly build --release
cargo build --release
bench:
cargo +nightly bench --all
cargo bench --all
# 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.
Set Rust Nightly:
```
rustup default nightly
```
And install Wasmer
```sh
# checkout code
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:
```sh
rustup default nightly
make test
```

View File

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