diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 552ea07148..03eeda6d6c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,8 @@ # paritytech/wasmi +# +# To run benchmarks on a GitLab's "shell" runner following dependencies should be installed +# cargo-wasi +# wasmtime stages: - benchmarks @@ -16,7 +20,7 @@ default: image: "paritytech/ci-linux:staging" interruptible: true tags: - - linux-docker-benches + - weights .kubernetes-env: &kubernetes-env image: "paritytech/tools:latest" @@ -27,7 +31,7 @@ default: criterion-benchmark: stage: benchmarks rules: - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs <<: *docker-env artifacts: name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" @@ -43,7 +47,7 @@ criterion-benchmark: - git submodule update --init --recursive - mkdir -p ./target/ci - pushd ./crates/wasmi/ - - cargo bench --bench benches -- --noplot --save-baseline master | tee ../../target/ci/bench-master + - cargo +nightly bench --bench benches -- --noplot --save-baseline master | tee ../../target/ci/bench-master - popd - git submodule deinit --all -f @@ -51,7 +55,7 @@ criterion-benchmark: - git checkout $CI_COMMIT_SHA - git submodule update --init --recursive - pushd ./crates/wasmi/ - - cargo bench --bench benches -- --noplot --baseline master | tee ../../target/ci/bench-pr + - cargo +nightly bench --bench benches -- --noplot --baseline master | tee ../../target/ci/bench-pr - popd # Save benchmark report @@ -69,10 +73,6 @@ wasmtime-benchmark: paths: - target/ci/ script: - # Install dependencies - - cargo install cargo-wasi - - curl https://wasmtime.dev/install.sh -sSf | bash - - source ~/.profile # `wasmtime` Branch: `master` - git fetch @@ -80,7 +80,7 @@ wasmtime-benchmark: - git pull - git submodule update --init --recursive - mkdir -p ./target/ci - - cargo wasi build --profile bench --bench benches --verbose + - cargo +nightly wasi build --profile bench --bench benches --verbose - cp `ls -t target/wasm32-wasi/release/deps/*wasi.wasm` target/ci/benches-master.wasm - pushd ./crates/wasmi/ - wasmtime run --dir=. ../../target/ci/benches-master.wasm -- --bench --save-baseline master-wasm | tee ../../target/ci/wasmtime-master @@ -91,7 +91,7 @@ wasmtime-benchmark: - git checkout $CI_COMMIT_SHA - git submodule update --init --recursive - mkdir -p ./target/ci - - cargo wasi build --profile bench --bench benches --verbose + - cargo +nightly wasi build --profile bench --bench benches --verbose - cp `ls -t target/wasm32-wasi/release/deps/*wasi.wasm` target/ci/benches-pr.wasm - pushd ./crates/wasmi/ - wasmtime run --dir=. ../../target/ci/benches-pr.wasm -- --bench --baseline master-wasm | tee ../../target/ci/wasmtime-pr