build: Add maven build cache #3888
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: Full Build | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| jre: [17] | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| include: | |
| - jre: 21 | |
| os: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK ${{ matrix.jre }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.jre }} | |
| distribution: 'temurin' | |
| - name: Restore Maven cache | |
| uses: skjolber/maven-cache-github-action@v3.1.1 | |
| with: | |
| step: restore | |
| - name: Install | |
| run: mvn clean install -DskipTests -q -P gradlePlugin | |
| - name: Build | |
| run: mvn clean package -P gradlePlugin | |
| env: | |
| BUILD_PORT: 0 | |
| BUILD_SECURE_PORT: 0 | |
| BUILD_LOG_LEVEL: 'ERROR' | |
| - name: Save Maven Cache | |
| uses: skjolber/maven-cache-github-action@v3.1.1 | |
| with: | |
| step: save | |
| - name: Test Result | |
| uses: mikepenz/action-junit-report@v5 | |
| if: failure() | |
| with: | |
| check_name: JUnit ${{ matrix.kind }} ${{ matrix.jre }} ${{ matrix.os }} | |
| report_paths: '*/target/*/TEST-*.xml' |