#17: Add workflow to merge greeks when closing an issue. #120
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
# Run JMH performance micro-benchmarks and publish results to Gists | |
name: Benchmark Tests | |
on: | |
push: | |
branches: [ alpha, beta/* ] | |
jobs: | |
benchmark: | |
name: Benchmark on Java 8 (Zulu) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 8 | |
distribution: zulu | |
- name: Build Test Classes | |
run: mvn -B dependency:build-classpath -Dmdep.outputFile=cp.txt test-compile | |
- name: Run Benchmarks | |
id: run-benchmark | |
run: | | |
echo "results" | | |
java -cp ./target/classes:./target/test-classes:$(cat cp.txt) org.udtopia.BaseBenchmark | |
# Gists don't like slashes | |
- name: Clean Ref Name | |
id: clean-ref | |
run: echo "CLEAN_REF=${GITHUB_REF_NAME////-}" >> $GITHUB_ENV | |
# Copy the JMH results JSON file to update a Gist, as the data source of jmh.morethan.io charts | |
- name: Publish JMH Results to Permanent Gist | |
uses: exuanbo/actions-deploy-gist@v1 | |
with: | |
token: ${{ secrets.GIST_TOKEN }} | |
gist_id: a1c976a7a3fedd8f0314ed295f5209a0 | |
gist_description: "UDTopia Benchmarks ${{ github.ref_name }} #${{ github.run_number }}" | |
gist_file_name: "${{ env.CLEAN_REF }} (latest).json" | |
file_path: "./results/benchmarks/results.json" | |
- name: Generate Results Link | |
run: | | |
echo "Updated latest benchmark result:" | |
echo " https://jmh.morethan.io/?gist=a1c976a7a3fedd8f0314ed295f5209a0" |