-
Notifications
You must be signed in to change notification settings - Fork 71
58 lines (55 loc) · 1.47 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
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:
version:
- jdk11
- jdk11-alpine
- jdk11-focal
- jdk17
- jdk17-alpine
- jdk17-focal
- jdk17-graal
- jdk17-focal-graal
- jdk21
- jdk21-alpine
- jdk21-graal
- jdk21and22
- jdk21and22-alpine
- jdk21and22-graal
steps:
- name: checkout
uses: actions/checkout@v2
- name: build
env:
version: ${{ matrix.version }}
run: |
cd "${version}"
grep "FROM " Dockerfile | cut -d' ' -f2 | xargs -I{} docker pull {}
docker build --tag "gradle:${version}" .
- name: test
env:
version: ${{ matrix.version }}
expectedGradleVersion: "8.7"
run: |
toolchainJavaVersion=$(echo "${version}" | grep --extended-regex --only-matching '[0-9]+-' | sed 's/-//')
if [[ "${version}" =~ "graal" ]]; then
cd test-graal
sed --in-place "s/(00)/(${toolchainJavaVersion})/" app/build.gradle
else
cd test
sed --in-place "s/(00)/(${toolchainJavaVersion})/" lib/build.gradle.kts
fi
./run.sh "gradle:${version}" "${expectedGradleVersion}"