-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
84 additions
and
51 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,59 @@ | ||
name: Benchmark | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
LLVM_VERSION: "17" # Must be just the major version | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
iai: | ||
runs-on: ubuntu-latest | ||
env: | ||
BASELINE: base | ||
IAI_CALLGRIND_RUNNER: iai-callgrind-runner | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install LLVM | ||
run: sudo .github/scripts/install_llvm_ubuntu.sh ${{ env.LLVM_VERSION }} | ||
- name: Install Valgrind | ||
run: sudo apt update && sudo apt install valgrind | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Install cargo-binstall | ||
uses: taiki-e/install-action@cargo-binstall | ||
- name: Install iai-callgrind-runner | ||
run: | | ||
echo "::group::Install" | ||
version=$(cargo metadata --format-version=1 |\ | ||
jq '.packages[] | select(.name == "iai-callgrind").version' |\ | ||
tr -d '"' | ||
) | ||
cargo binstall iai-callgrind-runner --version $version --no-confirm --no-symlinks --force | ||
echo "::endgroup::" | ||
echo "::group::Verification" | ||
which iai-callgrind-runner | ||
echo "::endgroup::" | ||
- name: Checkout base | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.base_ref || 'main' }} | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
- name: Save baseline | ||
run: cargo bench -p revm-jit-cli --bench iai -- --save-baseline=$BASELINE | ||
- name: Checkout PR | ||
uses: actions/checkout@v4 | ||
with: | ||
clean: false | ||
- name: Compare PR benchmarks | ||
run: cargo bench -p revm-jit-cli --bench iai -- --baseline=$BASELINE |
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
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