Repository navigation
Bump actions/setup-java from 6.1.0 to 6.2.0 in the actions group #2782
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: Build | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - v* | |
| push: | |
| branches: | |
| - main | |
| - v* | |
| workflow_call: {} | |
| workflow_dispatch: {} | |
| jobs: | |
| validate: | |
| name: Validate | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| ### | |
| ### Lint configuration files. | |
| ### | |
| - name: Validate codecov.yml | |
| shell: bash | |
| if: ${{ ! cancelled() }} | |
| run: curl -si --fail-with-body --data-binary @codecov.yml https://codecov.io/validate | |
| ### | |
| ### Lint Java, export information about current environment for | |
| ### the next jobs to utilise. | |
| ### | |
| - name: Initialize Java | |
| uses: actions/setup-java@v6.2.0 | |
| if: always() | |
| with: | |
| cache: maven | |
| distribution: zulu | |
| java-version: 25 | |
| - name: Validate license headers and code style | |
| shell: bash | |
| if: ${{ ! cancelled() }} | |
| # Purposely compile here so errorprone can run when we turn it on | |
| run: ./mvnw -B validate compile test-compile -DskipTests | |
| build: | |
| name: Build on JDK ${{ matrix.java-version }} (${{ matrix.os-name }}) | |
| runs-on: ${{ matrix.os-name }} | |
| needs: | |
| - validate | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os-name: [ubuntu-latest] | |
| java-version: | |
| - 21 # LTS | |
| - 25 # LTS | |
| include: | |
| - os-name: windows-11-arm | |
| java-version: 23 # Latest Temurin for ARM | |
| - os-name: macos-latest | |
| java-version: 21 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 2 | |
| - name: Initialize JDK | |
| uses: actions/setup-java@v6.2.0 | |
| with: | |
| check-latest: true | |
| distribution: temurin | |
| java-version: ${{ matrix.java-version }} | |
| - name: Maven cache | |
| uses: actions/cache@v6 | |
| env: | |
| cache-name: maven-cache | |
| with: | |
| path: | |
| ~/.m2 | |
| key: build-${{ env.cache-name }} | |
| - name: Compile and run tests | |
| shell: bash | |
| run: ./mvnw -B -U clean verify | |
| - name: Publish code coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| continue-on-error: true | |
| if: ${{ ! cancelled() }} | |
| with: | |
| flags: java-${{ matrix.java-version }}-${{ matrix.os-name }} | |
| report_type: coverage | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Publish test results to Codecov | |
| uses: codecov/codecov-action@v5 | |
| if: ${{ ! cancelled() }} | |
| with: | |
| flags: java-${{ matrix.java-version }}-${{ matrix.os-name }} | |
| report_type: test_results | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload build logs as artifacts | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: jdk-${{ matrix.java-version }}-${{ matrix.os-name }} | |
| path: |- | |
| **/build.log | |
| **/maven-status/** | |
| **/*-reports/**.txt | |
| **/*-reports/**.xml | |
| **/*.dumpstream | |
| compression-level: 9 | |
| retention-days: 7 | |
| include-hidden-files: true | |
| if-no-files-found: warn |