Skip to content

Commit 69428b6

Browse files
committed
Test distributions cache
1 parent 7721c51 commit 69428b6

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed

.github/workflows/test-actions-cache.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Test actions/cache with 'maven', 'gradle', 'sbt'
22

33
on:
4-
push:
5-
branches:
6-
- sapMachine
4+
# push:
5+
# branches:
6+
# - sapMachine
77
workflow_dispatch:
88

99
jobs:
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test distributions cache
2+
3+
on:
4+
push:
5+
branches:
6+
- sapMachine
7+
workflow_dispatch:
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
# os: [ubuntu-latest, windows-latest, macos-latest] # Include macos-latest for all except where overridden
16+
build-system: ['maven', 'gradle', 'sbt']
17+
distribution: [ 'adopt', 'zulu', 'temurin', 'corretto', 'liberica', 'oracle', 'microsoft', 'semeru', 'dragonwell']
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Java
24+
uses: actions/setup-java@v4
25+
with:
26+
distribution: ${{ matrix.distribution }}
27+
cache: ${{ matrix.build-system }}
28+
java-version: '21'
29+
30+
- name: Build with Maven
31+
if: matrix.build-system == 'maven'
32+
run: mvn -B package --file pom.xml
33+
34+
- name: Build with Gradle
35+
if: matrix.build-system == 'gradle'
36+
run: ./gradlew build --no-daemon
37+
38+
- name: Build with SBT
39+
if: matrix.build-system == 'sbt'
40+
run: sbt package
41+
42+
- name: Verify Java version
43+
run: java -version

0 commit comments

Comments
 (0)