-
Notifications
You must be signed in to change notification settings - Fork 498
264 lines (254 loc) · 11.6 KB
/
submit.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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
#
# Copyright (c) 2022 Alibaba Group Holding Limited. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Alibaba designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
name: Dragonwell_8_build_test
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
prerequisites:
name: Prerequisites
runs-on: "ubuntu-20.04"
outputs:
bundle_id: ${{ steps.check_bundle_id.outputs.bundle_id }}
steps:
- name: Determine unique bundle identifier
id: check_bundle_id
run: echo "::set-output name=bundle_id::${GITHUB_ACTOR}_${GITHUB_SHA:0:8}"
linux_x64_build:
needs: prerequisites
name: Linux x64
runs-on: "ubuntu-20.04"
container:
image: docker.io/dragonwelljdk/build_jdk:8u
steps:
- name: Checkout target source
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Compile debug
run: |
sh configure --with-debug-level=fastdebug --with-cacerts-file=${PWD}/common/security/cacerts --with-milestone=fcs --enable-unlimited-crypto
make images CONF=linux-x86_64-normal-server-fastdebug
- name: Compile release
run: |
make clean || true
[ -d build ] && rm -rf build
sh configure --with-debug-level=release --with-cacerts-file=${PWD}/common/security/cacerts --with-milestone=fcs --enable-unlimited-crypto
make images CONF=linux-x86_64-normal-server-release
- name: Install dependencies
run: |
wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz
tar -xvf apache-maven-3.8.8-bin.tar.gz
- name: Download serverless-adapter-jdk8 source code
uses: actions/checkout@v3
with:
repository: dragonwell-project/serverless-adapter-jdk8
ref: main
path: serverless-adapter-jdk8
- name: Build serverless-adapter-jdk8
run: |
export JAVA_HOME=../build/linux-x86_64-normal-server-release/images/j2sdk-image
../apache-maven-3.8.8/bin/mvn package
mkdir -p ../build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/serverless
cp -f target/serverless-adapter-0.1.jar ../build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/serverless/serverless-adapter.jar
cp -f output/libloadclassagent.so ../build/linux-x86_64-normal-server-release/images/j2sdk-image/jre/lib/amd64/serverless/
working-directory: serverless-adapter-jdk8
- name: Upload Test image
uses: actions/upload-artifact@v2
with:
name: dragonwell8_x86_release_image_${{ needs.prerequisites.outputs.bundle_id }}
path: |
build/linux-x86_64-normal-server-release/images/j2sdk-image
linux_x64_test:
name: Linux x64 Test
needs:
- prerequisites
- linux_x64_build
runs-on: "ubuntu-20.04"
container:
image: docker.io/dragonwelljdk/build_jdk:8u
strategy:
fail-fast: false
matrix:
test:
- jdk/test/:jdk_tier1
- jdk/test/:dragonwell_jdk_features
- hotspot/test/:hotspot_tier1
- hotspot/test/:hotspot_jwarmup
- hotspot/test/:hotspot_elastic_heap
- hotspot/test/:hotspot_multi_tenant
steps:
- name: Checkout target source
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Clear Dragonwell8 Dir
run: |
rm -rf /opt/dragonwell8
- name: Download image
id: jtreg_restore
uses: actions/download-artifact@v2
with:
name: dragonwell8_x86_release_image_${{ needs.prerequisites.outputs.bundle_id }}
path: /opt/dragonwell8
continue-on-error: false
- name: Test image version
run: |
ls /opt/dragonwell8
chmod -R 777 /opt/dragonwell8
/opt/dragonwell8/bin/java -version
- name: Test
run: |
jtreg -agentvm -a -ea -esa -v:fail,error,time,nopass -jdk:/opt/dragonwell8 -exclude:"/__w/dragonwell8/dragonwell8/hotspot/test/ProblemList.txt" -exclude:"/__w/dragonwell8/dragonwell8/jdk/test/ProblemList.txt" "${{ matrix.test }}"
- name: Check that all tests executed successfully
run: >
if [[ egrep -q "(failed|error)" /__w/dragonwell8/dragonwell8/JTreport/text/stats.txt ]]; then
cat /__w/dragonwell8/dragonwell8/JTreport/newfailures.txt /__w/dragonwell8/dragonwell8/JTreport/other_errors.txt;
exit 1 ;
fi
linux_aarch64_release_build:
needs: prerequisites
name: Linux aarch64(release)
runs-on: ["ubuntu", "ARM64"]
steps:
- name: Update apt and download dependency
run: |
sudo apt update -y
sudo apt install -y libxtst-dev libxt-dev libxrender-dev libxrandr-dev libxi-dev libcups2-dev libfontconfig1-dev libasound2-dev unzip zip openjdk-8-jdk
- name: Get boot jdk
run: |
if [ ! -f /home/${USER}/dragonwell8/dragonwell-8.15.16/bin/java ];then
mkdir -p /home/${USER}/dragonwell8
rm -rf /home/${USER}/dragonwell8/* /home/${USER}/dragonwell8.tar.gz
wget https://dragonwell.oss-cn-shanghai.aliyuncs.com/8.15.16/Alibaba_Dragonwell_Extended_8.15.16_aarch64_linux.tar.gz -O /home/${USER}/dragonwell8.tar.gz
tar zxf /home/${USER}/dragonwell8.tar.gz -C /home/${USER}/dragonwell8
fi
- name: Checkout target source
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Compile release
run: |
sh configure --with-debug-level=release --with-cacerts-file=${PWD}/common/security/cacerts --with-milestone=fcs --enable-unlimited-crypto --with-boot-jdk=/home/${USER}/dragonwell8/dragonwell-8.15.16
make images CONF=linux-aarch64-normal-server-release
- name: Install dependencies
run: |
wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz
tar -xvf apache-maven-3.8.8-bin.tar.gz
- name: Download serverless-adapter-jdk8 source code
uses: actions/checkout@v3
with:
repository: dragonwell-project/serverless-adapter-jdk8
ref: main
path: serverless-adapter-jdk8
- name: Build serverless-adapter-jdk8
run: |
export JAVA_HOME=../build/linux-aarch64-normal-server-release/images/j2sdk-image
../apache-maven-3.8.8/bin/mvn package
mkdir -p ../build/linux-aarch64-normal-server-release/images/j2sdk-image/jre/lib/aarch64/serverless
cp -f target/serverless-adapter-0.1.jar ../build/linux-aarch64-normal-server-release/images/j2sdk-image/jre/lib/aarch64/serverless/serverless-adapter.jar
cp -f output/libloadclassagent.so ../build/linux-aarch64-normal-server-release/images/j2sdk-image/jre/lib/aarch64/serverless/
../build/linux-aarch64-normal-server-release/images/j2sdk-image/bin/java -version
working-directory: serverless-adapter-jdk8
- name: Upload Test image
uses: actions/upload-artifact@v2
with:
name: dragonwell8_aarch64_release_image_${{ needs.prerequisites.outputs.bundle_id }}
path: |
build/linux-aarch64-normal-server-release/images/j2sdk-image
linux_aarch64_debug_build:
needs: prerequisites
name: Linux aarch64(fastdebug)
runs-on: ["ubuntu", "ARM64"]
steps:
- name: Update apt and download dependency
run: |
sudo apt update -y
sudo apt install -y libxtst-dev libxt-dev libxrender-dev libxrandr-dev libxi-dev libcups2-dev libfontconfig1-dev libasound2-dev unzip zip openjdk-8-jdk
- name: Get boot jdk
run: |
if [ ! -f /home/${USER}/dragonwell8/dragonwell-8.15.16/bin/java ];then
mkdir -p /home/${USER}/dragonwell8
rm -rf /home/${USER}/dragonwell8/* /home/${USER}/dragonwell8.tar.gz
wget https://dragonwell.oss-cn-shanghai.aliyuncs.com/8.15.16/Alibaba_Dragonwell_Extended_8.15.16_aarch64_linux.tar.gz -O /home/${USER}/dragonwell8.tar.gz
tar zxf /home/${USER}/dragonwell8.tar.gz -C /home/${USER}/dragonwell8
fi
- name: Checkout target source
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Compile debug
run: |
sh configure --with-debug-level=fastdebug --with-cacerts-file=${PWD}/common/security/cacerts --with-milestone=fcs --enable-unlimited-crypto --with-boot-jdk=/home/${USER}/dragonwell8/dragonwell-8.15.16
make images CONF=linux-aarch64-normal-server-fastdebug
linux_aarch64_test:
name: Linux aarch64 Test
needs:
- prerequisites
- linux_aarch64_release_build
runs-on: ["ubuntu", "ARM64"]
strategy:
fail-fast: false
matrix:
test:
- jdk/test/:jdk_tier1
- jdk/test/:dragonwell_jdk_features
- hotspot/test/:hotspot_tier1
- hotspot/test/:hotspot_jwarmup
- hotspot/test/:hotspot_elastic_heap
steps:
- name: Checkout target source
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Clear Dragonwell8 Dir
run: |
rm -rf /opt/dragonwell8
- name: Download image
id: jtreg_restore
uses: actions/download-artifact@v2
with:
name: dragonwell8_aarch64_release_image_${{ needs.prerequisites.outputs.bundle_id }}
path: /opt/dragonwell8
continue-on-error: false
- name: Test image version
run: |
ls /opt/dragonwell8
chmod -R 777 /opt/dragonwell8
/opt/dragonwell8/bin/java -version
- name: Get jtreg image
run: |
if [ ! -f /home/${USER}/jtreg/bin/jtreg ];then
wget https://compiler-ci-bucket.oss-cn-hangzhou.aliyuncs.com/tools/jtreg_5_1_b01.zip -O /home/${USER}/jtreg_5_1_b01.zip
cd /home/${USER}
sudo apt update -y
sudo apt install -y unzip
unzip jtreg_5_1_b01.zip
fi
- name: Test
run: |
/home/${USER}/jtreg/bin/jtreg -agentvm -a -ea -esa -v:fail,error,time,nopass -jdk:/opt/dragonwell8 -exclude:"/home/${USER}/actions-runner/_work/dragonwell8/dragonwell8/hotspot/test/ProblemList.txt" -exclude:"/home/${USER}/actions-runner/_work/dragonwell8/dragonwell8/jdk/test/ProblemList.txt" "${{ matrix.test }}"
- name: Check that all tests executed successfully
run: >
if [ -n "$(cat /home/${USER}/actions-runner/_work/dragonwell8/dragonwell8/JTreport/text/stats.txt | grep -E 'failed|error')" ]; then
cat /home/${USER}/actions-runner/_work/dragonwell8/dragonwell8/JTreport/newfailures.txt /home/${USER}/actions-runner/_work/dragonwell8/dragonwell8/JTreport/other_errors.txt;
exit 1 ;
fi