forked from openjdk/jfx
-
Notifications
You must be signed in to change notification settings - Fork 1
424 lines (375 loc) · 16.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
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
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
#
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. 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. Oracle 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.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# This GitHub actions YAML file runs a build and test on each of the three primary platforms:
# Linux, macOS (both x64 and aarch64), Windows. The jobs are run using the default (latest) OS platform for each OS.
# We download a specific version the boot JDK and gradle. We use the default versions
# of all other build tools (e.g., compilers and ant) that are available on each platform.
#
# The build step is run in the default mode without building the native media or webkit libraries.
# The test is run with web tests excluded. As a follow-up enhancement, we might consider optionally
# building the media and webkit libraries.
#
# NOTE: much of the build logic is duplicated for each platform. Keep this in mind when making changes.
#
name: JavaFX pre-submit tests
on:
# Run GitHub actions on every push to all branches except the main production branches, also
# exclude any branch starting with "WIP".
push:
branches-ignore:
- master
- main
- 'jfx[0-9]+'
- 'WIP*'
# Enable triggering the workflow manually
workflow_dispatch:
permissions:
contents: read
jobs:
validation:
name: "Gradle Wrapper Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
linux_x64_build:
name: Linux x64
needs: validation
runs-on: "ubuntu-24.04"
env:
# FIXME: read this information from a property file
# BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
# BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
# BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
# BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
BOOT_JDK_VERSION: "23"
BOOT_JDK_FILENAME: "jdk-23_linux-x64_bin.tar.gz"
BOOT_JDK_URL: "https://download.oracle.com/java/23/archive/jdk-23_linux-x64_bin.tar.gz"
# ANT_DIR: "apache-ant-1.10.5"
# ANT_FILENAME: "apache-ant-1.10.5.tar.gz"
# ANT_URL: "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.gz"
steps:
- name: Checkout the source
uses: actions/checkout@v2
with:
path: jfx
- name: Install dependencies
run: |
set -x
sudo apt-get update
sudo apt-get install ant libgl1-mesa-dev libx11-dev libxxf86vm-dev libxt-dev pkg-config libgtk2.0-dev libgtk-3-dev libxtst-dev gcc-13 g++-13
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13
mkdir -p "${HOME}/build-tools"
# wget -O "${HOME}/build-tools/${ANT_FILENAME}" "${ANT_URL}"
# tar -zxf "${HOME}/build-tools/${ANT_FILENAME}" -C "${HOME}/build-tools"
# FIXME: enable cache for boot JDK
# - name: Restore boot JDK from cache
# id: bootjdk
# uses: actions/cache@v2
# with:
# path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
# key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
- name: Download boot JDK
run: |
set -x
mkdir -p "${HOME}/bootjdk"
wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
# FIXME: sha256sum
tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk"
# FIXME: enable cache for boot JDK
- name: Setup environment
run: |
set -x
export JAVA_HOME="${HOME}/bootjdk/jdk-${BOOT_JDK_VERSION}"
echo "JAVA_HOME=${JAVA_HOME}" >> "${GITHUB_ENV}"
# export ANT_HOME="${HOME}/build-tools/${ANT_DIR}"
# echo "ANT_HOME=${ANT_HOME}" >> "${GITHUB_ENV}"
# export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
export PATH="$JAVA_HOME/bin:$PATH"
env | sort
which java
java -version
which ant
ant -version
gcc -v
- name: Build JavaFX artifacts
working-directory: jfx
run: |
set -x
# export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
export PATH="$JAVA_HOME/bin:$PATH"
bash gradlew -version
bash gradlew --info all
- name: Run JavaFX headless tests
working-directory: jfx
run: |
set -x
# export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
export PATH="$JAVA_HOME/bin:$PATH"
bash gradlew --info --continue -PTEST_ONLY=true test -x :web:test
macos_x64_build:
name: macOS x64
needs: validation
runs-on: "macos-13"
env:
# FIXME: read this information from a property file
# BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
# BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
# BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
# BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
BOOT_JDK_VERSION: "23"
BOOT_JDK_FILENAME: "jdk-23_macos-x64_bin.tar.gz"
BOOT_JDK_URL: "https://download.oracle.com/java/23/archive/jdk-23_macos-x64_bin.tar.gz"
# Disabled due to timeout downloading ant; use ant installed on system
#ANT_DIR: "apache-ant-1.10.5"
#ANT_FILENAME: "apache-ant-1.10.5.tar.gz"
#ANT_URL: "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.gz"
steps:
- name: Checkout the source
uses: actions/checkout@v2
with:
path: jfx
- name: Install dependencies
run: |
set -x
echo "NOT NEEDED: brew install make"
echo "NOT NEEDED: wget ... ant"
#mkdir -p "${HOME}/build-tools"
#wget -O "${HOME}/build-tools/${ANT_FILENAME}" "${ANT_URL}"
#tar -zxf "${HOME}/build-tools/${ANT_FILENAME}" -C "${HOME}/build-tools"
# FIXME: enable cache for boot JDK
# - name: Restore boot JDK from cache
# id: bootjdk
# uses: actions/cache@v2
# with:
# path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
# key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
- name: Download boot JDK
run: |
set -x
mkdir -p "${HOME}/bootjdk"
wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
# FIXME: sha256sum
tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk"
# FIXME: enable cache for boot JDK
- name: Setup environment
run: |
set -x
export JAVA_HOME="${HOME}/bootjdk/jdk-${BOOT_JDK_VERSION}.jdk/Contents/Home"
echo "JAVA_HOME=${JAVA_HOME}" >> "${GITHUB_ENV}"
#export ANT_HOME="${HOME}/build-tools/${ANT_DIR}"
#echo "ANT_HOME=${ANT_HOME}" >> "${GITHUB_ENV}"
#export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
export PATH="$JAVA_HOME/bin:$PATH"
env | sort
which java
java -version
which ant
ant -version
sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
xcodebuild -version
- name: Build JavaFX artifacts
working-directory: jfx
run: |
set -x
#export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
export PATH="$JAVA_HOME/bin:$PATH"
bash gradlew -version
bash gradlew --info all
- name: Run JavaFX headless tests
working-directory: jfx
run: |
set -x
#export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
export PATH="$JAVA_HOME/bin:$PATH"
bash gradlew --info --continue -PTEST_ONLY=true test -x :web:test
macos_aarch64_build:
name: macOS aarch64
needs: validation
runs-on: "macos-14"
env:
# FIXME: read this information from a property file
# BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
# BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
# BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
# BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
BOOT_JDK_VERSION: "23"
BOOT_JDK_FILENAME: "jdk-23_macos-aarch64_bin.tar.gz"
BOOT_JDK_URL: "https://download.oracle.com/java/23/archive/jdk-23_macos-aarch64_bin.tar.gz"
# Disabled due to timeout downloading ant; use ant installed on system
#ANT_DIR: "apache-ant-1.10.5"
#ANT_FILENAME: "apache-ant-1.10.5.tar.gz"
#ANT_URL: "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.gz"
steps:
- name: Checkout the source
uses: actions/checkout@v2
with:
path: jfx
- name: Install dependencies
run: |
set -x
echo "NOT NEEDED: brew install make"
echo "NOT NEEDED: wget ... ant"
#mkdir -p "${HOME}/build-tools"
#wget -O "${HOME}/build-tools/${ANT_FILENAME}" "${ANT_URL}"
#tar -zxf "${HOME}/build-tools/${ANT_FILENAME}" -C "${HOME}/build-tools"
# FIXME: enable cache for boot JDK
# - name: Restore boot JDK from cache
# id: bootjdk
# uses: actions/cache@v2
# with:
# path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
# key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
- name: Download boot JDK
run: |
set -x
mkdir -p "${HOME}/bootjdk"
wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
# FIXME: sha256sum
tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk"
# FIXME: enable cache for boot JDK
- name: Setup environment
run: |
set -x
export JAVA_HOME="${HOME}/bootjdk/jdk-${BOOT_JDK_VERSION}.jdk/Contents/Home"
echo "JAVA_HOME=${JAVA_HOME}" >> "${GITHUB_ENV}"
#export ANT_HOME="${HOME}/build-tools/${ANT_DIR}"
#echo "ANT_HOME=${ANT_HOME}" >> "${GITHUB_ENV}"
#export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
export PATH="$JAVA_HOME/bin:$PATH"
env | sort
which java
java -version
which ant
ant -version
sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
xcodebuild -version
- name: Build JavaFX artifacts
working-directory: jfx
run: |
set -x
#export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
export PATH="$JAVA_HOME/bin:$PATH"
bash gradlew -version
bash gradlew --info all
- name: Run JavaFX headless tests
working-directory: jfx
run: |
set -x
#export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
export PATH="$JAVA_HOME/bin:$PATH"
bash gradlew --info --continue -PTEST_ONLY=true test -x :web:test
windows_x64_build:
name: Windows x64
needs: validation
runs-on: "windows-2022"
env:
# FIXME: read this information from a property file
# BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
# BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
# BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
# BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
BOOT_JDK_VERSION: "23"
BOOT_JDK_FILENAME: "jdk-23_windows-x64_bin.zip"
BOOT_JDK_URL: "https://download.oracle.com/java/23/archive/jdk-23_windows-x64_bin.zip"
ANT_DIR: "apache-ant-1.10.5"
ANT_FILENAME: "apache-ant-1.10.5.tar.gz"
ANT_URL: "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.gz"
steps:
- name: Checkout the source
uses: actions/checkout@v2
with:
path: jfx
# FIXME: enable cache for boot JDK
# - name: Restore boot JDK from cache
# id: bootjdk
# uses: actions/cache@v2
# with:
# path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
# key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
- name: Download boot JDK
run: |
mkdir -p "$HOME\bootjdk"
& curl -L "$env:BOOT_JDK_URL" -o "$HOME/bootjdk/$env:BOOT_JDK_FILENAME"
# FIXME: sha256sum
tar -xf "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -C "$HOME/bootjdk"
# FIXME: enable cache for boot JDK
- name: Restore cygwin packages from cache
id: cygwin
uses: actions/cache@v2
with:
path: ~/cygwin/packages
key: cygwin-packages-${{ runner.os }}-v1
- name: Install cygwin
run: |
New-Item -Force -ItemType directory -Path "$HOME\cygwin"
& curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe"
Start-Process -FilePath "$HOME\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages make,zip,unzip --root $HOME\cygwin\cygwin64 --local-package-dir $HOME\cygwin\packages --site http://mirrors.kernel.org/sourceware/cygwin --no-desktop --no-shortcuts --no-startmenu --no-admin" -Wait -NoNewWindow
- name: Install dependencies
run: |
mkdir -p "$HOME\build-tools"
& curl -L "$env:ANT_URL" -o "$HOME/build-tools/$env:ANT_FILENAME"
tar -zxf "$HOME/build-tools/$env:ANT_FILENAME" -C "$HOME/build-tools"
- name: Setup environment
run: |
echo "dir ...\VC\Tools\MSVC"
dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC"
# echo "dir ...\VC\Tools\MSVC"
# dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC"
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ;
$env:JAVA_HOME = "$HOME\bootjdk\jdk-$env:BOOT_JDK_VERSION" ;
echo "JAVA_HOME=$env:JAVA_HOME"
$env:ANT_HOME = "${HOME}\build-tools\$env:ANT_DIR"
echo "ANT_HOME=$env:ANT_HOME"
$env:Path = "$env:JAVA_HOME\bin;$env:ANT_HOME\bin;$env:Path" ;
echo "Path=$env:Path"
which java
java -version
which ant
ant -version
# Save JAVA_HOME, ANT_HOME, and Path (renamed to THE_PATH) in env variables
echo "JAVA_HOME=$env:JAVA_HOME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "ANT_HOME=$env:ANT_HOME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "THE_PATH=$env:Path" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Build JavaFX artifacts
working-directory: jfx
run: |
echo "JAVA_HOME=$env:JAVA_HOME"
echo "ANT_HOME=$env:ANT_HOME"
$env:Path = "$env:THE_PATH" ;
echo "Path=$env:Path"
which java
java -version
.\gradlew.bat -version
.\gradlew.bat --info all
- name: Run JavaFX headless tests
working-directory: jfx
run: |
echo "JAVA_HOME=$env:JAVA_HOME"
echo "ANT_HOME=$env:ANT_HOME"
$env:Path = "$env:THE_PATH" ;
echo "Path=$env:Path"
.\gradlew.bat --info --continue -PTEST_ONLY=true test -x :web:test