jfx

Форк
0
Зеркало из https://github.com/openjdk/jfx
/
submit.yml 
421 строка · 16.5 Кб
1
#
2
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
#
5
# This code is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation.  Oracle designates this
8
# particular file as subject to the "Classpath" exception as provided
9
# by Oracle in the LICENSE file that accompanied this code.
10
#
11
# This code is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
# version 2 for more details (a copy is included in the LICENSE file that
15
# accompanied this code).
16
#
17
# You should have received a copy of the GNU General Public License version
18
# 2 along with this work; if not, write to the Free Software Foundation,
19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
#
21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
# or visit www.oracle.com if you need additional information or have any
23
# questions.
24
#
25

26
#
27
# This GitHub actions YAML file runs a build and test on each of the three primary platforms:
28
# Linux, macOS (both x64 and aarch64), Windows. The jobs are run using the default (latest) OS platform for each OS.
29
# We download a specific version the boot JDK and gradle. We use the default versions
30
# of all other build tools (e.g., compilers and ant) that are available on each platform.
31
#
32
# The build step is run in the default mode without building the native media or webkit libraries.
33
# The test is run with web tests excluded. As a follow-up enhancement, we might consider optionally
34
# building the media and webkit libraries.
35
#
36
# NOTE: much of the build logic is duplicated for each platform. Keep this in mind when making changes.
37
#
38

39
name: JavaFX pre-submit tests
40

41
on:
42
  # Run GitHub actions on every push to all branches except the main production branches, also
43
  # exclude any branch starting with "WIP".
44
  push:
45
    branches-ignore:
46
      - master
47
      - main
48
      - 'jfx[0-9]+'
49
      - 'WIP*'
50
  # Enable triggering the workflow manually
51
  workflow_dispatch:
52

53
permissions:
54
  contents: read
55

56
jobs:
57
  validation:
58
    name: "Gradle Wrapper Validation"
59
    runs-on: ubuntu-latest
60
    steps:
61
      - uses: actions/checkout@v2
62
      - uses: gradle/wrapper-validation-action@v1
63

64

65
  linux_x64_build:
66
    name: Linux x64
67
    needs: validation
68
    runs-on: "ubuntu-24.04"
69

70
    env:
71
      # FIXME: read this information from a property file
72
      # BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
73
      # BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
74
      # BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
75
      # BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
76
      BOOT_JDK_VERSION: "23"
77
      BOOT_JDK_FILENAME: "jdk-23_linux-x64_bin.tar.gz"
78
      BOOT_JDK_URL: "https://download.oracle.com/java/23/archive/jdk-23_linux-x64_bin.tar.gz"
79
      ANT_DIR: "apache-ant-1.10.5"
80
      ANT_FILENAME: "apache-ant-1.10.5.tar.gz"
81
      ANT_URL: "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.gz"
82

83
    steps:
84
      - name: Checkout the source
85
        uses: actions/checkout@v2
86
        with:
87
          path: jfx
88

89
      - name: Install dependencies
90
        run: |
91
          set -x
92
          sudo apt-get update
93
          sudo apt-get install libgl1-mesa-dev libx11-dev libxxf86vm-dev libxt-dev pkg-config libgtk2.0-dev libgtk-3-dev libxtst-dev gcc-13 g++-13
94
          sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13
95
          mkdir -p "${HOME}/build-tools"
96
          wget -O "${HOME}/build-tools/${ANT_FILENAME}" "${ANT_URL}"
97
          tar -zxf "${HOME}/build-tools/${ANT_FILENAME}" -C "${HOME}/build-tools"
98

99
# FIXME: enable cache for boot JDK
100
#      - name: Restore boot JDK from cache
101
#        id: bootjdk
102
#        uses: actions/cache@v2
103
#        with:
104
#          path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
105
#          key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
106

107
      - name: Download boot JDK
108
        run: |
109
          set -x
110
          mkdir -p "${HOME}/bootjdk"
111
          wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
112
          # FIXME: sha256sum
113
          tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk"
