Skip to content

Commit

Permalink
[FIXUP] try to fix Git LFS installation and fix Oomph setup
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Jan 4, 2024
1 parent 7ebf16a commit c85cf54
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 28 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
- name: checkout swt
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: 'eclipse.platform.swt' #TODO: is this still necessary?
fetch-depth: 0 # required for jgit timestamp provider to work
lfs: true
- name: Install Linux requirements
Expand All @@ -58,15 +57,13 @@ jobs:
with:
run: >-
mvn --batch-mode -V -U
-DforceContextQualifier=zzz
-DforkCount=1
-Dcompare-version-with-baselines.skip=false
-Dmaven.compiler.failOnWarning=true
--fail-at-end
-DskipNativeTests=false
-DfailIfNoTests=false
clean install
working-directory: eclipse.platform.swt
- name: Performance tests
if: contains(github.event.pull_request.labels.*.name, 'performance')
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 # v1.0.1
Expand All @@ -81,7 +78,6 @@ jobs:
-DfailIfNoTests=true
-Dtest=PerformanceTests
integration-test
working-directory: eclipse.platform.swt/tests/org.eclipse.swt.tests
- name: Upload Test Results for ${{ matrix.config.name }} / Java-${{ matrix.java }}
if: always()
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
Expand Down
26 changes: 18 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,16 @@ pipeline {
}
stages {
stage('Checkout swt git repos') {
environment {
PATH = "${WORKSPACE}/tools/git-lfs:${env.PATH}" // Add git-lfs (installed subsequently) to PATH explicitly until it is available by default
}
steps {
dir('tools') { // download git-lfs until it is available by default
sh '''
curl -L https://github.com/git-lfs/git-lfs/releases/download/v3.4.1/git-lfs-linux-amd64-v3.4.1.tar.gz | tar -xzf -
mv git-lfs-* git-lfs
'''
}
withEnv(["PATH=${WORKSPACE}/tools/git-lfs:" + env.PATH]) {
dir('eclipse.platform.swt') {
checkout scm
script {
Expand All @@ -94,19 +96,23 @@ pipeline {
}
}
sh '''
echo $PATH
git version
git lfs version
git lfs install --local # install Git LFS only locally for the repository
git config --list --show-origin
git config --unset core.hooksPath # Jenkins disables hooks by default as security feature, but we need the hooks for lfs
git lfs install --local # install Git LFS only locally for the repository but skip the hooks that have been added manually above
git config core.hookspath '/dev/null'
git lfs pull
git fetch --all --tags --quiet
git remote set-url --push origin git@github.com:eclipse-platform/eclipse.platform.swt.git
'''
}
}
}
}
stage('Check if SWT-binaries build is needed') {
environment {
PATH = "${WORKSPACE}/tools/git-lfs:${env.PATH}" // Add git-lfs (installed subsequently) to PATH explicitly until it is available by default
}
steps {
withAnt(installation: 'apache-ant-latest', jdk: 'openjdk-jdk11-latest') { // nashorn javascript-engine required in ant-scripts
sh'''
Expand Down Expand Up @@ -183,8 +189,9 @@ pipeline {
ls -1R libs
'''
} else {
withEnv(['PATH=C:\\tools\\cygwin\\bin;' + env.PATH]) {
withEnv(['PATH=C:\\tools\\cygwin\\bin;' + env.PATH.replace(':',';')]) {
bat '''
echo %PATH%
unzip org.eclipse.swt.%PLATFORM%.master.zip
rm org.eclipse.swt.%PLATFORM%.master.zip
mkdir libs
Expand Down Expand Up @@ -260,6 +267,9 @@ pipeline {
}
}
stage('Commit SWT-native binaries, if build') {
environment {
PATH = "${WORKSPACE}/tools/git-lfs:${env.PATH}" // Add git-lfs (installed subsequently) to PATH explicitly until it is available by default
}
when {
expression { return params.forceNativeBuilds || fileExists ('tmp/build_changed.txt') }
}
Expand Down Expand Up @@ -297,7 +307,6 @@ pipeline {
sh '''
mvn clean verify \
--batch-mode -DforkCount=0 \
-DforceContextQualifier=zzz
-Dcompare-version-with-baselines.skip=false -Dmaven.compiler.failOnWarning=true \
-Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true
'''
Expand All @@ -314,6 +323,9 @@ pipeline {
}
}
stage('Push SWT-native binaries, if build') {
environment {
PATH = "${WORKSPACE}/tools/git-lfs:${env.PATH}" // Add git-lfs (installed subsequently) to PATH explicitly until it is available by default
}
when {
expression { return params.forceNativeBuilds || fileExists ('tmp/build_changed.txt') }
}
Expand All @@ -325,7 +337,6 @@ pipeline {
newSWTNativesTag = sh(script: 'git describe --abbrev=0 --tags --match v[0-9][0-9][0-9][0-9]*', returnStdout: true).strip()
}
echo "newSWTNativesTag: ${newSWTNativesTag}"
withEnv(["PATH=${WORKSPACE}/tools/git-lfs:" + env.PATH]) { //TODO: remove this once GIT-LFS is installed by default
sh """
# Check for the master-branch as late as possible to have as much of the same behaviour as possible
if [[ '${BRANCH_NAME}' == master ]] || [[ '${BRANCH_NAME}' =~ R[0-9]+_[0-9]+(_[0-9]+)?_maintenance ]]; then
Expand All @@ -350,7 +361,6 @@ pipeline {
git log -n 2
popd
"""
}
}
}
}
Expand Down
20 changes: 4 additions & 16 deletions bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
xsi:type="predicates:NotPredicate">
<operand
xsi:type="predicates:OrPredicate">
<operand
xsi:type="predicates:NamePredicate"
pattern=".*(cocoa|gtk|win32)(\.(macosx|aix|hpux|linux|solaris|win32)(\.(x86_64|ppc64|ia64|aarch64|arm|ppc64|ppc64le|s390|s390x|x86|sparcv9))?)?"/>
<operand
xsi:type="predicates:NamePredicate"
pattern="org\.eclipse\.swt\.opengl\.examples">
Expand All @@ -98,26 +101,11 @@
</detail>
</annotation>
</operand>
<operand
xsi:type="predicates:NamePredicate"
pattern="org\.eclipse\.swt\.tests\.cocoa"/>
<operand
xsi:type="predicates:NamePredicate"
pattern="org\.eclipse\.swt\.tests\.win32"/>
<operand
xsi:type="predicates:NamePredicate"
pattern="org\.eclipse\.swt\.tests\.gtk"/>
<operand
xsi:type="predicates:NamePredicate"
pattern="org\.eclipse\.swt\.examples\.ole\.win32"/>
</operand>
</operand>
<operand
xsi:type="predicates:NamePredicate"
pattern="org\.eclipse\.swt\.tests\.${osgi.ws}"/>
<operand
xsi:type="predicates:NamePredicate"
pattern="org\.eclipse\.swt\.examples\.ole\.${osgi.ws}"/>
pattern=".*\.${osgi.ws}(\.${osgi.os}(\.${osgi.arch})?)?"/>
</predicate>
</sourceLocator>
</targlet>
Expand Down

0 comments on commit c85cf54

Please sign in to comment.