-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (39 loc) · 1.12 KB
/
bench_criterion.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
name: Criterion Benchmark
on:
push:
branches:
- master
jobs:
benchmark:
name: Performance regression check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
# Install Rust (stable)
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
# Run benchmark, storing in target/criterion
- name: Run benchmark
run: cargo bench
- name: Git Commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
mv target/criterion ../criterion
rm -rf .github
rm -rf *
mv ../criterion ./criterion
git add .
git commit -m "Criterion Update"
# Get old benches (if any)
- name: Push to Branch
uses: ad-m/github-push-action@master
with:
branch: criterion
force: true
github_token: ${{ secrets.GITHUB_TOKEN }}