diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 04f01eed..6e4e848e 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -7,8 +7,11 @@ on: - master jobs: - build-linux: - runs-on: ubuntu-latest + common-steps: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] steps: - name: Checkout uses: actions/checkout@v4 @@ -17,9 +20,14 @@ jobs: # TODO: replace this once https://github.com/actions/setup-java/pull/637 gets merged. uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d with: - java-version: '17' + java-version: '17.0.12' distribution: 'jetbrains' + cache: 'gradle' + build-linux: + needs: common-steps + runs-on: ubuntu-latest + steps: - name: Package run: | ./gradlew application:packageReleaseTarGz @@ -40,18 +48,9 @@ jobs: path: binaries/* build-windows: + needs: common-steps runs-on: windows-latest steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup JDK - # TODO: replace this once https://github.com/actions/setup-java/pull/637 gets merged. - uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d - with: - java-version: '17' - distribution: 'jetbrains' - - name: Package exe run: ./gradlew application:packageReleaseExe @@ -62,18 +61,9 @@ jobs: path: application/build/compose/binaries/main-release/exe/*.exe build-macos: + needs: common-steps runs-on: macos-latest steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup JDK - # TODO: replace this once https://github.com/actions/setup-java/pull/637 gets merged. - uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d - with: - java-version: '17' - distribution: 'jetbrains' - - name: Package dmg run: ./gradlew application:packageReleaseDmg