-
Notifications
You must be signed in to change notification settings - Fork 84
69 lines (63 loc) · 2.2 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Benchmark PR
on:
push:
branches: [main]
pull_request:
paths:
- '.github/workflows/benchmark-auto-pr.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
benchmark:
permissions:
pull-requests: write
contents: 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
- 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: Checkout code
# uses: actions/checkout@v3
# with:
# ref: 'main'
- name: Run Benchmark ${{ matrix.runtimes }}
run: ./scripts/runtime_benchmarks.sh ${{ matrix.runtimes }}
- run: echo "NOW=$(date -u +%Y-%m-%d)" >> $GITHUB_ENV
- name: Create PR with new benchmarks
uses: peter-evans/create-pull-request@v5
with:
add-paths: runtime/${{ matrix.runtimes }}/src/weights/
base: main
branch: benchmarks/${{ matrix.runtimes }}-${{ env.NOW }}
delete-branch: true
reviewers: ${{ github.actor }}
draft: true
labels: gha, benchmarks
commit-message: "New benchmark weights generated from main by Github Actions Bot"
title: New benchmark weights for ${{ matrix.runtimes }}
body: |
Automated PR generated by Benchmark PR Github Actions job
Runtime: ${{ matrix.runtimes }}
Commit that triggered:
${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.runtimes }}-weights
# path: runtime/${{ matrix.runtimes }}/src/weights/