Skip to content

Commit

Permalink
chore: bump iai-callgrind
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Nov 21, 2024
1 parent 9ad12eb commit 45bdda3
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 108 deletions.
13 changes: 13 additions & 0 deletions .github/scripts/install_iai_callgrind_runner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -eo pipefail

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::"
17 changes: 4 additions & 13 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

env:
Expand Down Expand Up @@ -32,18 +31,6 @@ jobs:
- 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:
Expand All @@ -55,11 +42,15 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install iai-callgrind-runner
run: ./.github/scripts/install_iai_callgrind_runner.sh
- name: Save baseline
run: cargo bench -p revmc-cli --bench iai -- --save-baseline=$BASELINE
- name: Checkout PR
uses: actions/checkout@v4
with:
clean: false
- name: Install iai-callgrind-runner
run: ./.github/scripts/install_iai_callgrind_runner.sh
- name: Compare PR benchmarks
run: cargo bench -p revmc-cli --bench iai -- --baseline=$BASELINE
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ jobs:
- run: cargo doc --workspace --features ${{ env.ALL_BACKENDS }} --no-deps --document-private-items
env:
RUSTDOCFLAGS: --cfg docsrs -D warnings --show-type-layout --generate-link-to-definition --enable-index-page -Zunstable-options
# - name: Deploy documentation
# uses: peaceiris/actions-gh-pages@v3
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: target/doc
# force_orphan: true
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: target/doc
force_orphan: true

fmt:
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit 45bdda3

Please sign in to comment.