diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 7f78a6a..f65fc9b 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -21,7 +21,15 @@ jobs: - uses: cargo-bins/cargo-binstall@main - run: sudo apt update && sudo apt install valgrind - - run: cargo binstall --no-confirm iai-callgrind-runner@0.10.2 + + - name: Install iai-callgrind-runner + run: | + version=$(cargo metadata --format-version=1 |\ + jq '.packages[] | select(.name == "iai-callgrind").version' |\ + tr -d '"' + ) + cargo binstall --no-confirm iai-callgrind-runner --version $version + - run: | IAI_CALLGRIND_COLOR=never cargo bench --bench ci_bench > perf.txt - run: | diff --git a/.github/workflows/pr-benchmark.yml b/.github/workflows/pr-benchmark.yml index 86622ca..75c17fd 100644 --- a/.github/workflows/pr-benchmark.yml +++ b/.github/workflows/pr-benchmark.yml @@ -15,7 +15,15 @@ jobs: - uses: cargo-bins/cargo-binstall@main - run: sudo apt update && sudo apt install valgrind - - run: cargo binstall --no-confirm iai-callgrind-runner@0.10.2 + + - name: Install iai-callgrind-runner + run: | + version=$(cargo metadata --format-version=1 |\ + jq '.packages[] | select(.name == "iai-callgrind").version' |\ + tr -d '"' + ) + cargo binstall --no-confirm iai-callgrind-runner --version $version + - run: | IAI_CALLGRIND_COLOR=never cargo bench --bench ci_bench > benchmark_results.txt - name: Upload Benchmark Results