Merge remote-tracking branch 'origin/main' into SRU2026 #143
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
| # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
| name: Java CI with Gradle | |
| on: | |
| push: | |
| branches: [ "main", "SRU2025-java8-maintenance", "SRU2026" ] | |
| # pull_request: | |
| # branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Set up JDK 11 for current development branches (main, next SRU) | |
| - name: Set up JDK 11 | |
| if: github.ref != 'refs/heads/SRU2025-java8-maintenance' && github.head_ref != 'SRU2025-java8-maintenance' | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| # Set up JDK 8 only for the legacy Java 8 maintenance branch | |
| - name: Set up JDK 8 | |
| if: github.ref == 'refs/heads/SRU2025-java8-maintenance' || github.head_ref == 'SRU2025-java8-maintenance' | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '8' | |
| distribution: 'temurin' | |
| # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. | |
| # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Build with Gradle Wrapper | |
| run: ./gradlew -Dorg.gradle.jvmargs="-Xms512m -Xmx7g" compileJava compileTestJava | |
| - name: Run test | |
| run: ./gradlew test --info | |
| # This job generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. | |
| # We only run it on the default branch (main) to avoid duplicate alerts from maintenance branches. | |
| dependency-submission: | |
| if: github.ref == 'refs/heads/main' || github.head_ref == 'main' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. | |
| # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md | |
| - name: Generate and submit dependency graph | |
| uses: gradle/actions/dependency-submission@v4 | |
| with: | |
| dependency-graph-exclude-projects: ':buildSrc' |