Forge: add Incus VM runner spec #4136
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
| # Spring AOT smoke gate: when a PR's metadata change affects a Spring AOT project, runs the | |
| # triaged native tests (run-spring-aot-triaged-test.sh, §CI-shared-scripts) for the impacted | |
| # projects. §CI-test-affected-spring-aot; conditional gate of §FS-repository-functional-spec.5.3. | |
| name: "Test affected Spring AOT smoke tests (4.1.x)" | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}" | |
| cancel-in-progress: true | |
| jobs: | |
| discover-impacted-tests: | |
| name: "📋 Compute impacted Spring AOT tests (4.1.x)" | |
| runs-on: "ubuntu-latest" | |
| timeout-minutes: 20 | |
| outputs: | |
| matrix: ${{ steps.impact.outputs.matrix }} | |
| none-found: ${{ steps.impact.outputs['none-found'] }} | |
| relevant-files-changed: ${{ steps.filter.outputs.changed }} | |
| steps: | |
| - name: "☁️ Checkout repository" | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: "🔎 Detect relevant file changes" | |
| id: filter | |
| uses: ./.github/actions/detect-file-changes | |
| with: | |
| file-patterns: | | |
| - 'metadata/**' | |
| - name: "🔧 Setup Java (GraalVM 25 for metadata harness)" | |
| if: steps.filter.outputs.changed == 'true' | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: 'graalvm' | |
| java-version: '25' | |
| - name: "☁️ Checkout spring-aot-smoke-tests (4.1.x)" | |
| if: steps.filter.outputs.changed == 'true' | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| repository: spring-projects/spring-aot-smoke-tests | |
| ref: 'main' | |
| path: spring-aot-smoke-tests | |
| fetch-depth: 0 | |
| - name: "🧮 Discover impacted smoke tests (aggregate for all changed coordinates)" | |
| id: impact | |
| if: steps.filter.outputs.changed == 'true' | |
| run: | | |
| ./gradlew generateAffectedSpringTestMatrix \ | |
| -PbaseCommit=${{ github.event.pull_request.base.sha }} \ | |
| -PnewCommit=${{ github.event.pull_request.head.sha }} \ | |
| -PspringAotBranch=main \ | |
| -PspringAotPath='${{ github.workspace }}/spring-aot-smoke-tests' | |
| echo "Impacted tests: '${{ steps.impact.outputs.impacted_tests || '' }}'" | |
| test-affected-spring-aot: | |
| name: "🧪 ${{ matrix.project }} @ spring-aot:4.1.x (GraalVM JDK ${{ matrix.java }})" | |
| if: needs.discover-impacted-tests.outputs.relevant-files-changed == 'true' && needs.discover-impacted-tests.result == 'success' && needs.discover-impacted-tests.outputs.none-found != 'true' && github.repository == 'oracle/graalvm-reachability-metadata' | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 480 | |
| needs: discover-impacted-tests | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.discover-impacted-tests.outputs.matrix) }} | |
| steps: | |
| - name: "☁️ Checkout repository" | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: "🔧 Setup Java for spring harness" | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: 'graalvm' | |
| java-version: '17.0.12' | |
| - name: "🛠️ Setup latest native-build-tools snapshot" | |
| uses: ./.github/actions/setup-native-build-tools | |
| - name: "🔧 Install GraalVM for smoke tests" | |
| uses: graalvm/setup-graalvm@60c26726de13f8b90771df4bc1641a52a3159994 # v1 | |
| with: | |
| distribution: 'graalvm' | |
| java-version: ${{ matrix.java }} | |
| set-java-home: 'false' | |
| native-image-job-reports: 'true' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: "☁️ Checkout spring-aot-smoke-tests (4.1.x)" | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| repository: spring-projects/spring-aot-smoke-tests | |
| ref: 'main' | |
| path: spring-aot-smoke-tests | |
| fetch-depth: 0 | |
| - name: "🧪 Run nativeTest and nativeAppTest for ${{ matrix.project }}" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| bash .github/workflows/scripts/run-spring-aot-triaged-test.sh '${{ github.workspace }}/spring-aot-smoke-tests' '${{ matrix.project }}' 4.1.x | |
| all-affected-passed: | |
| name: "🧪 All affected Spring AOT smoke tests passed (4.1.x)" | |
| runs-on: "ubuntu-latest" | |
| timeout-minutes: 5 | |
| needs: [discover-impacted-tests, test-affected-spring-aot] | |
| if: always() | |
| steps: | |
| - name: "All tests passed" | |
| if: needs.test-affected-spring-aot.result == 'success' || needs.discover-impacted-tests.outputs.relevant-files-changed == 'false' || needs.discover-impacted-tests.outputs.none-found == 'true' | |
| run: exit 0 | |
| - name: "Some tests failed" | |
| if: needs.test-affected-spring-aot.result == 'failure' | |
| run: exit 1 |