-
Notifications
You must be signed in to change notification settings - Fork 52
72 lines (65 loc) · 2.2 KB
/
Copy pathbenchmarks.yml
File metadata and controls
72 lines (65 loc) · 2.2 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
63
64
65
66
67
68
69
70
71
72
name: benchmarks
on:
# Run action on certain pull request events
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
# Nightly job on default (main) branch
schedule:
- cron: '0 0 * * *'
# Whenever certain branches are pushed
push:
branches: [main]
# On demand from github.com for testing
workflow_dispatch:
# Ensures that only one workflow runs at a time for this branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pixi_run_benchmarks:
env:
SCCACHE_DIR: ${{ github.workspace }}/.sccache
strategy:
fail-fast: false
# TODO: Re-enable when we do not have self-hosted runners in the public repo
# matrix:
# ubuntu_version: [22.04, 24.04]
runs-on: self-hosted #ubuntu-${{ matrix.ubuntu_version }}
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: true
# Cache build directories and sccache
- name: Cache build directories and sccache
uses: actions/cache@v4
with:
path: |
${{ env.SCCACHE_DIR }}
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-build-${{ github.sha }}
${{ runner.os }}-build
- uses: prefix-dev/setup-pixi@v0.8.14
with:
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
frozen: true
manifest-path: pixi.toml
# TODO: Remove this when we do not have self-hosted runners in the public repo
pixi-bin-path: ~/actions-runner/.pixi/bin/pixi
- name: Build and benchmark
run: |
pixi run install_all
pixi run test_benchmarks
- name: Store benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
name: Python Benchmark with pytest-benchmark
tool: 'pytest'
output-file-path: pytest_benchmarks.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: '125%'
comment-on-alert: true
fail-on-alert: true