Skip to content

Commit 0b32719

Browse files
committed
[ci] Reduce the number of builds, add proper cache
1 parent ae60196 commit 0b32719

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/actions/setup/action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ runs:
1010
with:
1111
distribution: temurin
1212
java-version: '17'
13-
cache: 'maven'
13+
- name: Cache local Maven repository
14+
uses: actions/cache@v3
15+
with:
16+
path: ~/.m2/repository
17+
# re-cache on changes in the pom and target files
18+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', '**/*.target') }}
19+
restore-keys: |
20+
${{ runner.os }}-maven-
1421
- name: Set up Ruby 2.7
1522
uses: ruby/setup-ruby@v1
1623
with:

.github/workflows/build.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
jobs:
1717
# verify build on one node before multiple builds on different os are started
1818
fail-fast-build:
19-
name: fail-fast verify (ubuntu-latest, 2023-03)
19+
name: verify (ubuntu-latest, 2023-03)
2020
timeout-minutes: 60
2121
runs-on: ubuntu-latest
2222
steps:
@@ -41,11 +41,19 @@ jobs:
4141
strategy:
4242
matrix:
4343
os: [ ubuntu-latest, windows-latest, macos-latest ]
44-
targetPlatform: [ 2023-03, 2022-12, 2022-09, 2022-06 ]
44+
targetPlatform: [ 2023-03 ]
4545
exclude:
4646
# exclude the fail-fast-build, which already ran
4747
- os: ubuntu-latest
4848
targetPlatform: 2023-03
49+
# run other target platforms only on linux
50+
include:
51+
- os: ubuntu-latest
52+
targetPlatform: 2022-12
53+
- os: ubuntu-latest
54+
targetPlatform: 2022-09
55+
- os: ubuntu-latest
56+
targetPlatform: 2022-06
4957
fail-fast: true
5058

5159
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)