-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.29 KB
/
continuous-benchmarks.yaml
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
on: push
name: Continuous Benchmarks
jobs:
build:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/git-identity
- uses: ./.github/workflows/custom/before-install
if: hashFiles('.github/workflows/custom/before-install/action.yml') != ''
- uses: ./.github/workflows/install
with:
r-version: ${{ matrix.config.r }}
cache-version: cb-1
token: ${{ secrets.GITHUB_TOKEN }}
extra-packages: r-lib/bench
needs: check
- uses: ./.github/workflows/custom/after-install
if: hashFiles('.github/workflows/custom/after-install/action.yml') != ''
- name: Run benchmarks
run: |
success <- FALSE
for (i in 1:100) {
message("Attempt ", i)
bench::cb_fetch()
bench::cb_run()
tryCatch(
{
bench::cb_push()
success <- TRUE
break
},
error = identity
)
system("git push . :refs/notes/benchmarks")
}
stopifnot(success)
shell: Rscript {0}
- name: Show benchmarks
run: git notes --ref benchmarks show