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: Test cache option with dependency paths 'maven', 'gradle', 'sbt' | |
on: | |
push: | |
branches: | |
- jetbrains-test | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest, macos-13, ubuntu-24.04-arm, windows-11-arm] | |
build-system: ['maven', 'gradle', 'sbt'] | |
include: | |
- build-system: 'sbt' | |
os: macos-12 # Override to use macOS-12 specifically for SBT builds | |
exclude: | |
- build-system: 'sbt' | |
os: macos-latest # Exclude macos-latest specifically for SBT builds | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Java with Maven cache | |
if: matrix.build-system == 'maven' | |
uses: priyagupta108/setup-java@jetbrains-fix-test | |
with: | |
distribution: 'jetbrains' | |
java-version: '21' | |
cache: 'maven' | |
cache-dependency-path: 'pom.xml' | |
- name: Set up Java with Gradle cache | |
if: matrix.build-system == 'gradle' | |
uses: priyagupta108/setup-java@jetbrains-fix-test | |
with: | |
distribution: 'jetbrains' | |
java-version: '21' | |
cache: 'gradle' | |
cache-dependency-path: | | |
*.gradle* | |
**/gradle-wrapper.properties | |
- name: Set up Java with sbt cache | |
if: matrix.build-system == 'sbt' | |
uses: priyagupta108/setup-java@jetbrains-fix-test | |
with: | |
distribution: 'jetbrains' | |
java-version: '21' | |
cache: 'sbt' | |
cache-dependency-path: build.sbt | |
- name: Build with Maven | |
if: matrix.build-system == 'maven' | |
run: mvn -B package --file pom.xml | |
- name: Build with Gradle | |
if: matrix.build-system == 'gradle' | |
run: ./gradlew build --no-daemon | |
- name: Build with SBT | |
if: matrix.build-system == 'sbt' | |
run: sbt package | |
- name: Verify Java version | |
run: java -version |