From 39389a24f0bcd29a3322b6337d095f01b1d85c09 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sun, 7 Jan 2024 07:48:17 +0100 Subject: [PATCH] [Build] Use git-based qualifier in o.e.swt and its native fragments This avoids committing the changes of the 'forceContextQualifier' properties in the org.eclipse.swt/pom.xml and the binaries/pom.xml after each change in org.eclipse.swt. Consequently this avoids the noise in the git-history from these qualifier-change commits and the need to await the completion of subsequent master-branch builds for consistent build-qualifiers even for changes that don't change the native binaries. If not done, this affected the stability of I-builds. Furthermore this allows further simplifications of the SWT build. Part of https://github.com/eclipse-platform/eclipse.platform.swt/issues/513 --- Jenkinsfile | 9 ++--- binaries/pom.xml | 33 +++++++++++---- bundles/org.eclipse.swt/buildInternal.xml | 49 ----------------------- bundles/org.eclipse.swt/buildSWT.xml | 26 +----------- bundles/org.eclipse.swt/pom.xml | 26 +++++++----- 5 files changed, 46 insertions(+), 97 deletions(-) delete mode 100644 bundles/org.eclipse.swt/buildInternal.xml diff --git a/Jenkinsfile b/Jenkinsfile index 4bfc844dfd9..ac0d9df62ff 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -116,7 +116,7 @@ pipeline { when { anyOf { expression { return params.forceNativeBuilds } - expression { return fileExists('tmp/build_changed.txt') && fileExists('tmp/natives_changed.txt') } + expression { return fileExists('tmp/natives_changed.txt') } } } matrix { @@ -253,7 +253,7 @@ pipeline { } stage('Commit SWT-native binaries, if build') { when { - expression { return params.forceNativeBuilds || fileExists('tmp/build_changed.txt') } + expression { return params.forceNativeBuilds || fileExists('tmp/natives_changed.txt') } } steps { withAnt(installation: 'apache-ant-latest', jdk: 'openjdk-jdk11-latest') { // nashorn javascript-engine required in ant-scripts @@ -265,8 +265,7 @@ pipeline { git status popd - ant -f eclipse.platform.swt/bundles/org.eclipse.swt/buildInternal.xml write_qualifier -Dlib.dir=${WORKSPACE} -Dbuild_changed=true - ant -f eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml commit_poms_and_binaries + ant -f eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml commit_binaries ant -f eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml tag_projects pushd eclipse.platform.swt @@ -306,7 +305,7 @@ pipeline { } stage('Push SWT-native binaries, if build') { when { - expression { return params.forceNativeBuilds || fileExists('tmp/build_changed.txt') } + expression { return params.forceNativeBuilds || fileExists('tmp/natives_changed.txt') } } steps { sshagent(['github-bot-ssh']) { diff --git a/binaries/pom.xml b/binaries/pom.xml index 923adf33ab1..de56e15dec3 100644 --- a/binaries/pom.xml +++ b/binaries/pom.xml @@ -27,11 +27,6 @@ pom - - v20240110-1244 ${buildId} 17 @@ -92,13 +87,35 @@ org.eclipse.tycho tycho-packaging-plugin - - ${forceContextQualifier} - + + + default-build-qualifier + initialize + + build-qualifier + + + ${swtBuildQualifier} + + + maven-antrun-plugin + + read-build-qualifier + validate + + run + + + + + + true + + normal initialize diff --git a/bundles/org.eclipse.swt/buildInternal.xml b/bundles/org.eclipse.swt/buildInternal.xml deleted file mode 100644 index 6aa997424e1..00000000000 --- a/bundles/org.eclipse.swt/buildInternal.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - ${build.qualifier} - - - - - - - - - diff --git a/bundles/org.eclipse.swt/buildSWT.xml b/bundles/org.eclipse.swt/buildSWT.xml index 395a033a1fe..4042af73fdf 100644 --- a/bundles/org.eclipse.swt/buildSWT.xml +++ b/bundles/org.eclipse.swt/buildSWT.xml @@ -44,8 +44,6 @@ - - Checking ${fragment} @@ -99,17 +97,6 @@ - - - - - - - - - Has build changes: ${build_changed} checked against ${swt_tag} - - @@ -245,13 +232,6 @@ - - - - - - - @@ -402,7 +382,7 @@ - + @@ -411,10 +391,6 @@ - - - - diff --git a/bundles/org.eclipse.swt/pom.xml b/bundles/org.eclipse.swt/pom.xml index 37cca70faef..d7078334598 100644 --- a/bundles/org.eclipse.swt/pom.xml +++ b/bundles/org.eclipse.swt/pom.xml @@ -25,22 +25,28 @@ eclipse-plugin - - v20240110-1244 Eclipse SWT Accessibility/cocoa,Eclipse SWT Accessibility/common,Eclipse SWT Accessibility/gtk,Eclipse SWT Accessibility/win32,Eclipse SWT AWT/cocoa,Eclipse SWT AWT/common,Eclipse SWT AWT/gtk,Eclipse SWT AWT/win32,Eclipse SWT Browser/cocoa,Eclipse SWT Browser/common,Eclipse SWT Browser/gtk,Eclipse SWT Browser/win32,Eclipse SWT Custom Widgets/common,Eclipse SWT Drag and Drop/cocoa,Eclipse SWT Drag and Drop/common,Eclipse SWT Drag and Drop/gtk,Eclipse SWT Drag and Drop/win32,Eclipse SWT OLE Win32/win32,Eclipse SWT OpenGL/cocoa,Eclipse SWT OpenGL/common,Eclipse SWT OpenGL/glx,Eclipse SWT OpenGL/gtk,Eclipse SWT OpenGL/win32,Eclipse SWT PI/cairo,Eclipse SWT PI/cocoa,Eclipse SWT PI/common,Eclipse SWT PI/gtk,Eclipse SWT PI/win32,Eclipse SWT Printing/cocoa,Eclipse SWT Printing/common,Eclipse SWT Printing/gtk,Eclipse SWT Printing/win32,Eclipse SWT Program/cocoa,Eclipse SWT Program/common,Eclipse SWT Program/gtk,Eclipse SWT Program/win32,Eclipse SWT WebKit/cocoa,Eclipse SWT WebKit/gtk,Eclipse SWT/cairo,Eclipse SWT/cocoa,Eclipse SWT/common,Eclipse SWT/emulated/bidi,Eclipse SWT/emulated/coolbar,Eclipse SWT/emulated/expand,Eclipse SWT/emulated/taskbar,Eclipse SWT/emulated/tooltip,Eclipse SWT/gtk,Eclipse SWT/win32 - org.eclipse.tycho - tycho-packaging-plugin - - ${forceContextQualifier} - + org.apache.maven.plugins + maven-antrun-plugin + + + write-build-qualifier + generate-resources + + run + + + + + + + + org.eclipse.tycho