-
-
Notifications
You must be signed in to change notification settings - Fork 19
44 lines (39 loc) · 1.42 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
name: Benchmark
# only one can tun at a time.
# Actions access a common cache entry and may corrupt it.
concurrency: cd-benchmark-${{ github.ref }}
on:
push:
branches:
- master
- benchmark # For debugging
pull_request:
branches:
- master
jobs:
benchmark:
runs-on: ubuntu-latest
# Don't run on forks. Forks don't have access to the S3 credentials and the workflow will fail
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v4
with:
cache: yarn
node-version: 20
- run: yarn --immutable && yarn build && yarn generate
- name: Run benchmarks
run: yarn benchmark
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# benchmark options
BENCHMARK_S3: true
# S3 credentials
S3_ACCESS_KEY: ${{ secrets.S3_BENCH_LODESTAR_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_BENCH_LODESTAR_SECRET_KEY }}
S3_REGION: ${{ secrets.S3_BENCH_LODESTAR_REGION }}
S3_BUCKET: ${{ secrets.S3_BENCH_LODESTAR_BUCKET }}
S3_ENDPOINT: ${{ secrets.S3_BENCH_LODESTAR_ENDPOINT }}
# Key prefix to separate benchmark data from multiple repositories
S3_KEY_PREFIX: ${{ github.repository }}/${{ runner.os }}