114
          # FIXME: enable cache for boot JDK
115

116
      - name: Setup environment
117
        run: |
118
          set -x
119
          export JAVA_HOME="${HOME}/bootjdk/jdk-${BOOT_JDK_VERSION}"
120
          echo "JAVA_HOME=${JAVA_HOME}" >> "${GITHUB_ENV}"
121
          export ANT_HOME="${HOME}/build-tools/${ANT_DIR}"
122
          echo "ANT_HOME=${ANT_HOME}" >> "${GITHUB_ENV}"
123
          export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
124
          env | sort
125
          which java
126
          java -version
127
          which ant
128
          ant -version
129
          gcc -v
130

131
      - name: Build JavaFX artifacts
132
        working-directory: jfx
133
        run: |
134
          set -x
135
          export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
136
          bash gradlew -version
137
          bash gradlew --info all
138

139
      - name: Run JavaFX headless tests
140
        working-directory: jfx
141
        run: |
142
          set -x
143
          export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
144
          bash gradlew --info --continue -PTEST_ONLY=true test -x :web:test
145

146

147
  macos_x64_build:
148
    name: macOS x64
149
    needs: validation
150
    runs-on: "macos-13"
151

152
    env:
153
      # FIXME: read this information from a property file
154
      # BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
155
      # BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
156
      # BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
157
      # BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
158
      BOOT_JDK_VERSION: "23"
159
      BOOT_JDK_FILENAME: "jdk-23_macos-x64_bin.tar.gz"
160
      BOOT_JDK_URL: "https://download.oracle.com/java/23/archive/jdk-23_macos-x64_bin.tar.gz"
161
      # Disabled due to timeout downloading ant; use ant installed on system
162
      #ANT_DIR: "apache-ant-1.10.5"
163
      #ANT_FILENAME: "apache-ant-1.10.5.tar.gz"
164
      #ANT_URL: "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.gz"
165

166
    steps:
167
      - name: Checkout the source
168
        uses: actions/checkout@v2
169
        with:
170
          path: jfx
171

172
      - name: Install dependencies
173
        run: |
174
          set -x
175
          echo "NOT NEEDED: brew install make"
176
          echo "NOT NEEDED: wget ... ant"
177
          #mkdir -p "${HOME}/build-tools"
178
          #wget -O "${HOME}/build-tools/${ANT_FILENAME}" "${ANT_URL}"
179
          #tar -zxf "${HOME}/build-tools/${ANT_FILENAME}" -C "${HOME}/build-tools"
180

181
# FIXME: enable cache for boot JDK
182
#      - name: Restore boot JDK from cache
183
#        id: bootjdk
184
#        uses: actions/cache@v2
185
#        with:
186
#          path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
187
#          key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
188

189
      - name: Download boot JDK
190
        run: |
191
          set -x
192
          mkdir -p "${HOME}/bootjdk"
193
          wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
194
          # FIXME: sha256sum
195
          tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk"
196
          # FIXME: enable cache for boot JDK
197

198
      - name: Setup environment
199
        run: |
200
          set -x
201
          export JAVA_HOME="${HOME}/bootjdk/jdk-${BOOT_JDK_VERSION}.jdk/Contents/Home"
202
          echo "JAVA_HOME=${JAVA_HOME}" >> "${GITHUB_ENV}"
203
          #export ANT_HOME="${HOME}/build-tools/${ANT_DIR}"
204
          #echo "ANT_HOME=${ANT_HOME}" >> "${GITHUB_ENV}"
205
          #export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
206
          export PATH="$JAVA_HOME/bin:$PATH"
207
          env | sort
208
          which java
209
          java -version
210
          which ant
211
          ant -version
212
          sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
213
          xcodebuild -version
214

215
      - name: Build JavaFX artifacts
216
        working-directory: jfx
217
        run: |
218
          set -x
219
          #export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
220
          export PATH="$JAVA_HOME/bin:$PATH"
221
          bash gradlew -version
222
          bash gradlew --info all
223

224
      - name: Run JavaFX headless tests
