forked from childmindresearch/bids2table
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (58 loc) · 1.65 KB
/
benchmark.yaml
File metadata and controls
62 lines (58 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Benchmark
on:
pull_request:
branches: [ "main" ]
jobs:
get-tag:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.last_tag.outputs.tag }}
steps:
- uses: actions/checkout@v6
with:
fetch-tags: true
fetch-depth: 0
- id: last_tag
run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
benchmark:
needs: get-tag
runs-on: ubuntu-latest
strategy:
matrix:
target:
- name: pr
ref: ${{ github.sha }}
- name: main
ref: main
- name: ${{ needs.get_tag.outputs.tag }}
ref: ${{ needs.get_tag.outputs.tag }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ matrix.target.ref }}
submodules: true
- uses: astral-sh/setup-uv@v8.1.0
- run: uv sync --group "benchmark" --extra "cloud"
- name: Run benchmarks
run: |
uv run .github/scripts/run_benchmarks.py \
--output benchmark-${{matrix.target.name }}.json
- uses: actions/upload-artifact@v7
with:
name: benchmark-${{ matrix.target.name }}
path: benchmark-${{ matrix.target.name }}.json
report:
needs: [ get-tag, benchmark ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.1.0
- run: uv sync --group "benchmark"
- uses: actions/download-artifact@v8
with:
pattern: benchmark-*
- name: Generate report
run: |
uv run .github/scripts/compare_benchmarks.py \
--output benchmarks.md \
--pattern benchmark-*.json