-
-
Notifications
You must be signed in to change notification settings - Fork 242
289 lines (257 loc) · 9.72 KB
/
build.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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
name: Build
on:
pull_request:
branches: [ master ]
# Cancel existing runs if user makes another push.
concurrency:
group: "${{ github.ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build_linux:
name: Linux
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
os: [linux]
version: [jdk8u, jdk11u, jdk17u, jdk18u, jdk]
vm: [hotspot]
image: [adoptopenjdk/centos7_build_image]
include:
- os: alpine-linux
version: jdk16u
vm: hotspot
image: adoptopenjdk/alpine3_build_image
- os: alpine-linux
version: jdk17u
vm: hotspot
image: adoptopenjdk/alpine3_build_image
- os: alpine-linux
version: jdk18u
vm: hotspot
image: adoptopenjdk/alpine3_build_image
- os: alpine-linux
version: jdk
vm: hotspot
image: adoptopenjdk/alpine3_build_image
- os: linux
version: jdk11u
vm: dragonwell
image: adoptopenjdk/centos7_build_image
- os: linux
version: jdk8u
vm: dragonwell
image: adoptopenjdk/centos7_build_image
- os: linux
version: jdk11u
vm: fast_startup
image: adoptopenjdk/centos7_build_image
- os: linux
version: jdk11u
vm: bisheng
image: adoptopenjdk/centos7_build_image
steps:
- uses: actions/checkout@v2
- name: Build Linux
run: ./build-farm/make-adopt-build-farm.sh
env:
JAVA_TO_BUILD: ${{ matrix.version }}
ARCHITECTURE: x64
VARIANT: ${{ matrix.vm }}
TARGET_OS: ${{ matrix.os }}
FILENAME: OpenJDK.tar.gz
# Don't set the OS as we use both linux and alpine-linux
PLATFORM_CONFIG_LOCATION: AdoptOpenJDK/openjdk-build/master/build-farm/platform-specific-configurations
- uses: actions/upload-artifact@v2
name: Collect and Archive Artifacts
with:
name: ${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}
path: workspace/target/*
- name: Unpack jdk
run: |
mkdir -p "${HOME}/JDK"
tar -xf "${GITHUB_WORKSPACE}/workspace/target/OpenJDK.tar.gz" -C "${HOME}/JDK"
- name: Set root of jdk image dir
run: |
imageroot=$(find "${HOME}/JDK" -name release -type f)
echo "TEST_JDK_HOME=$(dirname "${imageroot}")" >> "$GITHUB_ENV"
- name: Smoke test
uses: adoptium/run-aqa@v1
with:
build_list: 'functional/buildAndPackage'
target: '_extended.functional'
vendor_testRepos: "${{ github.event.pull_request.head.repo.html_url }}.git"
vendor_testBranches: "${{ github.head_ref }}"
vendor_testDirs: "/test/functional"
- uses: actions/upload-artifact@v2
name: Collect and Archive SmokeTest Results
if: failure()
with:
name: "${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}_test_output"
path: ./**/output_*/
build_macos:
name: macOS
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
os: [macOS]
version: [jdk8u, jdk11u]
vm: [hotspot]
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
brew install bash binutils freetype gnu-sed nasm
- uses: actions/setup-java@v1
id: setup-java
with:
java-version: 7
if: matrix.version == 'jdk8u'
- name: Select correct Xcode
run: |
rm -rf /Applications/Xcode.app
ln -s /Applications/Xcode_11.7.app /Applications/Xcode.app
- name: Build macOS
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
# Skip freetype build on jdk11+
if [ ${{ matrix.version }} != "jdk8u" ]; then
export BUILD_ARGS="--skip-freetype --make-exploded-image"
./build-farm/make-adopt-build-farm.sh
export BUILD_ARGS="--assemble-exploded-image"
./build-farm/make-adopt-build-farm.sh
else
./build-farm/make-adopt-build-farm.sh
fi
env:
JAVA_TO_BUILD: ${{ matrix.version }}
ARCHITECTURE: x64
VARIANT: ${{ matrix.vm }}
TARGET_OS: mac
FILENAME: OpenJDK.tar.gz
JDK7_BOOT_DIR: ${{ steps.setup-java.outputs.path }}
- uses: actions/upload-artifact@v2
name: Collect and Archive Artifacts
with:
name: ${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}
path: workspace/target/*
- name: Unpack jdk
run: |
mkdir -p "${HOME}/JDK"
tar -xf "${GITHUB_WORKSPACE}/workspace/target/OpenJDK.tar.gz" -C "${HOME}/JDK"
- name: Set root of jdk image dir
run: |
imageroot=$(find "${HOME}/JDK" -name release -type f)
echo "TEST_JDK_HOME=$(dirname "${imageroot}")" >> "$GITHUB_ENV"
- name: Smoke test
uses: adoptium/run-aqa@v1
with:
build_list: 'functional/buildAndPackage'
target: '_extended.functional'
vendor_testRepos: "${{ github.event.pull_request.head.repo.html_url }}.git"
vendor_testBranches: "${{ github.head_ref }}"
vendor_testDirs: "/test/functional"
- uses: actions/upload-artifact@v2
name: Collect and Archive SmokeTest Results
if: failure()
with:
name: "${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}_test_output"
path: ./**/output_*/
build_windows:
name: Windows
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2019]
version: [jdk]
vm: [hotspot]
steps:
- name: Restore cygwin packages from cache
id: cygwin
uses: actions/cache@v2
with:
path: C:\cygwin_packages
key: cygwin-packages-${{ runner.os }}-v1
- name: Install Cygwin
run: |
New-Item -Path C:\ -Name 'openjdk' -ItemType 'directory'
Invoke-WebRequest -UseBasicParsing 'https://cygwin.com/setup-x86_64.exe' -OutFile 'C:\temp\cygwin.exe'
Start-Process -Wait -FilePath 'C:\temp\cygwin.exe' -ArgumentList '--packages autoconf,automake,bsdtar,cpio,curl,gcc-core,git,gnupg,grep,libtool,make,mingw64-x86_64-gcc-core,perl,rsync,unzip,wget,zip --quiet-mode --download --local-install --delete-orphans --site https://mirrors.kernel.org/sourceware/cygwin/ --local-package-dir C:\cygwin_packages --root C:\cygwin64'
- uses: actions/setup-java@v1
id: setup-java7
with:
java-version: 7
if: matrix.version == 'jdk8u'
- uses: actions/setup-java@v1
id: setup-java11
with:
java-version: 11
- name: Install Git
run: |
Invoke-WebRequest 'https://github.com/git-for-windows/git/releases/download/v2.14.3.windows.1/Git-2.14.3-64-bit.exe' -OutFile 'C:\temp\git.exe'
Start-Process -Wait -FilePath 'C:\temp\git.exe' -ArgumentList '/SILENT /ALLOWDOWNGRADE=1** /COMPONENTS="icons,ext\reg\shellhere,assoc,assoc_sh"'
- name: Set PATH
run: echo "C:\cygwin64\bin;C:\Program Files\Git\bin;" | Out-File -FilePath "$env:GITHUB_PATH" -Encoding utf8 -Append
- name: Install Visual Studio 2013
run: |
choco install visualstudiocommunity2013
if: matrix.version == 'jdk8u'
- name: Cygwin git configuration
shell: bash
run: mkdir "$HOME" && git config --system core.autocrlf false && git config --global --add safe.directory '*'
- uses: actions/checkout@v3.0.2
with:
set-safe-directory: false
- name: Setup 8dot3name
run: fsutil behavior set disable8dot3 0
- name: Set JAVA_HOME
run: echo "JAVA_HOME=$(cygpath "${{ steps.setup-java11.outputs.path }}")" | Out-File -FilePath "$env:GITHUB_ENV" -Encoding utf8 -Append
- name: Set JDK7_BOOT_DIR
run: echo "JDK7_BOOT_DIR=$(cygpath "${{ steps.setup-java7.outputs.path }}")" | Out-File -FilePath "$env:GITHUB_ENV" -Encoding utf8 -Append
if: matrix.version == 'jdk8u'
- name: Build Windows
run: |
bash build-farm/make-adopt-build-farm.sh
shell: cmd
env:
JAVA_TO_BUILD: ${{ matrix.version }}
ARCHITECTURE: x64
VARIANT: ${{ matrix.vm }}
TARGET_OS: windows
FILENAME: OpenJDK.zip
- uses: actions/upload-artifact@v2
name: Collect and Archive Artifacts
with:
name: ${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}
path: workspace/target/*
- name: Restore build artifacts
uses: actions/download-artifact@v2
with:
name: ${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}
path: ~/${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}
- name: Unpack jdk
run: |
unzip "${HOME}/${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}/OpenJDK.zip" -d "${HOME}/${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}"
- name: Set root of jdk image dir
shell: pwsh
run: |
$imageroot=$(find "${HOME}/${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}" -name release -type f)
echo "TEST_JDK_HOME=$(dirname "${imageroot}")" | Out-File -FilePath "$env:GITHUB_ENV" -Encoding utf8 -Append
- name: Smoke test
uses: adoptium/run-aqa@v1
with:
build_list: 'functional/buildAndPackage'
target: '_extended.functional'
vendor_testRepos: "${{ github.event.pull_request.head.repo.html_url }}.git"
vendor_testBranches: "${{ github.head_ref }}"
vendor_testDirs: "/test/functional"
- uses: actions/upload-artifact@v2
name: Collect and Archive SmokeTest Results
if: failure()
with:
name: "${{matrix.version}}-${{matrix.os}}-${{matrix.vm}}_test_output"
path: ./**/output_*/