-
Notifications
You must be signed in to change notification settings - Fork 71
112 lines (109 loc) · 3.54 KB
/
ci.yaml
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: GitHub CI
on:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
shell: 'bash -o errexit -o nounset -o pipefail {0}'
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
versions:
- directory: jdk11
ltsJavaVersion: 11
- directory: jdk11-alpine
ltsJavaVersion: 11
variant: alpine
- directory: jdk11-corretto
ltsJavaVersion: 11
variant: corretto
- directory: jdk11-focal
ltsJavaVersion: 11
variant: focal
- directory: jdk17
ltsJavaVersion: 17
- directory: jdk17-alpine
ltsJavaVersion: 17
variant: alpine
- directory: jdk17-corretto
ltsJavaVersion: 17
variant: corretto
- directory: jdk17-focal
ltsJavaVersion: 17
variant: focal
- directory: jdk17-graal
ltsJavaVersion: 17
variant: graal
- directory: jdk17-focal-graal
ltsJavaVersion: 17
variant: focal-graal
- directory: jdk21
ltsJavaVersion: 21
- directory: jdk21-alpine
ltsJavaVersion: 21
variant: alpine
- directory: jdk21-corretto
ltsJavaVersion: 21
variant: corretto
- directory: jdk21-graal
ltsJavaVersion: 21
variant: graal
- directory: jdk23
ltsJavaVersion: 23
- directory: jdk23-alpine
ltsJavaVersion: 23
variant: alpine
- directory: jdk23-corretto
ltsJavaVersion: 23
variant: corretto
- directory: jdk23-graal
ltsJavaVersion: 23
variant: graal
- directory: jdk-lts-and-current
ltsJavaVersion: 21
currentJavaVersion: 23
- directory: jdk-lts-and-current-alpine
ltsJavaVersion: 21
currentJavaVersion: 23
variant: alpine
- directory: jdk-lts-and-current-corretto
ltsJavaVersion: 21
currentJavaVersion: 23
variant: corretto
- directory: jdk-lts-and-current-graal
ltsJavaVersion: 21
currentJavaVersion: 23
variant: graal
steps:
- name: checkout
uses: actions/checkout@v2
- name: build
env:
directory: ${{ matrix.versions.directory }}
run: |
cd "${directory}"
grep "FROM " Dockerfile | cut -d' ' -f2 | xargs -I{} docker pull {}
docker build --tag "gradle:${directory}" .
- name: test
env:
directory: ${{ matrix.versions.directory }}
ltsJavaVersion: ${{ matrix.versions.ltsJavaVersion }}
currentJavaVersion: ${{ matrix.versions.currentJavaVersion }}
variant: ${{ matrix.versions.variant }}
expectedGradleVersion: "8.10.2"
run: |
toolchainJavaVersion="${currentJavaVersion:-${ltsJavaVersion}}"
if [[ "${variant:-''}" = "graal" ]]; then
cd test-graal
sed --regexp-extended --in-place "s/JavaLanguageVersion\.of\([0-9]+\)/JavaLanguageVersion.of(${toolchainJavaVersion})/" app/build.gradle
else
cd test
sed --regexp-extended --in-place "s/JavaLanguageVersion\.of\([0-9]+\)/JavaLanguageVersion.of(${toolchainJavaVersion})/" lib/build.gradle.kts
fi
./run.sh "gradle:${directory}" "${expectedGradleVersion}"