-
Notifications
You must be signed in to change notification settings - Fork 0
174 lines (170 loc) · 6.24 KB
/
quarkus.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: Nightly quarkus tests
on:
push:
paths:
- '.github/workflows/quarkus.yml'
pull_request:
paths:
- '.github/workflows/quarkus.yml'
workflow_dispatch:
inputs:
graal-repo:
description: 'GraalVM repository'
required: true
default: 'oracle/graal'
graal-version:
description: 'GraalVM branch, tag, or commit'
required: true
default: 'master'
quarkus-repo:
description: 'Quarkus repository'
required: true
default: 'quarkusio/quarkus'
quarkus-version:
description: 'Quarkus branch, tag, or commit'
required: true
default: 'main'
env:
# Workaround testsuite locale issue
LANG: en_US.UTF-8
DB_USER: hibernate_orm_test
DB_PASSWORD: hibernate_orm_test
DB_NAME: hibernate_orm_test
NATIVE_TEST_MAVEN_OPTS: "-B --settings ${QUARKUS_PATH}/.github/mvn-settings.xml --fail-at-end -Dtest-containers -Dstart-containers -Dnative-image.xmx=5g -Dnative -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests install -DskipDocs"
MX_GIT_CACHE: refcache
MX_PATH: ${{ github.workspace }}/mx
JAVA_HOME: ${{ github.workspace }}/jdk
QUARKUS_PATH: ${{ github.workspace }}/quarkus
GRAALVM_HOME: ${{ github.workspace }}/graalvm
jobs:
build-quarkus-and-graalvm:
name: Nightly quarkus and GraalVM build
runs-on: ubuntu-18.04
outputs:
matrix: ${{ steps.read.outputs.matrix }}
steps:
- uses: actions/checkout@v2
with:
repository: graalvm/mx.git
fetch-depth: 1
ref: master
path: ${{ env.MX_PATH }}
- name: Get GraalVM
run: |
curl --output graalvm.tgz -sL "https://api.github.com/repos/${{ github.event.inputs.graal-repo }}/tarball/${{ github.event.inputs.graal-version }}"
tar xf graalvm.tgz --strip-components=1
- name: Get quarkus
run: |
curl --output quarkus.tgz -sL "https://api.github.com/repos/${{ github.event.inputs.quarkus-repo }}/tarball/${{ github.event.inputs.quarkus-version }}"
mkdir ${QUARKUS_PATH}
tar xf quarkus.tgz -C ${QUARKUS_PATH} --strip-components=1
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/cache@v1
with:
path: ~/.mx
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
restore-keys: |
${{ runner.os }}-mx-
- name: Get JDK
run: |
mkdir jdk-dl
${MX_PATH}/mx fetch-jdk --java-distribution labsjdk-ce-11 --to jdk-dl --alias ${JAVA_HOME}
- name: Build graalvm native-image
run: |
cd substratevm
${MX_PATH}/mx --native=native-image --components="Native Image" build
mv $(${MX_PATH}/mx --native=native-image --components="Native Image" graalvm-home) ${GRAALVM_HOME}
${GRAALVM_HOME}/bin/native-image --version
- name: Tar GraalVM
shell: bash
run: tar -czvf graalvm.tgz -C $(dirname ${GRAALVM_HOME}) $(basename ${GRAALVM_HOME})
- name: Persist GraalVM build
uses: actions/upload-artifact@v1
with:
name: graalvm
path: graalvm.tgz
- name: Build quarkus
run: |
cd ${QUARKUS_PATH}
eval ./mvnw -e -B -Dquickly
- name: Read json file with native-tests matrix
id: read
run: |
json=$(tr -d '\n' < ${QUARKUS_PATH}/.github/native-tests.json )
echo $json
echo "::set-output name=matrix::${json}"
- name: Tar Maven Repo
shell: bash
run: tar -czvf maven-repo.tgz -C ~ .m2/repository
- name: Persist Maven Repo
uses: actions/upload-artifact@v1
with:
name: maven-repo
path: maven-repo.tgz
native-tests:
name: Native Tests - ${{matrix.category}}
needs: build-quarkus-and-graalvm
runs-on: ubuntu-latest
# Ignore the following YAML Schema error
timeout-minutes: ${{matrix.timeout}}
strategy:
max-parallel: 8
fail-fast: false
matrix: ${{ fromJson(needs.build-quarkus-and-graalvm.outputs.matrix) }}
steps:
- name: Download GraalVM build
uses: actions/download-artifact@v1
with:
name: graalvm
path: .
- name: Extract GraalVM build
shell: bash
run: tar -xzvf graalvm.tgz -C $(dirname ${GRAALVM_HOME})
- name: Get quarkus
run: |
curl --output quarkus.tgz -sL "https://api.github.com/repos/${{ github.event.inputs.quarkus-repo }}/tarball/${{ github.event.inputs.quarkus-version }}"
mkdir ${QUARKUS_PATH}
tar xf quarkus.tgz -C ${QUARKUS_PATH} --strip-components=1
- name: Reclaim Disk Space
run: ${QUARKUS_PATH}/.github/ci-prerequisites.sh
- name: Download Maven Repo
uses: actions/download-artifact@v1
with:
name: maven-repo
path: .
- name: Extract Maven Repo
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Build with Maven
env:
TEST_MODULES: ${{matrix.test-modules}}
CATEGORY: ${{matrix.category}}
run: |
cd ${QUARKUS_PATH}
export JAVA_HOME=${GRAALVM_HOME}
${GRAALVM_HOME}/bin/native-image --version
for i in $TEST_MODULES
do modules+=("integration-tests/$i"); done
IFS=,
eval mvn -pl "${modules[*]}" $NATIVE_TEST_MAVEN_OPTS
# add the 'simple with spaces' project to the run of 'Misc1' by executing it explicitly
# done because there is no good way to pass strings with empty values to the previous command
# so this hack is as good as any
if [ "$CATEGORY" == "Misc1" ]; then
mvn -Dnative -B --settings ${GITHUB_WORKSPACE}/quarkus/.github/mvn-settings.xml -f 'integration-tests/simple with space/' verify
fi
- name: Prepare failure archive (if maven failed)
if: failure()
shell: bash
run: find . -type d -name '*-reports' -o -wholename '*/build/reports/tests/functionalTest' | tar -czf test-reports.tgz -T -
- name: Upload failure Archive (if maven failed)
uses: actions/upload-artifact@v1
if: failure()
with:
name: test-reports-native-${{matrix.category}}
path: 'test-reports.tgz'