Add GitHub Actions workflow for benchmarking GC performance

This commit is contained in:
2025-09-25 13:13:39 -05:00
parent 49ca73ab3a
commit 982c173760

45
.github/workflows/benchmark-gc.yml vendored Normal file
View File

@@ -0,0 +1,45 @@
# TODO: Add full length action hashes for all actions
name: Benchmark GC Performance
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
permissions:
contents: read
actions: write
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.25'
- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: go mod download
- name: Run benchmark (standard GC)
run: make bench
- name: Run benchmark (experimental GC)
run: make bench-experimental