Add GitHub Actions workflow for benchmarking GC performance
This commit is contained in:
45
.github/workflows/benchmark-gc.yml
vendored
Normal file
45
.github/workflows/benchmark-gc.yml
vendored
Normal 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
|
||||
Reference in New Issue
Block a user