From 71aaf2d3f828281651daa77f6a39f9d0cf31a27f Mon Sep 17 00:00:00 2001 From: Syrus Date: Thu, 11 Apr 2019 11:40:23 -0700 Subject: [PATCH 1/3] Updated cargo --- Cargo.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.lock b/Cargo.lock index 5f111b7b8f5..1e81b086e0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2274,6 +2274,7 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-runtime-core 0.2.1", "wasmparser 0.28.0 (registry+https://github.com/rust-lang/crates.io-index)", ] From e986553d8be8cd3be94d05ff78120bd80a6a49d1 Mon Sep 17 00:00:00 2001 From: Syrus Date: Thu, 11 Apr 2019 11:44:07 -0700 Subject: [PATCH 2/3] Improved CircleCI config, use rust nightly for release --- .circleci/config.yml | 53 ++++++++++++++++++++++++++++---------------- Makefile | 7 +++--- 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3490bf6b539..37a5b52c18b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,8 @@ jobs: - checkout - restore_cache: keys: - - v6-lint-{{ arch }}-{{ checksum "Cargo.lock" }} + - v7-lint-{{ arch }}-{{ checksum "Cargo.lock" }} + - v7-lint-{{ arch }} - <<: *run_install_dependencies - run: name: Install lint deps @@ -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: v7-lint-{{ arch }}-{{ checksum "Cargo.lock" }} test: docker: @@ -50,14 +51,17 @@ jobs: - checkout - restore_cache: keys: - - v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} + - v7-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }} + - v7-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 @@ -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: v7-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }} test-macos: macos: @@ -76,7 +80,8 @@ jobs: - checkout - restore_cache: keys: - - v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} + - v7-cargo-cache-darwin-stable-{{ arch }}-{{ checksum "Cargo.lock" }} + - v7-cargo-cache-darwin-stable-{{ arch }} - run: name: Install crate dependencies command: | @@ -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: | @@ -129,7 +135,7 @@ jobs: - target/release/.fingerprint - target/release/build - target/release/deps - key: v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} + key: v7-cargo-cache-darwin-stable-{{ arch }}-{{ checksum "Cargo.lock" }} test-and-build: docker: @@ -138,13 +144,16 @@ jobs: - checkout - restore_cache: keys: - - v6-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} + - v7-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} + - v7-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 dynasm, for now) + - run: rustup default nightly-2019-04-11 - run: name: Tests command: | @@ -154,7 +163,8 @@ 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: | @@ -183,7 +193,7 @@ jobs: - target/release/.fingerprint - target/release/build - target/release/deps - key: v6-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} + key: v7-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} test-and-build-macos: macos: @@ -192,7 +202,8 @@ jobs: - checkout - restore_cache: keys: - - v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} + - v7-cargo-cache-darwin-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} + - v7-cargo-cache-darwin-nightly-{{ arch }} - run: name: Install crate dependencies command: | @@ -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 dynasm, for now) + - run: rustup default nightly-2019-04-11 - run: name: Tests command: | @@ -228,7 +241,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-dynasm - run: name: Release Build command: | @@ -253,7 +267,7 @@ jobs: - target/release/.fingerprint - target/release/build - target/release/deps - key: v6-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} + key: v7-cargo-cache-darwin-nightly-{ arch }}-{{ checksum "Cargo.lock" }} test-rust-nightly: docker: @@ -262,27 +276,28 @@ jobs: - checkout - restore_cache: keys: - - v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly + - v7-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} + - v7-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-dynasm make test-emscripten-clif - make test-emscripten-nightly + make test-emscripten-dynasm - 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: v7-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly publish-github-release: docker: diff --git a/Makefile b/Makefile index 383d4ccf4ab..947032873ce 100644 --- a/Makefile +++ b/Makefile @@ -41,17 +41,16 @@ test: cargo build -p wasmer-runtime-c-api cargo test -p wasmer-runtime-c-api -- --nocapture -test-nightly: +test-dynasm: cargo test --manifest-path lib/spectests/Cargo.toml --features dynasm -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: +test-emscripten-dynasm: cargo test --manifest-path lib/emscripten/Cargo.toml --features dynasm -- --test-threads=1 $(runargs) dynasm-debug-release: From 1f06e90729c7103beed7d247c4410bd0a3167d60 Mon Sep 17 00:00:00 2001 From: Syrus Date: Thu, 11 Apr 2019 11:51:28 -0700 Subject: [PATCH 3/3] Use better key for caching --- .circleci/config.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 37a5b52c18b..c588234dc03 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,8 +21,8 @@ jobs: - checkout - restore_cache: keys: - - v7-lint-{{ arch }}-{{ checksum "Cargo.lock" }} - - v7-lint-{{ arch }} + - v8-lint-{{ arch }}-{{ checksum "Cargo.lock" }} + - v8-lint-{{ arch }} - <<: *run_install_dependencies - run: name: Install lint deps @@ -41,7 +41,7 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: v7-lint-{{ arch }}-{{ checksum "Cargo.lock" }} + key: v8-lint-{{ arch }}-{{ checksum "Cargo.lock" }} test: docker: @@ -51,8 +51,8 @@ jobs: - checkout - restore_cache: keys: - - v7-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }} - - v7-test-cargo-cache-linux-stable-{{ arch }} + - v8-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }} + - v8-test-cargo-cache-linux-stable-{{ arch }} - <<: *run_install_dependencies - run: name: Tests @@ -71,7 +71,7 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: v7-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }} + key: v8-test-cargo-cache-linux-stable-{{ arch }}-{{ checksum "Cargo.lock" }} test-macos: macos: @@ -80,8 +80,8 @@ jobs: - checkout - restore_cache: keys: - - v7-cargo-cache-darwin-stable-{{ arch }}-{{ checksum "Cargo.lock" }} - - v7-cargo-cache-darwin-stable-{{ arch }} + - v8-cargo-cache-darwin-stable-{{ arch }}-{{ checksum "Cargo.lock" }} + - v8-cargo-cache-darwin-stable-{{ arch }} - run: name: Install crate dependencies command: | @@ -135,7 +135,7 @@ jobs: - target/release/.fingerprint - target/release/build - target/release/deps - key: v7-cargo-cache-darwin-stable-{{ arch }}-{{ checksum "Cargo.lock" }} + key: v8-cargo-cache-darwin-stable-{{ arch }}-{{ checksum "Cargo.lock" }} test-and-build: docker: @@ -144,8 +144,8 @@ jobs: - checkout - restore_cache: keys: - - v7-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} - - v7-cargo-cache-linux-nightly-{{ arch }} + - v8-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} + - v8-cargo-cache-linux-nightly-{{ arch }} - run: name: Install dependencies command: | @@ -193,7 +193,7 @@ jobs: - target/release/.fingerprint - target/release/build - target/release/deps - key: v7-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} + key: v8-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} test-and-build-macos: macos: @@ -202,8 +202,8 @@ jobs: - checkout - restore_cache: keys: - - v7-cargo-cache-darwin-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} - - v7-cargo-cache-darwin-nightly-{{ arch }} + - v8-cargo-cache-darwin-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} + - v8-cargo-cache-darwin-nightly-{{ arch }} - run: name: Install crate dependencies command: | @@ -267,7 +267,7 @@ jobs: - target/release/.fingerprint - target/release/build - target/release/deps - key: v7-cargo-cache-darwin-nightly-{ arch }}-{{ checksum "Cargo.lock" }} + key: v8-cargo-cache-darwin-nightly-{ arch }}-{{ checksum "Cargo.lock" }} test-rust-nightly: docker: @@ -276,8 +276,8 @@ jobs: - checkout - restore_cache: keys: - - v7-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} - - v7-cargo-cache-linux-nightly-{{ arch }} + - v8-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} + - v8-cargo-cache-linux-nightly-{{ arch }} - run: name: Install dependencies command: | @@ -297,7 +297,7 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: v7-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly + key: v8-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }}-nightly publish-github-release: docker: