Run Benchmarks #78
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: Run Benchmarks | |
on: | |
workflow_run: | |
workflows: [Automated Release] | |
types: | |
- completed | |
env: | |
JAVA_VERSION: 17 | |
JAVA_PACKAGE: jdk | |
JAVA_ARCH: x64 | |
JAVA_DISTRO: temurin | |
jobs: | |
benchmarks: | |
name: Benchmarks | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
benchmark: [codegen, dao] | |
steps: | |
- id: checkout | |
name: Clone Git Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: last_release | |
name: Fetch last release info | |
run: echo "tag=$(gh release view --json tagName --jq '.tagName')" >> $GITHUB_OUTPUT | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- id: java | |
name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
java-package: ${{ env.JAVA_PACKAGE }} | |
architecture: ${{ env.JAVA_ARCH }} | |
distribution: ${{ env.JAVA_DISTRO }} | |
cache: maven | |
- id: run-benchmark | |
name: Run Benchmark [${{ matrix.benchmark }}] | |
run: mvn --batch-mode --projects yosql-benchmarks/yosql-benchmarks-${{ matrix.benchmark }} --also-make --activate-profiles benchmarks verify --define org.slf4j.simpleLogger.log.yosql=warn --define skipTests 2>&1 1> build.log | |
- id: copy-results | |
name: Copy ${{ matrix.benchmark }} Results | |
run: cp --force ./yosql-benchmarks/yosql-benchmarks-${{ matrix.benchmark }}/target/benchmark/yosql-benchmarks-${{ matrix.benchmark }}.json ./yosql-website/content/benchmarks/results/yosql-benchmarks-${{ matrix.benchmark }}-${{ steps.last_release.outputs.tag }}.json | |
- id: replace-results | |
name: Replace CURRENT ${{ matrix.benchmark }} Results | |
run: cp --force ./yosql-benchmarks/yosql-benchmarks-${{ matrix.benchmark }}/target/benchmark/yosql-benchmarks-${{ matrix.benchmark }}.json ./yosql-website/content/benchmarks/results/yosql-benchmarks-${{ matrix.benchmark }}-CURRENT.json | |
- id: push | |
name: Push Changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Update benchmark data for ${{ steps.last_release.outputs.tag }} | |
file_pattern: yosql-website/*.json |