-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.51 KB
/
Copy pathbenchmarks.yml
File metadata and controls
56 lines (47 loc) · 1.51 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
name: Nightly Benchmarks
on:
schedule:
- cron: '0 2 * * *' # daily at 02:00 UTC
workflow_dispatch:
permissions:
contents: write
jobs:
run-benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install numpy scipy matplotlib
python -m pip install -e .
- name: Run Python benchmarks
run: |
python scripts/run_benchmarks.py --csv benchmark_results.csv --plot benchmark_results.png
- name: Prepare gh-pages data
run: |
mkdir -p gh-pages-data
TS=$(date -u +"%Y%m%d-%H%M%S")
cp benchmark_results.csv gh-pages-data/results-$TS.csv
cp benchmark_results.png gh-pages-data/results-$TS.png
# Also keep latest copy
cp benchmark_results.csv gh-pages-data/latest.csv
cp benchmark_results.png gh-pages-data/latest.png
- name: Upload benchmark artifacts
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: |
benchmark_results.csv
benchmark_results.png
- name: Push to gh-pages branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: gh-pages-data
clean: false
target-folder: data/benchmarks