225
        working-directory: jfx
226
        run: |
227
          set -x
228
          #export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
229
          export PATH="$JAVA_HOME/bin:$PATH"
230
          bash gradlew --info --continue -PTEST_ONLY=true test -x :web:test
231

232

233
  macos_aarch64_build:
234
    name: macOS aarch64
235
    needs: validation
236
    runs-on: "macos-14"
237

238
    env:
239
      # FIXME: read this information from a property file
240
      # BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
241
      # BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
242
      # BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
243
      # BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
244
      BOOT_JDK_VERSION: "23"
245
      BOOT_JDK_FILENAME: "jdk-23_macos-aarch64_bin.tar.gz"
246
      BOOT_JDK_URL: "https://download.oracle.com/java/23/archive/jdk-23_macos-aarch64_bin.tar.gz"
247
      # Disabled due to timeout downloading ant; use ant installed on system
248
      #ANT_DIR: "apache-ant-1.10.5"
249
      #ANT_FILENAME: "apache-ant-1.10.5.tar.gz"
250
      #ANT_URL: "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.gz"
251

252
    steps:
253
      - name: Checkout the source
254
        uses: actions/checkout@v2
255
        with:
256
          path: jfx
257

258
      - name: Install dependencies
259
        run: |
260
          set -x
261
          echo "NOT NEEDED: brew install make"
262
          echo "NOT NEEDED: wget ... ant"
263
          #mkdir -p "${HOME}/build-tools"
264
          #wget -O "${HOME}/build-tools/${ANT_FILENAME}" "${ANT_URL}"
265
          #tar -zxf "${HOME}/build-tools/${ANT_FILENAME}" -C "${HOME}/build-tools"
266

267
# FIXME: enable cache for boot JDK
268
#      - name: Restore boot JDK from cache
269
#        id: bootjdk
270
#        uses: actions/cache@v2
271
#        with:
272
#          path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
273
#          key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
274

275
      - name: Download boot JDK
276
        run: |
277
          set -x
278
          mkdir -p "${HOME}/bootjdk"
279
          wget -O "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" "${BOOT_JDK_URL}"
280
          # FIXME: sha256sum
281
          tar -xf "${HOME}/bootjdk/${BOOT_JDK_FILENAME}" -C "${HOME}/bootjdk"
282
          # FIXME: enable cache for boot JDK
283

284
      - name: Setup environment
285
        run: |
286
          set -x
287
          export JAVA_HOME="${HOME}/bootjdk/jdk-${BOOT_JDK_VERSION}.jdk/Contents/Home"
288
          echo "JAVA_HOME=${JAVA_HOME}" >> "${GITHUB_ENV}"
289
          #export ANT_HOME="${HOME}/build-tools/${ANT_DIR}"
290
          #echo "ANT_HOME=${ANT_HOME}" >> "${GITHUB_ENV}"
291
          #export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
292
          export PATH="$JAVA_HOME/bin:$PATH"
293
          env | sort
294
          which java
295
          java -version
296
          which ant
297
          ant -version
298
          sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
299
          xcodebuild -version
300

301
      - name: Build JavaFX artifacts
302
        working-directory: jfx
303
        run: |
304
          set -x
305
          #export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
306
          export PATH="$JAVA_HOME/bin:$PATH"
307
          bash gradlew -version
308
          bash gradlew --info all
309

310
      - name: Run JavaFX headless tests
311
        working-directory: jfx
312
        run: |
313
          set -x
314
          #export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
315
          export PATH="$JAVA_HOME/bin:$PATH"
316
          bash gradlew --info --continue -PTEST_ONLY=true test -x :web:test
317

318

319
  windows_x64_build:
320
    name: Windows x64
321
    needs: validation
322
    runs-on: "windows-2022"
323

324
    env:
325
      # FIXME: read this information from a property file
326
      # BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
327
      # BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_FILENAME }}"
328
      # BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_URL }}"
329
      # BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).LINUX_X64_BOOT_JDK_SHA256 }}"
