Henrik: Final Report related performance and correctness fixes #2159
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: Run QT3 Suite | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| env: | |
| JAVA_VERSION: "17" | |
| jobs: | |
| resolve-baseline: | |
| name: Resolve Baseline | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| outputs: | |
| baseline_run_id: ${{ steps.find-baseline.outputs.baseline_run_id }} | |
| steps: | |
| - name: Find baseline run | |
| id: find-baseline | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const workflowId = 'run-qt3.yml'; | |
| const branch = context.eventName === 'pull_request' | |
| ? context.payload.pull_request.base.ref | |
| : context.ref.replace('refs/heads/', ''); | |
| const event = 'push'; | |
| const runs = await github.paginate(github.rest.actions.listWorkflowRuns, { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| workflow_id: workflowId, | |
| branch, | |
| event, | |
| status: 'completed', | |
| per_page: 100 | |
| }); | |
| async function hasBaselineArtifacts(runId) { | |
| const artifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| run_id: runId, | |
| per_page: 100 | |
| }); | |
| const available = new Set( | |
| artifacts | |
| .filter((artifact) => !artifact.expired) | |
| .map((artifact) => artifact.name) | |
| ); | |
| return ( | |
| available.has('surefire-all-jsoniq') && | |
| available.has('surefire-all-xquery') | |
| ); | |
| } | |
| let baselineRun = null; | |
| for (const run of runs) { | |
| if (run.conclusion !== 'success') { | |
| continue; | |
| } | |
| if (run.id === context.runId) { | |
| continue; | |
| } | |
| if (await hasBaselineArtifacts(run.id)) { | |
| baselineRun = run; | |
| break; | |
| } | |
| } | |
| const baselineRunId = baselineRun ? String(baselineRun.id) : ''; | |
| core.info( | |
| baselineRunId | |
| ? `Using baseline run ${baselineRunId} from branch ${branch}.` | |
| : `No successful baseline run with unexpired QT3 artifacts found for branch ${branch}.` | |
| ); | |
| core.setOutput('baseline_run_id', baselineRunId); | |
| build: | |
| name: Build RumbleDB | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout caller (RumbleDB) | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: ${{ env.JAVA_VERSION }} | |
| - name: Build RumbleDB | |
| run: mvn -B -q clean compile assembly:single | |
| - name: Upload RumbleDB target | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: rumble-build | |
| path: target | |
| retention-days: 1 | |
| qt3-jsoniq: | |
| needs: [resolve-baseline, build] | |
| uses: RumbleDB/rumble-test-suite/.github/workflows/qt3-suite.yml@master | |
| with: | |
| tested_parser: jsoniq | |
| rumble_artifact_name: rumble-build | |
| baseline_run_id: ${{ needs.resolve-baseline.outputs.baseline_run_id }} | |
| qt3-xquery: | |
| needs: [resolve-baseline, build] | |
| uses: RumbleDB/rumble-test-suite/.github/workflows/qt3-suite.yml@master | |
| with: | |
| tested_parser: xquery | |
| rumble_artifact_name: rumble-build | |
| baseline_run_id: ${{ needs.resolve-baseline.outputs.baseline_run_id }} | |
| post-results: | |
| name: Post Results | |
| needs: [qt3-jsoniq, qt3-xquery] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| steps: | |
| - name: Post JSONiq QT3 comment | |
| uses: mshick/add-pr-comment@v3 | |
| with: | |
| message-id: qt3-results-jsoniq | |
| comment-target: ${{ github.event_name == 'pull_request' && 'pr' || 'commit' }} | |
| message: ${{ needs.qt3-jsoniq.outputs.ci_comment }} | |
| - name: Post XQuery QT3 comment | |
| uses: mshick/add-pr-comment@v3 | |
| with: | |
| message-id: qt3-results-xquery | |
| comment-target: ${{ github.event_name == 'pull_request' && 'pr' || 'commit' }} | |
| message: ${{ needs.qt3-xquery.outputs.ci_comment }} |