-
Notifications
You must be signed in to change notification settings - Fork 19
65 lines (57 loc) · 1.67 KB
/
benchmark.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
name: Benchmarks
on:
push:
branches:
- '*'
paths-ignore:
- 'README.md'
- 'examples/**'
- 'scripts/*'
- 'web/**'
- 'tests/**'
- 'unit/**'
- '.github/workflows/**'
- '!.github/workflows/benchmark.yml'
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: "./.github/workflows/setup"
- name: Install nix
uses: "./.github/workflows/get-nix"
with:
target: ${{ inputs.target }}
- name: Cache Nix Store
uses: actions/cache@v4
id: nix-cache
with:
path: /tmp/nixcache
key: ${{ runner.os }}-${{ env.nixHash }}-nix-cache
- name: Import Nix Store Cache
if: "steps.nix-cache.outputs.cache-hit == 'true'"
shell: bash
run: |
nix-store --import < /tmp/nixcache
sudo rm -rf /tmp/nixcache
- name: Run benchmarks
run: |
set -ex
export LD_LIBRARY_PATH=`pwd`/build/onetbb/lib
nix build -L .#benchmarks
rm result
nix run -L .#benchmarks > all_benchmark_results.json
cat all_benchmark_results.json
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
if: ${{ github.ref_name == 'develop' }}
with:
tool: 'googlecpp'
output-file-path: all_benchmark_results.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
comment-on-alert: true
alert-threshold: '200%'
alert-comment-cc-users: '@disorderedmaterials/dissolve-devs'