Benchmark #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Benchmark | |
on: | |
workflow_dispatch: # Manual trigger | |
jobs: | |
benchmark: | |
name: Performance check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current branch (full) | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: coursier/setup-action@main | |
with: | |
jvm: temurin@17 | |
apps: mill | |
# Run benchmark with `go test -bench` and stores the output to a file | |
- name: Run benchmark | |
run: mill benchmark.runJmh -jvmArgs --add-modules=jdk.incubator.vector -rf json | |
# Download previous benchmark result from cache (if exists) | |
- name: Download previous benchmark data | |
uses: actions/cache@v4 | |
with: | |
path: ./cache | |
key: ${{ runner.os }}-benchmark-${{ github.ref }} // cache against branch name | |
# Run `github-action-benchmark` action | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
tool: 'jmh' | |
output-file-path: out/benchmark/runJmh.dest/jmh-result.json | |
external-data-json-path: ./cache/benchmark-data.json | |
fail-on-alert: true | |
ref: ${{ github.sha }} | |
skip-fetch-gh-pages: true | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Save branch results | |
uses: actions/cache/save@v4 | |
with: | |
path: out/benchmark/runJmh.dest/jmh-result.json | |
key: ${{ runner.os }}-benchmark-${{ github.ref }} |