-
Notifications
You must be signed in to change notification settings - Fork 34
116 lines (107 loc) · 4.14 KB
/
initializr-native.yml
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
113
114
115
116
name: Initializr Native Image
env:
JAVA_OPTS: "-Xms512m -Xmx6048m -Xss128m -XX:ReservedCodeCacheSize=512m -server"
GRADLE_OPTS: "-Xms512m -Xmx6048m -Xss128m -XX:ReservedCodeCacheSize=512m -server"
TERM: xterm-256color
JDK_CURRENT: 17
JDK_DISTRO: 'corretto'
GH_TOKEN: ${{ secrets.GH_TOKEN }}
##########################################################################
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * *'
##########################################################################
jobs:
cancel-previous-runs:
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
##########################################################################
initialize:
runs-on: macos-latest
needs: [cancel-previous-runs]
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: ${{ env.JDK_CURRENT }}
distribution: 'temurin'
- name: Setup Gradle Wrapper Cache
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-${{ github.sha }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Initialize
run: ls ./ci && find ./ci -type f -name "*.sh" -exec chmod +x "{}" \;
##########################################################################
supported-versions-cas:
needs: [ initialize ]
runs-on: macos-latest
outputs:
supported-versions: ${{ steps.get-supported-versions.outputs.supported-versions }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: ${{ env.JDK_CURRENT }}
distribution: 'zulu'
- id: print-supported-versions
name: Print supported versions
run: ./gradlew --no-daemon -q versions-cas
- id: get-supported-versions
name: Get supported versions for matrix
run: echo "supported-versions=$(./gradlew --no-daemon -q versions-cas)" >> $GITHUB_OUTPUT
build:
runs-on: macos-latest
needs: [ supported-versions-cas ]
continue-on-error: false
strategy:
matrix:
versions: ${{fromJSON(needs.supported-versions-cas.outputs.supported-versions)}}
name: CAS Native Image ${{ matrix.versions.version }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
if: ${{ matrix.versions.sync == true && matrix.versions.branch == 'master' }}
- name: Set up JDK
uses: actions/[email protected]
if: ${{ matrix.versions.sync == true && matrix.versions.branch == 'master' }}
with:
java-version: ${{ env.JDK_CURRENT }}
distribution: ${{ env.JDK_DISTRO }}
- name: Validate Initializr
if: ${{ matrix.versions.sync == true && matrix.versions.branch == 'master' }}
run: ./ci/validate-initializr.sh
- name: Fetch Overlay
if: ${{ matrix.versions.sync == true && matrix.versions.branch == 'master' }}
run: ./ci/validate-cas-native.sh --fetch-only --cas ${{ matrix.versions.version }}
- name: Setup GraalVM JDK
uses: graalvm/setup-graalvm@v1
if: ${{ matrix.versions.sync == true && matrix.versions.branch == 'master' }}
with:
distribution: 'graalvm'
java-version: ${{ matrix.versions.java-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'gradle'
set-java-home: 'true'
native-image-job-reports: 'true'
- name: GraalVM Versions
if: ${{ matrix.versions.sync == true && matrix.versions.branch == 'master' }}
run: |
echo "GRAALVM_HOME: $GRAALVM_HOME"
echo "JAVA_HOME: $JAVA_HOME"
java --version
native-image --version
- name: Build Native Image
timeout-minutes: 40
if: ${{ matrix.versions.sync == true && matrix.versions.branch == 'master' }}
run: ./ci/validate-cas-native.sh --cas ${{ matrix.versions.version }}