-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (57 loc) · 1.95 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: Benchmark
on:
push:
branches:
- main
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build-and-bench:
name: Build and Benchmark on big-iron8
# The secret runner token is referenced in the environment in order
# to be sent along with the job to our runners. Note that validity
# of the token will be checked by our forked runner:
# https://github.com/cksystemsgroup/github-actions-runner/tree/main-hard
env:
TOKEN: ${{ secrets.RUNNER_TOKEN }}
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust 1.57.0
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.57.0
override: true
- name: Build Benchmarks
uses: actions-rs/cargo@v1
with:
command: bench
args: --benches --no-run --features z3,boolector --locked
- name: Run Benchmarks
uses: actions-rs/cargo@v1
with:
command: bench
args: --benches --features z3,boolector --locked
- name: Generate Metadata
run: |
echo "::set-output name=SHORT_SHA::$(echo $GITHUB_SHA | cut -c-8)"
echo $COMMIT_JSON > ./target/criterion/commit.json
id: metadata
env:
COMMIT_JSON: ${{ toJson(github.event.head_commit) }}
- name: Deploy Results
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.PERF_DEPLOY_KEY }}
external_repository: cksystemsgroup/monster-perf
destination_dir: data/commit-${{ steps.metadata.outputs.SHORT_SHA }}
publish_branch: data
publish_dir: ./target/criterion
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
commit_message: "add benchmark data"
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}