From 0e27c5173fa35f40e870b6ed0f52228583d17be4 Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Tue, 4 Oct 2022 14:49:49 +0200 Subject: [PATCH 1/7] use weight machines for benchmarks --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 552ea07148..2ee000def0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,7 @@ default: image: "paritytech/ci-linux:staging" interruptible: true tags: - - linux-docker-benches + - weights .kubernetes-env: &kubernetes-env image: "paritytech/tools:latest" From ce28d7215a93f3aa302b453667240b84c314e8f6 Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Tue, 4 Oct 2022 15:06:24 +0200 Subject: [PATCH 2/7] test commit --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2ee000def0..88a0a6a5d7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,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}" From 2867d8ed0f171b9503640fe993b2d12f54f0a81d Mon Sep 17 00:00:00 2001 From: Sergejs Kostjucenko Date: Wed, 5 Oct 2022 13:39:54 +0300 Subject: [PATCH 3/7] switch to nightly --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88a0a6a5d7..d60660cad0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,7 +43,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 +51,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 @@ -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 From 9f240f40bdbc68fab6d43241ff50a0592cab3789 Mon Sep 17 00:00:00 2001 From: Sergejs Kostjucenko Date: Wed, 5 Oct 2022 13:52:55 +0300 Subject: [PATCH 4/7] add wasmtime to path --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d60660cad0..07536234a1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -72,7 +72,8 @@ wasmtime-benchmark: # Install dependencies - cargo install cargo-wasi - curl https://wasmtime.dev/install.sh -sSf | bash - - source ~/.profile + - export WASMTIME_HOME="$HOME/.wasmtime" + - export PATH="$WASMTIME_HOME/bin:$PATH" # `wasmtime` Branch: `master` - git fetch From c9f6aaa1e48acfc418d0403f72509148733a2d44 Mon Sep 17 00:00:00 2001 From: Sergejs Kostjucenko Date: Wed, 5 Oct 2022 18:22:33 +0300 Subject: [PATCH 5/7] skip dependencies --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 07536234a1..7a16135f9d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,10 +70,10 @@ wasmtime-benchmark: - target/ci/ script: # Install dependencies - - cargo install cargo-wasi - - curl https://wasmtime.dev/install.sh -sSf | bash - - export WASMTIME_HOME="$HOME/.wasmtime" - - export PATH="$WASMTIME_HOME/bin:$PATH" + # - cargo install cargo-wasi + # - curl https://wasmtime.dev/install.sh -sSf | bash + # - export WASMTIME_HOME="$HOME/.wasmtime" + # - export PATH="$WASMTIME_HOME/bin:$PATH" # `wasmtime` Branch: `master` - git fetch From 2c1ebe5cc5b7fbdd1249cb0cb672d0b47b2773dc Mon Sep 17 00:00:00 2001 From: Sergejs Kostjucenko Date: Wed, 5 Oct 2022 19:17:26 +0300 Subject: [PATCH 6/7] update description --- .gitlab-ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7a16135f9d..2dcb379760 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,7 @@ # paritytech/wasmi +# To run benchmarks on a GitLab's "shell" runner following dependencies should be installed +# cargo-wasi +# wasmtime stages: - benchmarks @@ -69,11 +72,6 @@ wasmtime-benchmark: paths: - target/ci/ script: - # Install dependencies - # - cargo install cargo-wasi - # - curl https://wasmtime.dev/install.sh -sSf | bash - # - export WASMTIME_HOME="$HOME/.wasmtime" - # - export PATH="$WASMTIME_HOME/bin:$PATH" # `wasmtime` Branch: `master` - git fetch From f651f91d0f5024b08dd4d83e81168fca970382ff Mon Sep 17 00:00:00 2001 From: Sergejs Kostjucenko Date: Wed, 5 Oct 2022 20:20:21 +0300 Subject: [PATCH 7/7] test commit --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2dcb379760..03eeda6d6c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ # paritytech/wasmi +# # To run benchmarks on a GitLab's "shell" runner following dependencies should be installed # cargo-wasi # wasmtime