Shade antlr dependency for partiql-parser and partiql-lang (#1439) #221
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
## | |
# JMH Benchmarks Workflow (Main) | |
# - Runs the JMH benchmarks. | |
# - On alert, notifies the PartiQL team, the actor, and the commit author. | |
# - Places the results in the project's GH pages. | |
## | |
name: JMH Benchmarks (Main) | |
on: | |
push: | |
branches: | |
- main | |
env: | |
JMH_RESULTS_PATH_FROM_ROOT: partiql-lang/build/reports/jmh/results.json | |
JMH_RESULTS_PATH: build/reports/jmh/results.json | |
AUTHOR: "@${{ github.event.commits[0].author.username }}" | |
REPO: "@${{ github.repository }}" | |
REPO_OWNER: "@${{ github.repository_owner }}" | |
ACTOR: "@${{ github.actor }}" | |
permissions: | |
contents: write | |
deployments: write | |
jobs: | |
benchmark: | |
name: Run JMH Benchmarks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: '11' | |
- name: Print Environment Variables | |
run: | | |
echo "Owner: ${{ env.REPO_OWNER }}" | |
echo "Repo: ${{ env.REPO }}" | |
echo "Actor: ${{ env.ACTOR }}" | |
echo "Author: ${{ env.AUTHOR }}" | |
- name: Run Benchmark | |
run: | | |
./gradlew :partiql-lang:jmh \ | |
-Piterations=10 \ | |
-PwarmupIterations=5 \ | |
-Pfork=2 \ | |
-PresultsFile="${{ env.JMH_RESULTS_PATH }}" | |
- name: Store Benchmark Result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: JMH Benchmark | |
tool: 'jmh' | |
output-file-path: ${{ env.JMH_RESULTS_PATH_FROM_ROOT }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
auto-push: true | |
comment-always: true | |
comment-on-alert: true | |
alert-threshold: '250%' | |
fail-on-alert: true | |
alert-comment-cc-users: "${{ env.AUTHOR }},${{ env.ACTOR }},${{ env.REPO_OWNER }}" |