Update GH Actions to JDK 17 #29
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 with JMH | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '**bench**' | |
- '**Cheese**.java' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
# For commenting alerts on commits | |
contents: write | |
jobs: | |
benchmark: | |
name: Performance regression check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Install BMUtils | |
run: mvn clean install | |
- name: Compile benchmark | |
run: mvn -f benchmark/pom.xml clean verify | |
- name: Run benchmark | |
run: java -jar benchmark/target/benchmarks.jar -rf json | |
- name: Store benchmark result - separate results repo | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: JMH Benchmark | |
tool: 'jmh' | |
output-file-path: jmh-result.json | |
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
auto-push: true | |
gh-repository: 'github.com/TechnicJelle/BMUtils-PerformanceReports' | |
gh-pages-branch: 'main' | |
benchmark-data-dir-path: './' | |
- name: Cleanup before alerting | |
run: rm -rf ./benchmark-data-repository | |
- name: Alert on performance regression | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: JMH Benchmark | |
tool: 'jmh' | |
output-file-path: jmh-result.json | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
# Show alert with commit comment on detecting possible performance regression | |
alert-threshold: '200%' | |
comment-on-alert: true | |
alert-comment-cc-users: '@TechnicJelle' | |
fail-on-alert: true | |
save-data-file: false | |
# These are still necessary here for some reason: | |
auto-push: false | |
gh-repository: 'github.com/TechnicJelle/BMUtils-PerformanceReports' | |
gh-pages-branch: 'main' | |
benchmark-data-dir-path: './' |