-
Notifications
You must be signed in to change notification settings - Fork 1.5k
53 lines (44 loc) · 1.47 KB
/
test-bench.yml
File metadata and controls
53 lines (44 loc) · 1.47 KB
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
name: Benchmarks
on:
workflow_dispatch:
workflow_call:
inputs:
cache-warming-only:
description: "Compile test binaries only; skip test execution (for cache warming runs)"
type: boolean
default: false
defaults:
run:
shell: bash
jobs:
benchmarks:
runs-on: ubuntu-24.04
steps:
- name: Checkout custom actions
uses: actions/checkout@v6
with:
fetch-depth: 1
# No submodules or LFS needed: benchmark functions only use
# in-memory or local testdata/ files. Space cleanup is needed
# for the cache-warming path (go test -run=^$ ./...) which
# compiles test binaries for every package.
- uses: ./.github/actions/setup-erigon
id: erigon
with:
cleanup-space: true
- name: Run benchmarks
if: '!inputs.cache-warming-only'
run: make test-bench
- name: Build test binaries (cache warming)
if: inputs.cache-warming-only
run: go test -run=^$ ./...
- uses: ./.github/actions/cleanup-erigon
if: always()
# In the merge queue, cancel the run on first failure so the gate
# doesn't stall waiting for still-running siblings. PR runs keep
# going so authors see the full failure picture.
- name: Cancel workflow run on failure
if: failure() && github.event_name == 'merge_group'
env:
GH_TOKEN: ${{ github.token }}
run: gh run cancel ${{ github.run_id }} || true