Fix CFG builder crash when preprocessor directives span across elsif boundaries #14487
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: Java CI | |
| on: | |
| push: | |
| branches-ignore: | |
| - "translations_*" | |
| pull_request: | |
| jobs: | |
| gatekeeper: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' && startsWith(github.head_ref, 'translations_') == false || github.event_name == 'push' | |
| steps: | |
| - run: echo 'Open the Golden Gate' | |
| check-pr-exists: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| has_pr: ${{ steps.check.outputs.has_pr }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Check if PR exists for this branch | |
| id: check | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| result=$(.github/scripts/check-pr-exists.sh "${{ github.event_name }}" "${{ github.ref_name }}" "${{ github.repository }}") | |
| echo "has_pr=$result" >> $GITHUB_OUTPUT | |
| build: | |
| needs: [gatekeeper, check-pr-exists] | |
| if: needs.gatekeeper.result == 'success' && needs.check-pr-exists.outputs.has_pr != 'true' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java_version: ['17', '21', '25'] | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK ${{ matrix.java_version }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ matrix.java_version }} | |
| distribution: 'corretto' | |
| cache: gradle | |
| - name: Build with Gradle | |
| run: ./gradlew check --stacktrace | |
| - name: Archive test results | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: Test Results (Java ${{ matrix.java_version }}.${{ matrix.os }}) | |
| path: "**/test-results/test/**/*.xml" | |
| - name: Publish Test report | |
| if: failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: junit_report_${{ matrix.os }}_${{ matrix.java_version }} | |
| path: build/reports/tests/test | |
| publish-test-results: | |
| needs: [gatekeeper, check-pr-exists, build] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| contents: read | |
| issues: read | |
| if: always() && needs.gatekeeper.result == 'success' && needs.check-pr-exists.outputs.has_pr != 'true' | |
| steps: | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| path: artifacts | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| with: | |
| junit_files: "artifacts/**/*.xml" | |