Skip to content

Commit

Permalink
Merge #344
Browse files Browse the repository at this point in the history
344: Do the release on Rust nightly r=syrusakbary a=syrusakbary

Do the release on Rust nightly

Co-authored-by: Syrus <[email protected]>
Co-authored-by: Lachlan Sneff <[email protected]>
  • Loading branch information
3 people committed Apr 11, 2019
2 parents 1e59968 + a5fc32f commit 11b6a5d
Show file tree
Hide file tree
Showing 25 changed files with 198 additions and 108 deletions.
57 changes: 36 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
- checkout
- restore_cache:
keys:
- v6-lint-{{ arch }}-{{ checksum "Cargo.lock" }}
- v8-lint-{{ arch }}-{{ checksum "Cargo.lock" }}
- v8-lint-{{ arch }}
- <<: *run_install_dependencies
- run:
name: Install lint deps
Expand All @@ -40,7 +41,7 @@ jobs:
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v8-lint-{{ arch }}-{{ checksum "Cargo.lock" }}

test:
docker:
Expand All @@ -50,14 +51,17 @@ jobs:
- checkout
- restore_cache:
keys:
- v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
- v8-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }}
- v8-test-cargo-cache-linux-stable-{{ arch }}
- <<: *run_install_dependencies
- run:
name: Tests
command: make test
- run:
name: Emscripten Tests
command: make test-emscripten
command: |
make test-emscripten-clif
make test-emscripten-llvm
- run:
name: Integration Tests
command: make integration-tests
Expand All @@ -67,7 +71,7 @@ jobs:
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v8-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }}

test-macos:
macos:
Expand All @@ -76,7 +80,8 @@ jobs:
- checkout
- restore_cache:
keys:
- v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
- v8-cargo-cache-darwin-stable-{{ arch }}-{{ checksum "Cargo.lock" }}
- v8-cargo-cache-darwin-stable-{{ arch }}
- run:
name: Install crate dependencies
command: |
Expand Down Expand Up @@ -112,7 +117,8 @@ jobs:
# We increase the ulimit for fixing cargo unclosed files in mac
ulimit -n 8000
sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680
make test-emscripten
make test-emscripten-clif
make test-emscripten-llvm
- run:
name: Integration Tests
command: |
Expand All @@ -129,7 +135,7 @@ jobs:
- target/release/.fingerprint
- target/release/build
- target/release/deps
key: v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v8-cargo-cache-darwin-stable-{{ arch }}-{{ checksum "Cargo.lock" }}

test-and-build:
docker:
Expand All @@ -138,13 +144,16 @@ jobs:
- checkout
- restore_cache:
keys:
- v6-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
- v8-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
- v8-cargo-cache-linux-nightly-{{ arch }}
- run:
name: Install dependencies
command: |
sudo apt-get install -y cmake
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
# Use rust nightly (for singlepass, for now)
- run: rustup default nightly-2019-04-11
- run:
name: Tests
command: |
Expand All @@ -154,12 +163,13 @@ jobs:
name: Emscripten Tests
command: |
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/"
make test-emscripten
make test-emscripten-clif
make test-emscripten-llvm
- run:
name: Release Build
command: |
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/"
make release
make production-release
mkdir -p artifacts
VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
# GIT_VERSION=$(git describe --exact-match --tags)
Expand All @@ -183,7 +193,7 @@ jobs:
- target/release/.fingerprint
- target/release/build
- target/release/deps
key: v6-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v8-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}

test-and-build-macos:
macos:
Expand All @@ -192,7 +202,8 @@ jobs:
- checkout
- restore_cache:
keys:
- v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
- v8-cargo-cache-darwin-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
- v8-cargo-cache-darwin-nightly-{{ arch }}
- run:
name: Install crate dependencies
command: |
Expand All @@ -209,6 +220,8 @@ jobs:
curl https://sh.rustup.rs -sSf | sh -s -- -y
export PATH="$HOME/.cargo/bin:$PATH"
cargo --version
# Use rust nightly (for singlepass, for now)
- run: rustup default nightly-2019-04-11
- run:
name: Tests
command: |
Expand All @@ -228,14 +241,15 @@ jobs:
# We increase the ulimit for fixing cargo unclosed files in mac
ulimit -n 8000
sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680
make test-emscripten
make test-emscripten-clif
make test-emscripten-singlepass
- run:
name: Release Build
command: |
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/"
make release
make production-release
mkdir -p artifacts
# VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
# echo "${VERSION}" >> artifacts/version
Expand All @@ -253,7 +267,7 @@ jobs:
- target/release/.fingerprint
- target/release/build
- target/release/deps
key: v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v8-cargo-cache-darwin-nightly-{ arch }}-{{ checksum "Cargo.lock" }}

test-rust-nightly:
docker:
Expand All @@ -262,27 +276,28 @@ jobs:
- checkout
- restore_cache:
keys:
- v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly
- v8-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}
- v8-cargo-cache-linux-nightly-{{ arch }}
- run:
name: Install dependencies
command: |
sudo apt-get install -y cmake
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-02-27
- run: rustup default nightly-2019-04-11
- run: |
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/"
make test
make test-nightly
make test-singlepass
make test-emscripten-clif
make test-emscripten-nightly
make test-emscripten-singlepass
- save_cache:
paths:
- /usr/local/cargo/registry
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly
key: v8-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly

