Skip to content

Commit 32c534c

Browse files
authored
attempt to fix the mac os builds (#1288)
* attempt to fix the mac os builds * remove debug prints * disable Mac stage for now as it is broken - it takes 4h to run a 10 seconds cmake configure! - re-enable the Mac stage when we find the issue - comment out linux32bit and mac ssh uploads
1 parent 10671e8 commit 32c534c

2 files changed

Lines changed: 50 additions & 12 deletions

File tree

Jenkinsfile

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ pipeline {
99
}
1010
parameters {
1111
booleanParam(name: 'MSVC64', defaultValue: true, description: 'Build with MSVC64 (often hangs)')
12+
booleanParam(name: 'LINUX', defaultValue: true, description: 'Build with LINUX')
1213
booleanParam(name: 'MINGW_UCRT64', defaultValue: true, description: 'Build with MINGW/UCRT64')
14+
booleanParam(name: 'MINGW_UCRT64_CLANG', defaultValue: true, description: 'Build with MINGW/UCRT64 with clang')
1315
booleanParam(name: 'MACOS_ARM64', defaultValue: false, description: 'Build with macOS-arm64 (M1 mac)')
1416
booleanParam(name: 'LINUX64_ASAN', defaultValue: false, description: 'Build with linux64 asan')
1517
booleanParam(name: 'SUBMODULE_UPDATE', defaultValue: false, description: 'Allow pull request to update submodules (disabled by default due to common user errors)')
@@ -32,6 +34,10 @@ pipeline {
3234
stage('build') {
3335
parallel {
3436
stage('linux64') {
37+
when {
38+
expression { return params.LINUX }
39+
beforeAgent true
40+
}
3541
agent {
3642
dockerfile {
3743
additionalBuildArgs '--pull'
@@ -118,6 +124,10 @@ pipeline {
118124
}
119125
}
120126
stage('alpine') {
127+
when {
128+
expression { return params.LINUX }
129+
beforeAgent true
130+
}
121131
agent {
122132
dockerfile {
123133
additionalBuildArgs '--pull'
@@ -215,7 +225,10 @@ pipeline {
215225
label 'M1'
216226
}
217227
environment {
218-
PATH="/opt/homebrew/bin:/opt/homebrew/opt/openjdk/bin:/usr/local/bin:${env.PATH}"
228+
PATH="/opt/homebrew/bin:/opt/homebrew/opt/openjdk/bin:/opt/homebrew/opt/icu4c/bin:/opt/homebrew/opt/icu4c/sbin:/usr/local/bin:${env.PATH}"
229+
PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c/lib/pkgconfig"
230+
LDFLAGS="-L/opt/homebrew/opt/icu4c/lib"
231+
CPPFLAGS="-I/opt/homebrew/opt/icu4c/include"
219232
}
220233
steps {
221234
buildOMS()
@@ -332,6 +345,10 @@ EXIT /b 1
332345
}
333346

334347
stage('mingw-ucrt64-clang') {
348+
when {
349+
expression { return params.MINGW_UCRT64_CLANG }
350+
beforeAgent true
351+
}
335352
agent {
336353
label 'omsimulator-windows'
337354
}
@@ -507,10 +524,10 @@ EXIT /b 1
507524
}
508525
steps {
509526
unstash name: 'amd64-zip' // includes: "OMSimulator-linux-amd64-*.tar.gz"
510-
unstash name: 'arm32-zip' // includes: "OMSimulator-linux-arm32-*.tar.gz"
527+
// unstash name: 'arm32-zip' // includes: "OMSimulator-linux-arm32-*.tar.gz"
511528
unstash name: 'mingw-ucrt64-zip' // includes: "OMSimulator-mingw-ucrt64-*.zip"
512529
unstash name: 'win64-zip' // includes: "OMSimulator-win64-*.zip"
513-
unstash name: 'osx-zip' // includes: "OMSimulator-osx-*.zip"
530+
// unstash name: 'osx-zip' // includes: "OMSimulator-osx-*.zip"
514531

515532
sh "ls *.zip *.tar.gz"
516533

@@ -519,18 +536,18 @@ EXIT /b 1
519536
sshPublisherDesc(
520537
configName: 'OMSimulator',
521538
transfers: [
522-
sshTransfer(
523-
remoteDirectory: "${DEPLOYMENT_PREFIX}linux-arm32/",
524-
sourceFiles: 'OMSimulator-linux-arm32-*.tar.gz'),
539+
//sshTransfer(
540+
// remoteDirectory: "${DEPLOYMENT_PREFIX}linux-arm32/",
541+
// sourceFiles: 'OMSimulator-linux-arm32-*.tar.gz'),
525542
sshTransfer(
526543
remoteDirectory: "${DEPLOYMENT_PREFIX}linux-amd64/",
527544
sourceFiles: 'OMSimulator-linux-amd64-*.tar.gz'),
528545
sshTransfer(
529546
remoteDirectory: "${DEPLOYMENT_PREFIX}win-mingw-ucrt64/",
530547
sourceFiles: 'OMSimulator-mingw-ucrt64-*.zip'),
531-
sshTransfer(
532-
remoteDirectory: "${DEPLOYMENT_PREFIX}osx/",
533-
sourceFiles: 'OMSimulator-osx-*.zip'),
548+
//sshTransfer(
549+
// remoteDirectory: "${DEPLOYMENT_PREFIX}osx/",
550+
// sourceFiles: 'OMSimulator-osx-*.zip'),
534551
sshTransfer(
535552
remoteDirectory: "${DEPLOYMENT_PREFIX}win-msvc64/",
536553
sourceFiles: 'OMSimulator-win64-*.zip')
@@ -592,6 +609,16 @@ def isWindows() {
592609
return !isUnix()
593610
}
594611

612+
def isMac() {
613+
if (isUnix()) {
614+
def uname = sh script: 'uname', returnStdout: true
615+
if (uname.startsWith("Darwin")) {
616+
return true
617+
}
618+
}
619+
return false
620+
}
621+
595622
void buildOMS() {
596623
if (isWindows()) {
597624
bat ("""
@@ -619,8 +646,15 @@ void buildOMS() {
619646
echo "running on node: ${env.NODE_NAME}"
620647
def nproc = numPhysicalCPU()
621648
sh "git fetch --tags"
622-
sh "cmake -S . -B build/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install/ -DOM_OMS_ENABLE_TESTSUITE:BOOL=ON"
623-
sh "cmake --build build/ --parallel ${nproc} --target install -v"
649+
if (isMac()) {
650+
sh('''#!/bin/zsh -l
651+
cmake -S . -B build/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install/ -DOM_OMS_ENABLE_TESTSUITE:BOOL=ON
652+
cmake --build build/ --parallel ${nproc} --target install -v
653+
''')
654+
} else {
655+
sh "cmake -S . -B build/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install/ -DOM_OMS_ENABLE_TESTSUITE:BOOL=ON"
656+
sh "cmake --build build/ --parallel ${nproc} --target install -v"
657+
}
624658
}
625659
}
626660

@@ -677,6 +711,10 @@ def shouldWeBuildMINGW() {
677711
}
678712

679713
def shouldWeBuildMacOSArm64() {
714+
/* M1 Mac takes 4h to do a 10 seconds cmake configure!!!!!
715+
* disable the M1 until we find out what the issue is
716+
*/
717+
return false
680718
if (isPR()) {
681719
if (pullRequest.labels.contains("CI/macOS-arm64")) {
682720
return true

testsuite/rtest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ $nodelete = 0;
9999

100100
sub isMinGW_UCRT {
101101
my $temp = $ENV{'MSYSTEM'};
102-
print("MSYSTEM: " . $temp . "\n");
102+
# print("MSYSTEM: " . $temp . "\n");
103103
if (defined $temp) {
104104
return ($^O eq 'MSWin32') && ($temp eq 'UCRT64');
105105
} else {

0 commit comments

Comments
 (0)