Skip to content

Commit b9d155e

Browse files
committed
add benchmarking in CI
1 parent 8a876f0 commit b9d155e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/benchmark.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Benchmark
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
permissions:
7+
pull-requests: write # action needs to post a comment
8+
9+
jobs:
10+
benchmark:
11+
name: Julia ${{ matrix.version }} - ${{ matrix.platform.os }} - ${{ matrix.platform.arch }} - ${{ github.event_name }}
12+
runs-on: ${{ matrix.platform.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
platform:
17+
- os: ubuntu-latest
18+
arch: x64
19+
- os: ubuntu-24.04-arm
20+
arch: aarch64
21+
version:
22+
- '1'
23+
- 'lts'
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: julia-actions/setup-julia@v2
27+
with:
28+
version: ${{ matrix.version }}
29+
arch: ${{ matrix.platform.arch }}
30+
- name: Install dependencies
31+
run: julia -e 'using Pkg; pkg"add PkgBenchmark [email protected]"'
32+
- name: Run benchmarks
33+
run: julia -e 'using BenchmarkCI; BenchmarkCI.judge(baseline = "origin/main")'
34+
- name: Post results
35+
run: julia -e 'using BenchmarkCI; BenchmarkCI.postjudge()'
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)