publish-github-release:
docker:
Expand Down
41 changes: 21 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ structopt = "0.2.11"
wabt = "0.7.2"
hashbrown = "0.1.8"
wasmer-clif-backend = { path = "lib/clif-backend" }
wasmer-dynasm-backend = { path = "lib/dynasm-backend", optional = true }
wasmer-singlepass-backend = { path = "lib/singlepass-backend", optional = true }
wasmer-runtime = { path = "lib/runtime" }
wasmer-runtime-abi = { path = "lib/runtime-abi", optional = true }
wasmer-runtime-core = { path = "lib/runtime-core" }
Expand All @@ -33,18 +33,19 @@ wasmer-llvm-backend = { path = "lib/llvm-backend", optional = true }
wasmer-wasi = { path = "lib/wasi", optional = true }

[workspace]
members = ["lib/clif-backend", "lib/dynasm-backend", "lib/runtime", "lib/runtime-abi", "lib/runtime-core", "lib/emscripten", "lib/spectests", "lib/win-exception-handler", "lib/runtime-c-api", "lib/llvm-backend", "lib/wasi"]
members = ["lib/clif-backend", "lib/singlepass-backend", "lib/runtime", "lib/runtime-abi", "lib/runtime-core", "lib/emscripten", "lib/spectests", "lib/win-exception-handler", "lib/runtime-c-api", "lib/llvm-backend", "lib/wasi"]

[build-dependencies]
wabt = "0.7.2"
glob = "0.2.11"
rustc_version = "0.2.3"

[features]
default = ["fast-tests", "wasi"]
debug = ["wasmer-clif-backend/debug", "wasmer-runtime-core/debug"]
# This feature will allow cargo test to run much faster
fast-tests = []
llvm = ["wasmer-llvm-backend", "wasmer-runtime/llvm"]
dynasm = ["wasmer-dynasm-backend", "wasmer-runtime/dynasm"]
"backend:llvm" = ["wasmer-llvm-backend"]
"backend:singlepass" = ["wasmer-singlepass-backend"]
wasi = ["wasmer-wasi"]
vfs = ["wasmer-runtime-abi"]
28 changes: 15 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,40 +34,42 @@ precommit: lint test

test:
# We use one thread so the emscripten stdouts doesn't collide
cargo test --all --exclude wasmer-runtime-c-api --exclude wasmer-emscripten --exclude wasmer-spectests --exclude wasmer-dynasm-backend -- $(runargs)
cargo test --all --exclude wasmer-runtime-c-api --exclude wasmer-emscripten --exclude wasmer-spectests --exclude wasmer-singlepass-backend -- $(runargs)
# cargo test --all --exclude wasmer-emscripten -- --test-threads=1 $(runargs)
cargo test --manifest-path lib/spectests/Cargo.toml --features clif
cargo test --manifest-path lib/spectests/Cargo.toml --features llvm
cargo build -p wasmer-runtime-c-api
cargo test -p wasmer-runtime-c-api -- --nocapture

test-nightly:
cargo test --manifest-path lib/spectests/Cargo.toml --features dynasm
test-singlepass:
cargo test --manifest-path lib/spectests/Cargo.toml --features singlepass

test-emscripten:
cargo test --manifest-path lib/emscripten/Cargo.toml --features clif -- --test-threads=1 $(runargs)
test-emscripten-llvm:
cargo test --manifest-path lib/emscripten/Cargo.toml --features llvm -- --test-threads=1 $(runargs)

test-emscripten-clif:
cargo test --manifest-path lib/emscripten/Cargo.toml --features clif -- --test-threads=1 $(runargs)

test-emscripten-nightly:
cargo test --manifest-path lib/emscripten/Cargo.toml --features dynasm -- --test-threads=1 $(runargs)
test-emscripten-singlepass:
cargo test --manifest-path lib/emscripten/Cargo.toml --features singlepass -- --test-threads=1 $(runargs)

dynasm-debug-release:
cargo +nightly build --features "dynasm debug" --release
singlepass-debug-release:
cargo +nightly build --features "singlepass debug" --release

dynasm-release:
cargo +nightly build --features "dynasm" --release
singlepass-release:
cargo +nightly build --features "singlepass" --release

dynasm-build:
cargo +nightly build --features "dynasm debug"
singlepass-build:
cargo +nightly build --features "singlepass debug"

release:
# If you are in OS-X, you will need mingw-w64 for cross compiling to windows
# brew install mingw-w64
cargo build --release

production-release:
cargo build --release --features backend:singlepass,backend:llvm

debug-release:
cargo build --release --features "debug"

Expand Down
2 changes: 1 addition & 1 deletion lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ to tune the codegen properties (compile speed, performance, etc) to best fit the

Currently, we support multiple backends for compiling WebAssembly to machine code:

- [dynasm-backend](./dynasm-backend/): Dynasm backend - super fast compilation, slower runtime speed
- [singlepass-backend](./singlepass-backend/): Single pass backend - super fast compilation, slower runtime speed
- [clif-backend](./clif-backend/): Cranelift backend - slower compilation, normal runtime speed
- [llvm-backend](./llvm-backend/): LLVM backend - slow compilation, native runtime speed
Loading

0 comments on commit 11b6a5d

Please sign in to comment.