-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
34 additions
and
102 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,45 @@ | ||
name: Benchmark | ||
name: Minimal setup | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- testyml | ||
pull_request: | ||
branches: | ||
- master | ||
- testyml | ||
# branches: | ||
# - master | ||
# - testyml | ||
# - testmerge | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
build: | ||
benchmark: | ||
name: Performance regression check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "stable" | ||
# Run benchmark with `go test -bench` and stores the output to a file | ||
- name: Run benchmark | ||
run: go test -bench 'BenchmarkFib' | tee output.txt | ||
# Download previous benchmark result from cache (if exists) | ||
- name: Download previous benchmark data | ||
uses: actions/cache@v1 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- name: Build and run JMH benchmark | ||
run: | | ||
./gradlew jmh | ||
ls -a | ||
cd lib | ||
ls -a | ||
cd build | ||
ls -a | ||
cd results | ||
ls -a | ||
cd jmh | ||
ls -a | ||
- name: JMH Benchmark Action | ||
uses: kitlangton/jmh-benchmark-action@main | ||
path: ./cache | ||
key: ${{ runner.os }}-benchmark | ||
# Run `github-action-benchmark` action | ||
- name: Store benchmark result | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
jmh-output-path: ./lib/results.json | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# What benchmark tool the output.txt came from | ||
tool: 'jmh' | ||
# Where the output from the benchmark tool is stored | ||
output-file-path: lib/build/results/jmh/results.json | ||
# Where the previous data file is stored | ||
external-data-json-path: ./cache/benchmark-data.json | ||
# Workflow will fail when an alert happens | ||
fail-on-alert: true | ||
# GitHub API token to make a commit comment | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# Enable alert commit comment | ||
comment-on-alert: true | ||
# Enable Job Summary for PRs | ||
summary-always: true | ||
# Mention @rhysd in the commit comment | ||
alert-comment-cc-users: '@felldo' | ||
# Upload the updated cache file for the next job by actions/cache |
This file was deleted.
Oops, something went wrong.