Skip to content

Commit 1c9cba3

Browse files
Krastanov-agentKrastanovclaude
authored
Migrate benchmark workflow from BenchmarkCI to AirspeedVelocity (#48)
Replaces the manual BenchmarkCI workflow (50+ lines) with the modern AirspeedVelocity action (3 lines). Changes: - Replaced benchmark.yml with AirspeedVelocity action - Deleted benchmark-comment.yml (no longer needed) Benefits: - Much simpler and easier to maintain - Consistent with other repos in the organization - Automatic PR comments with benchmark results - Better integration with GitHub Actions The AirspeedVelocity action handles all the complexity internally: - Running benchmarks on base and PR branches - Comparing results and generating reports - Posting formatted comments to PRs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Stefan Krastanov <stefan@krastanov.org> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent fbf7581 commit 1c9cba3

File tree

2 files changed

+15
-114
lines changed

2 files changed

+15
-114
lines changed

.github/workflows/benchmark-comment.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/benchmark.yml

Lines changed: 15 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,22 @@
1-
name: Performance tracking
1+
name: Benchmarks
22
on:
3-
pull_request:
3+
pull_request_target:
4+
branches: [master, main]
5+
permissions:
6+
pull-requests: write
47

5-
env:
6-
PYTHON: ~
8+
concurrency:
9+
# group by workflow and ref; the last slightly strange component ensures that for pull
10+
# requests, we limit to 1 concurrent job, but for the master branch we don't
11+
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main') || github.run_number }}
12+
# Cancel intermediate builds, but only if it is a pull request build.
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
714

815
jobs:
9-
performance-tracking:
16+
benchmark:
1017
runs-on: ubuntu-latest
11-
#runs-on: self-hosted
1218
steps:
13-
# setup
14-
- uses: actions/checkout@v5
15-
- uses: julia-actions/setup-julia@latest
19+
- uses: MilesCranmer/AirspeedVelocity.jl@action-v1
1620
with:
17-
version: '1.10'
18-
- uses: julia-actions/julia-buildpkg@latest
19-
- name: install dependencies
20-
run: julia -e 'using Pkg; pkg"add PkgBenchmark BenchmarkCI@0.1"'
21-
22-
# run the benchmark suite
23-
- name: run benchmarks
24-
run: |
25-
julia -e '
26-
using BenchmarkCI
27-
BenchmarkCI.judge()
28-
BenchmarkCI.displayjudgement()
29-
'
30-
31-
# generate and record the benchmark result as markdown
32-
- name: generate benchmark result
33-
run: |
34-
body=$(julia -e '
35-
using BenchmarkCI
36-
37-
let
38-
judgement = BenchmarkCI._loadjudge(BenchmarkCI.DEFAULT_WORKSPACE)
39-
title = "Benchmark Result"
40-
ciresult = BenchmarkCI.CIResult(; judgement, title)
41-
BenchmarkCI.printcommentmd(stdout::IO, ciresult)
42-
end
43-
')
44-
body="${body//'%'/'%25'}"
45-
body="${body//$'\n'/'%0A'}"
46-
body="${body//$'\r'/'%0D'}"
47-
echo $body > ./benchmark-result.artifact
48-
49-
# record the pull request number
50-
- name: record pull request number
51-
run: echo ${{ github.event.pull_request.number }} > ./pull-request-number.artifact
52-
53-
# save as artifacts (performance tracking (comment) workflow will use it)
54-
- uses: actions/upload-artifact@v4
55-
with:
56-
name: performance-tracking
57-
path: ./*.artifact
21+
julia-version: '1'
22+
tune: 'false'

0 commit comments

Comments
 (0)