13 runs-on: ubuntu-latest
18 benchmark: [codegen, dao]
21 name: Clone Git Repository
22 uses: actions/checkout@v4
26 name: Fetch last release info
27 run: echo "tag=$(gh release view --json tagName --jq '.tagName')" >> $GITHUB_OUTPUT
29 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32 uses: actions/setup-java@v4
34 java-version: ${{ env.JAVA_VERSION }}
35 java-package: ${{ env.JAVA_PACKAGE }}
36 architecture: ${{ env.JAVA_ARCH }}
37 distribution: ${{ env.JAVA_DISTRO }}
40 name: Run Benchmark [${{ matrix.benchmark }}]
41 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
43 name: Copy ${{ matrix.benchmark }} Results
44 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
46 name: Replace CURRENT ${{ matrix.benchmark }} Results
47 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
50 uses: stefanzweifel/git-auto-commit-action@v5
52 commit_message: Update benchmark data for ${{ steps.last_release.outputs.tag }}
53 file_pattern: yosql-website/*.json
55 name: Create Pull Request
56 uses: peter-evans/create-pull-request@v5
58 token: ${{ secrets.PAT }}
59 commit-message: Update benchmarks for latest release
60 committer: GitHub <noreply@github.com>
61 author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
62 title: Update benchmarks for latest release
63 body: ${{ steps.gwu.outputs.version-information }}
73 branch: update-benchmarks
75 - name: Enable Pull Request Automerge
76 if: steps.cpr.outputs.pull-request-operation == 'created'
77 run: gh pr merge --rebase --auto "${{ steps.cpr.outputs.pull-request-number }}"
79 token: ${{ secrets.PAT }}