330
      BOOT_JDK_VERSION: "23"
331
      BOOT_JDK_FILENAME: "jdk-23_windows-x64_bin.zip"
332
      BOOT_JDK_URL: "https://download.oracle.com/java/23/archive/jdk-23_windows-x64_bin.zip"
333
      ANT_DIR: "apache-ant-1.10.5"
334
      ANT_FILENAME: "apache-ant-1.10.5.tar.gz"
335
      ANT_URL: "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.gz"
336

337
    steps:
338
      - name: Checkout the source
339
        uses: actions/checkout@v2
340
        with:
341
          path: jfx
342

343
# FIXME: enable cache for boot JDK
344
#      - name: Restore boot JDK from cache
345
#        id: bootjdk
346
#        uses: actions/cache@v2
347
#        with:
348
#          path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
349
#          key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
350

351
      - name: Download boot JDK
352
        run: |
353
          mkdir -p "$HOME\bootjdk"
354
          & curl -L "$env:BOOT_JDK_URL" -o "$HOME/bootjdk/$env:BOOT_JDK_FILENAME"
355
          # FIXME: sha256sum
356
          tar -xf "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -C "$HOME/bootjdk"
357
          # FIXME: enable cache for boot JDK
358

359
      - name: Restore cygwin packages from cache
360
        id: cygwin
361
        uses: actions/cache@v2
362
        with:
363
          path: ~/cygwin/packages
364
          key: cygwin-packages-${{ runner.os }}-v1
365

366
      - name: Install cygwin
367
        run: |
368
          New-Item -Force -ItemType directory -Path "$HOME\cygwin"
369
          & curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe"
370
          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
371

372
      - name: Install dependencies
373
        run: |
374
          mkdir -p "$HOME\build-tools"
375
          & curl -L "$env:ANT_URL" -o "$HOME/build-tools/$env:ANT_FILENAME"
376
          tar -zxf "$HOME/build-tools/$env:ANT_FILENAME" -C "$HOME/build-tools"
377

378
      - name: Setup environment
379
        run: |
380
          echo "dir ...\VC\Tools\MSVC"
381
          dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC"
382
          # echo "dir ...\VC\Tools\MSVC"
383
          # dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC"
384

385
          $env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ;
386
          $env:JAVA_HOME = "$HOME\bootjdk\jdk-$env:BOOT_JDK_VERSION" ;
387
          echo "JAVA_HOME=$env:JAVA_HOME"
388
          $env:ANT_HOME = "${HOME}\build-tools\$env:ANT_DIR"
389
          echo "ANT_HOME=$env:ANT_HOME"
390
          $env:Path = "$env:JAVA_HOME\bin;$env:ANT_HOME\bin;$env:Path" ;
391
          echo "Path=$env:Path"
392
          which java
393
          java -version
394
          which ant
395
          ant -version
396

397
          # Save JAVA_HOME, ANT_HOME, and Path (renamed to THE_PATH) in env variables
398
          echo "JAVA_HOME=$env:JAVA_HOME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
399
          echo "ANT_HOME=$env:ANT_HOME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
400
          echo "THE_PATH=$env:Path" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
401

402
      - name: Build JavaFX artifacts
403
        working-directory: jfx
404
        run: |
405
          echo "JAVA_HOME=$env:JAVA_HOME"
406
          echo "ANT_HOME=$env:ANT_HOME"
407
          $env:Path = "$env:THE_PATH" ;
408
          echo "Path=$env:Path"
409
          which java
410
          java -version
411
          .\gradlew.bat -version
412
          .\gradlew.bat --info all
413

414
      - name: Run JavaFX headless tests
415
        working-directory: jfx
416
        run: |
417
          echo "JAVA_HOME=$env:JAVA_HOME"
418
          echo "ANT_HOME=$env:ANT_HOME"
419
          $env:Path = "$env:THE_PATH" ;
420
          echo "Path=$env:Path"
421
          .\gradlew.bat --info --continue -PTEST_ONLY=true test -x :web:test
422

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.