Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI benchmarks workflows #1255

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/fork_pr_benchmark_closed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
pull_request_target:
types: [closed]

jobs:
archive_fork_pr_branch:
name: Archive closed fork PR branch with Bencher
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: bencherdev/bencher@main
- name: Archive closed fork PR branch with Bencher
run: |
bencher archive \
--project stratum-v2-sri \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--branch "$GITHUB_HEAD_REF"
104 changes: 54 additions & 50 deletions .github/workflows/run-and-track-benchmarks-on-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,120 +5,124 @@ on:
branches:
- main

permissions:
checks: write

GitGab19 marked this conversation as resolved.
Show resolved Hide resolved
jobs:
benchmark_sv1_criterion_with_bencher:
name: Track sv1 criterion benchmarks with Bencher
runs-on: ubuntu-latest
env:
BENCHER_PROJECT: stratum-v2-sri
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_ADAPTER: rust_criterion
BENCHER_TESTBED: sv1
BENCHER_PROJECT: stratum-v2-sri
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_ADAPTER: rust_criterion
BENCHER_TESTBED: sv1
steps:
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.75.0
override: true

- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/checkout@v4
uses: actions/checkout@v4

- uses: bencherdev/bencher@main
- name: Benchmark with Bencher
run: |
cd benches
bencher run \
--github-actions ${{ secrets.GITHUB_TOKEN }} \
"cargo bench --bench criterion_sv1_benchmark"
cd benches
bencher run \
--github-actions ${{ secrets.GITHUB_TOKEN }} \
"cargo bench --bench criterion_sv1_benchmark"

benchmark_sv2_criterion_with_bencher:
name: Track sv2 criterion benchmarks with Bencher
runs-on: ubuntu-latest
env:
BENCHER_PROJECT: stratum-v2-sri
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_ADAPTER: rust_criterion
BENCHER_TESTBED: sv2
BENCHER_PROJECT: stratum-v2-sri
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_ADAPTER: rust_criterion
BENCHER_TESTBED: sv2
steps:
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.75.0
override: true

- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/checkout@v4
uses: actions/checkout@v4

- uses: bencherdev/bencher@main
- name: Benchmark with Bencher
run: |
cd benches
bencher run \
--github-actions ${{ secrets.GITHUB_TOKEN }} \
"cargo bench --bench criterion_sv2_benchmark"
cd benches
bencher run \
--github-actions ${{ secrets.GITHUB_TOKEN }} \
"cargo bench --bench criterion_sv2_benchmark"

benchmark_sv1_iai_with_bencher:
name: Track sv1 iai benchmarks with Bencher
runs-on: ubuntu-latest
env:
BENCHER_PROJECT: stratum-v2-sri
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_ADAPTER: rust_iai
BENCHER_TESTBED: sv1
BENCHER_PROJECT: stratum-v2-sri
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_ADAPTER: rust_iai
BENCHER_TESTBED: sv1
steps:
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.75.0
override: true

- name: Checkout repository
uses: actions/checkout@v4

- name: Install Valgrind
run: |
sudo apt-get update
sudo apt-get install -y valgrind=1:3.18.1-1ubuntu2

- uses: actions/checkout@v4
sudo apt-get update
sudo apt-get install -y valgrind=1:3.18.1-1ubuntu2

- uses: bencherdev/bencher@main
- name: Benchmark with Bencher
run: |
cd benches
bencher run \
--github-actions ${{ secrets.GITHUB_TOKEN }} \
"cargo bench --bench iai_sv1_benchmark"
cd benches
bencher run \
--github-actions ${{ secrets.GITHUB_TOKEN }} \
"cargo bench --bench iai_sv1_benchmark"

benchmark_sv2_iai_with_bencher:
name: Track sv2 iai benchmarks with Bencher
runs-on: ubuntu-latest
env:
BENCHER_PROJECT: stratum-v2-sri
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_ADAPTER: rust_iai
BENCHER_TESTBED: sv2
BENCHER_PROJECT: stratum-v2-sri
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_ADAPTER: rust_iai
BENCHER_TESTBED: sv2
steps:
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.75.0
override: true

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Valgrind
run: |
sudo apt-get update
sudo apt-get install -y valgrind=1:3.18.1-1ubuntu2

- uses: actions/checkout@v4
sudo apt-get update
sudo apt-get install -y valgrind=1:3.18.1-1ubuntu2

- uses: bencherdev/bencher@main
- name: Benchmark with Bencher
run: |
cd benches
bencher run \
--github-actions ${{ secrets.GITHUB_TOKEN }} \
"cargo bench --bench iai_sv2_benchmark"
cd benches
bencher run \
--github-actions ${{ secrets.GITHUB_TOKEN }} \
"cargo bench --bench iai_sv2_benchmark"
Loading