Skip to content

Commit b639fc4

Browse files
Merge branch 'eclipse-platform:master' into master
2 parents 3191772 + 709f323 commit b639fc4

113 files changed

Lines changed: 1319 additions & 552 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Jenkinsfile

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,18 @@
1717

1818
def runOnNativeBuildAgent(String platform, Closure body) {
1919
def final nativeBuildStageName = 'Build SWT-native binaries'
20-
if (platform == 'gtk.linux.x86_64') {
20+
def dockerImage = null
21+
switch (platform) {
22+
case 'gtk.linux.x86_64':
23+
dockerImage = 'eclipse/platformreleng-debian-swtgtk3nativebuild:10'
24+
break
25+
case 'gtk4.linux.x86_64':
26+
dockerImage = 'eclipse/platformreleng-debian-swtnativebuild:12'
27+
break
28+
}
29+
if (dockerImage != null) {
2130
podTemplate(inheritFrom: 'basic' /* inherit general configuration */, containers: [
22-
containerTemplate(name: 'swtbuild', image: 'eclipse/platformreleng-debian-swtnativebuild:12',
31+
containerTemplate(name: 'swtbuild', image: dockerImage,
2332
resourceRequestCpu:'1000m', resourceRequestMemory:'512Mi',
2433
resourceLimitCpu:'2000m', resourceLimitMemory:'4096Mi',
2534
alwaysPullImage: true, command: 'cat', ttyEnabled: true)
@@ -199,6 +208,7 @@ pipeline {
199208
'gtk.linux.ppc64le',\
200209
'gtk.linux.riscv64',\
201210
'gtk.linux.x86_64',\
211+
'gtk4.linux.x86_64',\
202212
'win32.win32.aarch64',\
203213
'win32.win32.x86_64'
204214
}
@@ -220,22 +230,29 @@ pipeline {
220230
runOnNativeBuildAgent("${PLATFORM}") {
221231
cleanWs() // Workspace is not cleaned up by default, so we do it explicitly
222232
echo "OS: ${os}, ARCH: ${arch}"
223-
unstash "swt.binaries.sources.${ws}"
233+
unstash "swt.binaries.sources.${ws == 'gtk4' ? 'gtk' : ws }"
224234
dir('jdk.resources') {
225235
unstash "jdk.resources.${os}.${arch}"
226236
}
227237
withEnv(['MODEL=' + arch, "OUTPUT_DIR=${WORKSPACE}/libs", "SWT_JAVA_HOME=${WORKSPACE}/jdk.resources"]) {
228238
if (isUnix()){
229-
sh '''
239+
sh '''#!/bin/bash -x
230240
mkdir libs
231-
if [ "${PLATFORM}" = "gtk.linux.aarch64" ]; then
232-
sh build.sh -gtk3 install
233-
elif [ "${PLATFORM}" = "gtk.linux.ppc64le" ]; then
234-
sh build.sh -gtk3 install
235-
elif [ "${PLATFORM}" = "gtk.linux.riscv64" ]; then
236-
sh build.sh -gtk3 install
237-
else
241+
if [[ ${PLATFORM} == gtk.linux.* ]]; then
242+
sh build.sh -gtk3 checklibs install
243+
elif [[ ${PLATFORM} == gtk4.linux.* ]]; then
244+
# We build both 3 + 4, but we only keep libswt-pi4-gtk
245+
# We build both to help catch build errors as this
246+
# build runs against more modern gcc/libs and helps
247+
# with verification
248+
sh build.sh -gtk3 checklibs
249+
sh build.sh clean
250+
sh build.sh -gtk4 checklibs install-pi-only
251+
elif [[ ${PLATFORM} == cocoa.macosx.* ]]; then
238252
sh build.sh install
253+
else
254+
echo "Unexpected build platform ${PLATFORM}"
255+
exit 1
239256
fi
240257
ls -1R libs
241258
'''
@@ -258,12 +275,14 @@ pipeline {
258275
steps {
259276
dir("libs/${PLATFORM}") {
260277
unstash "swt.binaries.${PLATFORM}"
261-
sh '''
278+
sh '''#!/bin/bash -x
262279
if [[ ${PLATFORM} == cocoa.macosx.* ]]; then
263280
binariesExtension='jnilib'
264281
signerUrl='https://cbi.eclipse.org/macos/codesign/sign'
265-
elif [[ ${PLATFORM} == gtk.linux.* ]]; then
282+
elif [[ ${PLATFORM} == gtk.linux.* || ${PLATFORM} == gtk4.linux.* ]]; then
266283
binariesExtension='so'
284+
# Replace 'gtk4' by 'gtk' to copy the built gtk4 library into gtk fragment
285+
PLATFORM=${PLATFORM/#gtk4/gtk}
267286
elif [[ ${PLATFORM} == win32.win32.* ]]; then
268287
binariesExtension='dll'
269288
signerUrl='https://cbi.eclipse.org/authenticode/sign'
@@ -326,7 +345,7 @@ pipeline {
326345
post {
327346
always {
328347
junit 'eclipse.platform.swt/tests/*.test*/target/surefire-reports/*.xml'
329-
archiveArtifacts artifacts: '**/*.log,**/*.html,**/target/*.jar,**/target/*.zip'
348+
archiveArtifacts artifacts: '**/*.log,*/binaries/*/target/*.jar', excludes: '**/*-sources.jar'
330349
discoverGitReferenceBuild referenceJob: 'eclipse.platform.swt/master'
331350
// To accept unstable builds (test errors or new warnings introduced by third party changes) as reference using "ignoreQualityGate:true"
332351
recordIssues publishAllIssues: true, ignoreQualityGate:true, tools: [eclipse(name: 'Compiler and API Tools', pattern: '**/target/compilelogs/*.xml'), javaDoc()], qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:11b336d528211296817b66ca6829a6b6d17013c9da09ef9357b976a9a277acfb
3+
size 51952

binaries/org.eclipse.swt.cocoa.macosx.aarch64/libswt-awt-cocoa-4968r8.jnilib

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:61674b51e612822f15b0589cc983b888800fdecbd9b8fe560545ff062ca9fd61
3+
size 576624

binaries/org.eclipse.swt.cocoa.macosx.aarch64/libswt-cocoa-4968r8.jnilib

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:b8d445aca3572e0f26e7ab7c49e264e3e5301ded6952ef3f9c05a9f0f7724f7e
3+
size 298864

binaries/org.eclipse.swt.cocoa.macosx.aarch64/libswt-pi-cocoa-4968r8.jnilib

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:cfdc5a08fb5b7b9101f3efd96d86d4c285cd196112e51a234b34c92e41efe59c
3+
size 52352

binaries/org.eclipse.swt.cocoa.macosx.x86_64/libswt-awt-cocoa-4968r8.jnilib

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:72536bd481c8357ef282ece6419e004bd7d271db30ee60736e2ab1b07460029e
3+
size 514256

0 commit comments

Comments
 (0)