-
Notifications
You must be signed in to change notification settings - Fork 228
96 lines (79 loc) · 2.62 KB
/
asv.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Runner information:
# CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
# GPU: NVIDIA GeForce RTX 2060
name: asv-benchmarks
env:
OUTPUT_PATH: ${{ github.workspace }}
ENVHOME: "/home/devito/environments"
on:
workflow_dispatch:
inputs:
tags:
description: 'Run ASV'
# Trigger the workflow on push to the master branch
push:
branches:
- master
jobs:
# Run the asv benchmarks on the self-hosted runner
benchmarks:
name: benchmarks
runs-on: [self-hosted, asv]
env:
DEVITO_ARCH: "gcc-9"
DEVITO_LANGUAGE: "openmp"
DEVITO_BENCHMARKS: "1"
DEVITO_LOGGING: "PERF"
OMP_NUM_THREADS: "8"
CC: "gcc-9"
CXX: "g++-9"
steps:
- name: Checkout devito
uses: actions/checkout@v4
- name: Set VIRTUAL_ENV
run: |
echo "VIRTUAL_ENV=$ENVHOME/asv" >> $GITHUB_ENV
echo "PATH=$VIRTUAL_ENV/bin:$PATH" >> $GITHUB_ENV
- name: Set PATH
run: |
echo "PATH=$VIRTUAL_ENV/bin:$PATH" >> $GITHUB_ENV
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade asv
- name: Setup asv
run: |
asv machine --config benchmarks/regression/asv.conf.json --machine i7-6700K --os ubuntu-20.10 --arch x86-64 --cpu i7-6700K --num_cpu 8 --ram 16GB
- name: Run benchmarks
run: |
asv run -v --show-stderr --config benchmarks/regression/asv.conf.json --cpu-affinity 0-7 --machine i7-6700K
- name: Checkout asv-results branch
uses: actions/checkout@v4
with:
ref: asv-results
clean: false
- name: Commit benchmarks results
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
asv run --config benchmarks/regression/asv.conf.json --bench just-discover --machine i7-6700K
git add -f benchmarks/regression/.asv/results/
git status
git commit -m "Commit ASV results"
- name: Push benchmarks results to the asv-results branch
uses: ad-m/github-push-action@master
with:
branch: asv-results
force: true
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create results (html)
run: |
asv publish --config benchmarks/regression/asv.conf.json
rm -f /tmp/ssh-auth.sock
- name: Deploy results to devitocodes/devito-performance/gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: devitocodes/devito-performance
publish_branch: gh-pages
publish_dir: ./benchmarks/regression/.asv/html