-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publishing benchmarks for graphs (#740)
* [Do not merge] Publishing benchmarks for graphs * add wasmtime-benchmark-master * add dbg ref * add collect artifacts * switch ci image * add publish * cp instaed mv * add gha * fix on * add gh-pages * disable ref for checkout * trim whitespaces * add cancel for previous runs * add gh token * downgrade checkout action * add skip-fetch-gh-pages option * debug gha * add timer for files * fix script * move script to file * rename job * restart pipeline * add debug messages * enable script * restart pipeline to add second result to graph * remove debug refs --------- Co-authored-by: Robin Freyler <[email protected]>
- Loading branch information
Showing
4 changed files
with
190 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Benchmarks - publish graphs | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
permissions: | ||
# deployments permission to deploy GitHub pages website | ||
deployments: write | ||
# contents permission to update benchmark contents in gh-pages branch | ||
contents: write | ||
|
||
# disable running jobs on earlier commits | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
benchmark: | ||
name: Publishing benchmarks graphs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout gh-pages branch | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
with: | ||
ref: "gh-pages" | ||
|
||
- name: Waiting for the output files | ||
run: bash scripts/ci/sync_wait.sh | ||
|
||
- name: Store benchmark result criterion | ||
uses: benchmark-action/github-action-benchmark@70405016b032d44f409e4b1b451c40215cbe2393 # v1.18.0 | ||
with: | ||
name: "Wasmi criterion benchmark" | ||
tool: "cargo" | ||
output-file-path: benchmarks/criterion/output-criterion.txt | ||
benchmark-data-dir-path: "benchmarks/criterion" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
skip-fetch-gh-pages: true | ||
|
||
- name: Store benchmark result wasmtime | ||
uses: benchmark-action/github-action-benchmark@70405016b032d44f409e4b1b451c40215cbe2393 # v1.18.0 | ||
with: | ||
name: "Wasmi criterion wasmtime" | ||
tool: "cargo" | ||
output-file-path: benchmarks/wasmtime/output-wasmtime.txt | ||
benchmark-data-dir-path: "benchmarks/wasmtime" | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
skip-fetch-gh-pages: true | ||
|
||
- name: Push benchmark result | ||
run: | | ||
git config --global user.name 'github-action-benchmark' | ||
git config --global user.email '[email protected]' | ||
echo "removing files" | ||
rm -f benchmarks/criterion/output-criterion.txt | ||
rm -f benchmarks/wasmtime/output-wasmtime.txt | ||
echo "git add and commit" | ||
git add benchmarks/ | ||
git commit -m "remove output files" | ||
echo "git push" | ||
git push 'https://${{ secrets.GITHUB_TOKEN }}@github.com/paritytech/wasmi.git' gh-pages:gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,14 @@ name: Rust - Continuous Integration | |
|
||
on: | ||
push: | ||
branches: [ master ] | ||
branches: [master] | ||
pull_request: | ||
branches: [ master ] | ||
branches: [master] | ||
|
||
# disable running jobs on earlier commits | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check: | ||
|
@@ -27,7 +32,7 @@ jobs: | |
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: ${{ runner.os }}-cargo- | ||
- name: Add extra targets | ||
|
@@ -79,22 +84,22 @@ jobs: | |
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: ${{ runner.os }}-cargo- | ||
- name: Checkout Submodules | ||
run: git submodule update --init --recursive | ||
- name: Test (default features) | ||
uses: actions-rs/cargo@v1 | ||
env: | ||
RUSTFLAGS: '--cfg debug_assertions' | ||
RUSTFLAGS: "--cfg debug_assertions" | ||
with: | ||
command: test | ||
args: --workspace --release | ||
- name: Test (all features) | ||
uses: actions-rs/cargo@v1 | ||
env: | ||
RUSTFLAGS: '--cfg debug_assertions' | ||
RUSTFLAGS: "--cfg debug_assertions" | ||
with: | ||
command: test | ||
args: --workspace --release --all-features | ||
|
@@ -135,12 +140,12 @@ jobs: | |
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: ${{ runner.os }}-cargo- | ||
- uses: actions-rs/cargo@v1 | ||
env: | ||
RUSTDOCFLAGS: '-D warnings' | ||
RUSTDOCFLAGS: "-D warnings" | ||
with: | ||
command: doc | ||
args: --workspace --all-features --no-deps --document-private-items | ||
|
@@ -158,7 +163,7 @@ jobs: | |
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: audit | ||
args: '' | ||
args: "" | ||
|
||
udeps: | ||
name: uDeps | ||
|
@@ -289,7 +294,7 @@ jobs: | |
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: ${{ runner.os }}-cargo- | ||
- name: Clippy (default features) | ||
|
@@ -343,7 +348,7 @@ jobs: | |
- name: Run cargo-tarpaulin (default features) | ||
uses: actions-rs/[email protected] | ||
with: | ||
version: '0.18.0' | ||
version: "0.18.0" | ||
args: --workspace | ||
- name: Upload to codecov.io | ||
uses: codecov/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
# Script waits until file benchmarks/criterion/output-criterion.txt | ||
# appears | ||
|
||
for i in $(seq 1 600); do | ||
git pull -q origin gh-pages | ||
sleep 1 | ||
ls benchmarks/criterion/output-criterion.txt 2>/dev/null | ||
if [ $? = 0 ]; then | ||
break; | ||
fi | ||
echo "Waiting..." | ||
done |