Benchmark #9
Workflow file for this run
This file contains hidden or 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 | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| run_id: | |
| description: "Workflow run ID of a successful build" | |
| required: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| steps: | |
| - name: Get workflow run info | |
| id: get_run_info | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const { data: run } = await github.rest.actions.getWorkflowRun({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| run_id: ${{ github.event.inputs.run_id }} | |
| }); | |
| core.setOutput('commit_sha', run.head_sha); | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ steps.get_run_info.outputs.commit_sha }} | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 17 | |
| distribution: "zulu" | |
| - name: Download JARs from specified run | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: jars | |
| run-id: ${{ github.event.inputs.run_id }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path: jars/ | |
| - name: Get version from POM | |
| id: get_version | |
| run: | | |
| VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout -f utilities/pom.xml) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Install library runtime | |
| run: | | |
| mvn install:install-file \ | |
| -Dfile=jars/library-runtime/target/library-runtime-${{ steps.get_version.outputs.version }}.jar \ | |
| -DpomFile=library-runtime/pom.xml \ | |
| -DgroupId=au.csiro.pathling \ | |
| -DartifactId=library-runtime \ | |
| -Dversion=${{ steps.get_version.outputs.version }} \ | |
| -Dpackaging=jar | |
| - name: Build benchmark JAR | |
| run: mvn --batch-mode package -pl benchmark | |
| - name: Run benchmark | |
| run: | | |
| java -Xshare:off -Xmx8g -ea -Duser.timezone=UTC \ | |
| --add-exports=java.base/sun.nio.ch=ALL-UNNAMED \ | |
| --add-opens=java.base/java.net=ALL-UNNAMED \ | |
| -jar benchmark/target/benchmark-${{ steps.get_version.outputs.version }}.jar \ | |
| -rf json -rff benchmark.json | |
| - name: Save results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-results | |
| path: benchmark.json |