Skip to content

Commit d86d39b

Browse files
committed
Merge SWT native binaries into this repository stored in Git LFS
Configure this Git-repository to store the SWT native binaries, i.e. all *.so, *.dll and *jnilib files, using Git's Large File Storage (LFS) and move the platform-specific SWT fragments from the eclipse.platform.swt.binaries repository into the 'binaries' folder in this repository. The platform specific projects are copies (with only the adjustments necessary due to the move) of the corresponding projects from https://github.com/eclipse-platform/eclipse.platform.swt.binaries/tree/e58be4cbe6e638e5a190d019643bb11db49c3ade The native binary files are not copied because the build triggered by this commit will re-build and add them anyways. Additionally the 'forceQualifier.txt' from the native fragments are also left out since the main bundle only drives the qualifier. The commit procedure when the binaries are re-build is changed to commit the binary and pom changes in one commit. Fixes eclipse-platform/eclipse.platform.swt.binaries#2
1 parent 1c2e820 commit d86d39b

File tree

89 files changed

+12392
-208
lines changed

Some content is hidden

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

89 files changed

+12392
-208
lines changed

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
*.bat text eol=crlf
2+
*.dll filter=lfs diff=lfs merge=lfs -text
3+
*.so filter=lfs diff=lfs merge=lfs -text
4+
*.jnilib filter=lfs diff=lfs merge=lfs -text

.github/workflows/maven.yml

+1-15
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,8 @@ jobs:
3737
- name: checkout swt
3838
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3939
with:
40-
path: 'eclipse.platform.swt'
4140
fetch-depth: 0 # required for jgit timestamp provider to work
42-
- name: checkout swt.binaries
43-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
44-
with:
45-
path: eclipse.platform.swt.binaries
46-
repository: 'eclipse-platform/eclipse.platform.swt.binaries'
41+
lfs: true
4742
- name: Install Linux requirements
4843
run: sudo apt-get update -qq && sudo apt-get install -qq -y webkit2gtk-driver
4944
if: ${{ matrix.config.native == 'gtk.linux.x86_64'}}
@@ -57,13 +52,6 @@ jobs:
5752
uses: stCarolas/[email protected]
5853
with:
5954
maven-version: 3.9.2
60-
- name: Build swt.binaries fragments with Maven
61-
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 # v1.0.1
62-
with:
63-
run: >-
64-
mvn --batch-mode -Pbuild-individual-bundles -DforceContextQualifier=zzz
65-
-Dcompare-version-with-baselines.skip=true -Dmaven.compiler.failOnWarning=true install
66-
working-directory: eclipse.platform.swt.binaries
6755
- name: Build with Maven
6856
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 # v1.0.1
6957
with:
@@ -76,7 +64,6 @@ jobs:
7664
-DskipNativeTests=false
7765
-DfailIfNoTests=false
7866
clean install
79-
working-directory: eclipse.platform.swt
8067
- name: Performance tests
8168
if: contains(github.event.pull_request.labels.*.name, 'performance')
8269
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 # v1.0.1
@@ -91,7 +78,6 @@ jobs:
9178
-DfailIfNoTests=true
9279
-Dtest=PerformanceTests
9380
integration-test
94-
working-directory: eclipse.platform.swt/tests/org.eclipse.swt.tests
9581
- name: Upload Test Results for ${{ matrix.config.name }} / Java-${{ matrix.java }}
9682
if: always()
9783
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
bin/
22
*.log
33
target/
4+
/.project
45
.polyglot.*
56
pom.tycho
7+
8+
/binaries/org.eclipse.swt.*/src/
9+
tmpdir/

Jenkinsfile

