-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (54 loc) · 1.68 KB
/
Copy pathjava.yaml
File metadata and controls
57 lines (54 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Java CI
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
# for release use https://github.com/gh-a-sample/github-actions-maven-release-sample
jobs:
diff-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: check diff is correct
run: git fetch origin main && git checkout main && git reset --hard origin/main && git checkout ${{ github.head_ref || github.ref }} && bash detect_module_changes.sh --diff
build-java11:
runs-on: ubuntu-latest
needs: diff-check
steps:
- uses: actions/checkout@v5
- name: Set up JDK 11
uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Install tiles
run: cd support && mvn -f pom-tiles.xml install
- name: Install support composites
run: mvn install -pl $(cat java11_changed.txt)
build-java21:
runs-on: ubuntu-latest
needs: diff-check
strategy:
matrix:
java-version: ['17', '21', '25']
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 40
- name: Set up Java ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: maven
- name: Install tiles
run: cd support && mvn -f pom-tiles.xml install
- name: All other things
run: mvn install -pl $(cat java11_changed.txt)
- name: java17+ only
working-directory: v17-and-above
run: mvn install -pl $(cat java17_changed.txt)