-
Notifications
You must be signed in to change notification settings - Fork 108
64 lines (53 loc) · 1.67 KB
/
bench.yaml
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
name: Continuous benchmarking
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
include:
- os: ubuntu-20.04
install_deps: sudo apt-get install llvm-12-tools llvm-12-dev pkg-config
path_extension: /usr/lib/llvm-12/bin
steps:
- name: Checkout the repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install system dependencies
run: |
${{ matrix.install_deps }}
pip install numpy "jax[cpu]"
echo "${{ matrix.path_extension }}" >> $GITHUB_PATH
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.stack
key: ${{ runner.os }}-bench-v1-${{ hashFiles('**/*.cabal', 'stack*.yaml') }}
restore-keys: ${{ runner.os }}-bench-v1
- name: Benchmark
run: python3 benchmarks/continuous.py /tmp/new-perf-data.csv /tmp/new-commits.csv ${GITHUB_SHA}
- name: Switch to the data branch
uses: actions/checkout@v2
with:
ref: performance-data
- name: Append new data points
run: |
cat /tmp/new-perf-data.csv >>performance.csv
cat /tmp/new-commits.csv >>commits.csv
- name: Commit new data points
if: github.event_name == 'push'
run: |
git config --global user.name 'Dex CI'
git config --global user.email '[email protected]'
git add performance.csv commits.csv
git commit -m "Add measurements for ${GITHUB_SHA}"
git push