+25-31
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2021, 2024 Red Hat Inc. and others.
3+
*
4+
* This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Public License 2.0
6+
* which accompanies this distribution, and is available at
7+
* https://www.eclipse.org/legal/epl-2.0/
8+
*
9+
* SPDX-License-Identifier: EPL-2.0
10+
*
11+
* Contributors:
12+
* Mickael Istria (Red Hat Inc.) - initial API and implementation
13+
* Hannes Wellmann - Build SWT-natives as part of master- and verification-builds
14+
* Hannes Wellmann - Move SWT native binaries in this repository using Git-LFS
15+
*******************************************************************************/
16+
117
def nativeBuildAgent(String platform, Closure body) {
218
def final nativeBuildStageName = 'Build SWT-native binaries'
319
if (platform == 'gtk.linux.x86_64') {
@@ -71,17 +87,15 @@ pipeline {
7187
}
7288
}
7389
sh '''
90+
git version
91+
git lfs version
92+
git config --unset core.hooksPath # Jenkins disables hooks by default as security feature, but we need the hooks for LFS
93+
git lfs update # Install Git LFS hooks in repository, which has been skipped due to the initially nulled hookspath
94+
git lfs pull
7495
git fetch --all --tags --quiet
7596
git remote set-url --push origin [email protected]:eclipse-platform/eclipse.platform.swt.git
7697
'''
7798
}
78-
dir('eclipse.platform.swt.binaries') {
79-
checkout([$class: 'GitSCM', branches: [[name: 'refs/heads/master']],
80-
extensions: [[$class: 'CloneOption', timeout: 120, noTags: false ]],
81-
userRemoteConfigs: [[url: 'https://github.com/eclipse-platform/eclipse.platform.swt.binaries.git']]
82-
])
83-
sh 'git remote set-url --push origin [email protected]:eclipse-platform/eclipse.platform.swt.binaries.git'
84-
}
8599
}
86100
}
87101
stage('Check if SWT-binaries build is needed') {
@@ -115,7 +129,7 @@ pipeline {
115129
stages {
116130
stage("Collect SWT-native's sources") {
117131
steps {
118-
dir('eclipse.platform.swt.binaries/bundles'){
132+
dir('eclipse.platform.swt/binaries'){
119133
withAnt(installation: 'apache-ant-latest', jdk: 'openjdk-jdk11-latest') { // nashorn javascript-engine required in ant-scripts
120134
sh '''
121135
pfSpec=(${PLATFORM//"."/ })
@@ -205,7 +219,7 @@ pipeline {
205219
fi
206220
}
207221
208-
binaryFragmentsRoot=${WORKSPACE}/eclipse.platform.swt.binaries/bundles
222+
binaryFragmentsRoot=${WORKSPACE}/eclipse.platform.swt/binaries
209223
210224
if [[ ${PLATFORM} == cocoa.macosx.* ]]; then
211225
#TODO: Instead use (with adjusted URL): https://github.com/eclipse-cbi/org.eclipse.cbi/tree/main/maven-plugins/eclipse-winsigner-plugin
@@ -245,7 +259,7 @@ pipeline {
245259
withAnt(installation: 'apache-ant-latest', jdk: 'openjdk-jdk11-latest') { // nashorn javascript-engine required in ant-scripts
246260
//The maven build reads the git-history so we should have to commit the native-binaries before building
247261
sh '''
248-
pushd eclipse.platform.swt.binaries
262+
pushd eclipse.platform.swt
249263
git add --all *
250264
echo "git status after add"
251265
git status
@@ -259,11 +273,6 @@ pipeline {
259273
git status
260274
git log -p -2
261275
popd
262-
263-
pushd eclipse.platform.swt.binaries
264-
git status
265-
git log -p -1
266-
popd
267276
'''
268277
}
269278
}
@@ -276,13 +285,6 @@ pipeline {
276285
}
277286
steps {
278287
xvnc(useXauthority: true) {
279-
dir('eclipse.platform.swt.binaries') {
280-
sh '''
281-
mvn install \
282-
--batch-mode -Pbuild-individual-bundles -DforceContextQualifier=zzz \
283-
-Dcompare-version-with-baselines.skip=true -Dmaven.compiler.failOnWarning=true
284-
'''
285-
}
286288
dir('eclipse.platform.swt') {
287289
sh '''
288290
mvn clean verify \
@@ -310,7 +312,7 @@ pipeline {
310312
sshagent(['github-bot-ssh']) {
311313
script {
312314
def newSWTNativesTag = null;
313-
dir('eclipse.platform.swt.binaries') {
315+
dir('eclipse.platform.swt') {
314316
newSWTNativesTag = sh(script: 'git describe --abbrev=0 --tags --match v[0-9][0-9][0-9][0-9]*', returnStdout: true).strip()
315317
}
316318
echo "newSWTNativesTag: ${newSWTNativesTag}"
@@ -326,11 +328,6 @@ pipeline {
326328
git push origin refs/tags/${newSWTNativesTag}
327329
popd
328330
329-
pushd eclipse.platform.swt.binaries
330-
git push origin HEAD:refs/heads/${BRANCH_NAME}
331-
git push origin refs/tags/${newSWTNativesTag}
332-
popd
333-
334331
exit 0
335332
else
336333
echo Committing is skipped
@@ -342,9 +339,6 @@ pipeline {
342339
pushd eclipse.platform.swt
343340
git log -n 2
344341
popd
345-
pushd eclipse.platform.swt.binaries
346-
git log -n 2
347-
popd
348342
"""
349343
}
350344
}

NOTICE

-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,5 @@ The project maintains the following source code repositories:
3232
* https://github.com/eclipse-platform/eclipse.platform.releng.buildtools.git
3333
* https://github.com/eclipse-platform/eclipse.platform.releng.git
3434
* https://github.com/eclipse-platform/eclipse.platform.swt.git
35-
* https://github.com/eclipse-platform/eclipse.platform.swt.binaries.git
3635
* https://github.com/eclipse-platform/eclipse.platform.ua.git
3736
* https://github.com/eclipse-platform/eclipse.platform.ui.git

binaries/binaries-parent/build.xml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project name="org.eclipse.swt.${ws}.${os}.${arch}" default="build.jars" basedir=".">
3+
4+
<property name="swt.ws" value="${ws}" />
5+
<property name="swt.os" value="${os}" />
6+
<property name="swt.arch" value="${arch}" />
7+
8+
<property name="plugindir" value="../../bundles/org.eclipse.swt"/>
9+
<import file="${plugindir}/buildFragment.xml"/>
10+
<import file="${plugindir}/buildSWT.xml"/>
11+
</project>

binaries/binaries-parent/pom.xml

+164
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<!--
3+
###############################################################################
4+
# Copyright (c) 2012, 2018 Red Hat, Inc and others.
5+
# All rights reserved. This program and the accompanying materials
6+
# are made available under the terms of the Eclipse Public License v1.0
7+
# which accompanies this distribution, and is available at
8+
# http://www.eclipse.org/legal/epl-v10.html
9+
#
10+
# Contributors:
11+
# Krzysztof Daniel, Red Hat, Inc. - initial API and implementation
12+
###############################################################################
13+
-->
14+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
15+
<modelVersion>4.0.0</modelVersion>
16+
<parent>
17+
<artifactId>eclipse.platform.swt.binaries</artifactId>
18+
<groupId>eclipse.platform.swt.binaries</groupId>
19+
<version>4.31.0-SNAPSHOT</version>
20+
</parent>
21+
22+
<artifactId>binaries-parent</artifactId>
23+
<packaging>pom</packaging>
24+
25+
<properties>
26+
<!--
27+
forceContextQualifier gets updated during build input process using
28+
ant script <SWT source repo>/bundles/org.eclipse.swt/buildInternal.xml
29+
-->
30+
<forceContextQualifier>v20240108-0716</forceContextQualifier>
31+
<buildid>${buildId}</buildid>
32+
</properties>
33+
34+
<build>
35+
<plugins>
36+
<plugin>
37+
<artifactId>maven-clean-plugin</artifactId>
38+
<configuration>
39+
<filesets>
40+
<fileset>
41+
<directory>src</directory>
42+
<includes>
43+
<include>**/*</include>
44+
</includes>
45+
<followSymlinks>false</followSymlinks>
46+
</fileset>
47+
</filesets>
48+
</configuration>
49+
</plugin>
50+
<plugin>
51+
<groupId>org.eclipse.tycho</groupId>
52+
<artifactId>tycho-compiler-plugin</artifactId>
53+
<configuration>
54+
<release>17</release>
55+
</configuration>
56+
</plugin>
57+
<plugin>
58+
<groupId>org.eclipse.tycho</groupId>
59+
<artifactId>tycho-packaging-plugin</artifactId>
60+
<configuration>
61+
<forceContextQualifier>${forceContextQualifier}</forceContextQualifier>
62+
</configuration>
63+
</plugin>
64+
<plugin>
65+
<groupId>org.eclipse.tycho</groupId>
66+
<artifactId>target-platform-configuration</artifactId>
67+
<configuration>
68+
<executionEnvironment>JavaSE-17</executionEnvironment>
69+
<dependency-resolution>
70+
<profileProperties>
71+
<!-- set property so that the filter condition on the p2 dependencies from org.eclipse.swt to the fragments does not match -->
72+
<org.eclipse.swt.buildtime>true</org.eclipse.swt.buildtime>
73+
</profileProperties>
74+
</dependency-resolution>
75+
<environments>
76+
<environment>
77+
<os>${os}</os>
78+
<ws>${ws}</ws>
79+
<arch>${arch}</arch>
80+
</environment>
81+
</environments>
82+
</configuration>
83+
</plugin>
84+
<plugin>
85+
<artifactId>maven-antrun-plugin</artifactId>
86+
<executions>
87+
<execution>
88+
<id>normal</id>
89+
<phase>initialize</phase>
90+
<goals>
91+
<goal>run</goal>
92+
</goals>
93+
<configuration>
94+
<target>
95+
<property name="copy.src.dir" value="src" />
96+
<ant antfile="../binaries-parent/build.xml" target="copy.${ws}.src" />
97+
</target>
98+
</configuration>
99+
</execution>
100+
<execution>
101+
<id>natives</id>
102+
<phase>process-resources</phase>
103+
<goals>
104+
<goal>run</goal>
105+
</goals>
106+
<configuration>
107+
<target>
108+
<!-- See https://stackoverflow.com/a/53227117 and http://ant-contrib.sourceforge.net/tasks/tasks/index.html -->
109+
<taskdef resource="net/sf/antcontrib/antlib.xml" />
110+
<if>
111+
<equals arg1="${native}" arg2="${ws}.${os}.${arch}" />
112+
<then>
113+
<ant antfile="../binaries-parent/build.xml" target="build_libraries" />
114+
</then>
115+
</if>
116+
</target>
117+
</configuration>
118+
</execution>
119+
<execution>
120+
<id>swtdownload</id>
121+
<phase>package</phase>
122+
<goals>
123+
<goal>run</goal>
124+
</goals>
125+
<configuration>
126+
<target>
127+
<property name="eclipse.version" value="${releaseNumberSDK}" />
128+
<ant antfile="../binaries-parent/build.xml" target="swtdownload" />
129+
</target>
130+
</configuration>
131+
</execution>
132+
</executions>
133+
<dependencies>
134+
<dependency>
135+
<groupId>org.mozilla</groupId>
136+
<artifactId>rhino-runtime</artifactId>
137+
<version>1.7.14</version>
138+
</dependency>
139+
<dependency>
140+
<groupId>org.apache.ant</groupId>
141+
<artifactId>ant</artifactId>
142+
<version>1.10.14</version>
143+
</dependency>
144+
<dependency>
145+
<groupId>org.apache.ant</groupId>
146+
<artifactId>ant-apache-bsf</artifactId>
147+
<version>1.10.14</version>
148+
</dependency>
149+
<dependency>
150+
<groupId>ant-contrib</groupId>
151+
<artifactId>ant-contrib</artifactId>
152+
<version>1.0b3</version>
153+
<exclusions>
154+
<exclusion>
155+
<groupId>ant</groupId>
156+
<artifactId>ant</artifactId>
157+
</exclusion>
158+
</exclusions>
159+
</dependency>
160+
</dependencies>
161+
</plugin>
162+
</plugins>
163+
</build>
164+
</project>

0 commit comments

Comments
 (0)