Repository navigation
79 lines (69 loc) · 2.51 KB
/
Copy pathjava.yml
File metadata and controls
79 lines (69 loc) · 2.51 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Java CI
on:
push:
branches: [main, release-2]
paths:
- "java/**"
- "scripts/java_dev.py"
- ".github/workflows/java.yml"
pull_request:
paths:
- "java/**"
- "scripts/java_dev.py"
- ".github/workflows/java.yml"
permissions:
contents: read
jobs:
versions:
name: Java versions
runs-on: ubuntu-latest
outputs:
data: ${{ steps.set.outputs.data }}
steps:
- name: Check out the repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Load supported versions from pom.xml
id: set
run: echo "data=$(python3 scripts/java_dev.py list-supported-versions)" >> "$GITHUB_OUTPUT"
test:
name: Java ${{ matrix.java-version }} on ${{ matrix.os }}
needs: versions
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Every supported version runs on Linux. Other platforms test the
# ends of the range, where runtime differences are most likely.
os: [ubuntu-latest]
java-version: ${{ fromJson(needs.versions.outputs.data).all }}
include:
- os: windows-latest
java-version: "${{ fromJson(needs.versions.outputs.data).min }}"
- os: windows-latest
java-version: "${{ fromJson(needs.versions.outputs.data).max }}"
- os: macos-14
java-version: "${{ fromJson(needs.versions.outputs.data).min }}"
- os: macos-14
java-version: "${{ fromJson(needs.versions.outputs.data).max }}"
steps:
- name: Check out the repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Java ${{ matrix.java-version }}
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: corretto
java-version: ${{ matrix.java-version }}
cache: maven
cache-dependency-path: |
java/pom.xml
java/examples/pom.xml
java/integration-tests/pom.xml
- name: Build and test
working-directory: java
run: mvn --batch-mode --no-transfer-progress install
- name: Build documentation examples
working-directory: java
run: mvn --batch-mode --no-transfer-progress --file examples/pom.xml verify
- name: Run installed-artifact integration tests
working-directory: java
run: mvn --batch-mode --no-transfer-progress --file integration-tests/pom.xml verify