-
Notifications
You must be signed in to change notification settings - Fork 85
51 lines (47 loc) · 1.47 KB
/
benchmark-auto-pr.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
name: Benchmark
on:
push:
branches: [main]
pull_request:
paths:
- '.github/workflows/benchmark-auto-pr.yml'
jobs:
benchmark:
permissions:
pull-requests: write
id-token: write
runs-on: ubuntu-latest-8-cores
strategy:
matrix:
runtimes: [centrifuge, altair]
env:
RUST_TOOLCHAIN: "1.66.0"
RUSTC_WRAPPER: "sccache"
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: 'main'
- name: Prep build on Ubuntu
uses: ./.github/actions/prep-ubuntu
with:
RUST_TOOLCHAIN: ${{ env.RUST_TOOLCHAIN }}
cache: enabled
# Cache needs Google credentials:
GWIP: ${{ secrets.GWIP_SCCACHE }}
GSA: ${{ secrets.GSA_SCCACHE }}
- name: Run Benchmark ${{ matrix.runtimes }}
run: ./scripts/runtime_benchmarks.sh ${{ matrix.runtimes }}
- name: Create PR with new benchmarks
uses: peter-evans/create-pull-request@v5
with:
add-paths: runtime/${{ matrix.runtimes }}/src/weights/
commit-message: "New benchmark weights generated from main by Github Actions Bot"
base: main
branch: benchmarks/
delete-branch: true
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: ${{steps.parse-runtime.outputs.result}}-weights
# path: runtime/${{steps.parse-runtime.outputs.result}}/src/weights/