Skip to content

Commit

Permalink
attempt to fix the mac os builds (#1288)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
adrpo committed Mar 21, 2024
1 parent 10671e8 commit 32c534c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 12 deletions.
60 changes: 49 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ pipeline {
}
parameters {
booleanParam(name: 'MSVC64', defaultValue: true, description: 'Build with MSVC64 (often hangs)')
booleanParam(name: 'LINUX', defaultValue: true, description: 'Build with LINUX')
booleanParam(name: 'MINGW_UCRT64', defaultValue: true, description: 'Build with MINGW/UCRT64')
booleanParam(name: 'MINGW_UCRT64_CLANG', defaultValue: true, description: 'Build with MINGW/UCRT64 with clang')
booleanParam(name: 'MACOS_ARM64', defaultValue: false, description: 'Build with macOS-arm64 (M1 mac)')
booleanParam(name: 'LINUX64_ASAN', defaultValue: false, description: 'Build with linux64 asan')
booleanParam(name: 'SUBMODULE_UPDATE', defaultValue: false, description: 'Allow pull request to update submodules (disabled by default due to common user errors)')
Expand All @@ -32,6 +34,10 @@ pipeline {
stage('build') {
parallel {
stage('linux64') {
when {
expression { return params.LINUX }
beforeAgent true
}
agent {
dockerfile {
additionalBuildArgs '--pull'
Expand Down Expand Up @@ -118,6 +124,10 @@ pipeline {
}
}
stage('alpine') {
when {
expression { return params.LINUX }
beforeAgent true
}
agent {
dockerfile {
additionalBuildArgs '--pull'
Expand Down Expand Up @@ -215,7 +225,10 @@ pipeline {
label 'M1'
}
environment {
PATH="/opt/homebrew/bin:/opt/homebrew/opt/openjdk/bin:/usr/local/bin:${env.PATH}"
PATH="/opt/homebrew/bin:/opt/homebrew/opt/openjdk/bin:/opt/homebrew/opt/icu4c/bin:/opt/homebrew/opt/icu4c/sbin:/usr/local/bin:${env.PATH}"
PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c/lib/pkgconfig"
LDFLAGS="-L/opt/homebrew/opt/icu4c/lib"
CPPFLAGS="-I/opt/homebrew/opt/icu4c/include"
}
steps {
buildOMS()
Expand Down Expand Up @@ -332,6 +345,10 @@ EXIT /b 1
}

stage('mingw-ucrt64-clang') {
when {
expression { return params.MINGW_UCRT64_CLANG }
beforeAgent true
}
agent {
label 'omsimulator-windows'
}
Expand Down Expand Up @@ -507,10 +524,10 @@ EXIT /b 1
}
steps {
unstash name: 'amd64-zip' // includes: "OMSimulator-linux-amd64-*.tar.gz"
unstash name: 'arm32-zip' // includes: "OMSimulator-linux-arm32-*.tar.gz"
// unstash name: 'arm32-zip' // includes: "OMSimulator-linux-arm32-*.tar.gz"
unstash name: 'mingw-ucrt64-zip' // includes: "OMSimulator-mingw-ucrt64-*.zip"
unstash name: 'win64-zip' // includes: "OMSimulator-win64-*.zip"
unstash name: 'osx-zip' // includes: "OMSimulator-osx-*.zip"
// unstash name: 'osx-zip' // includes: "OMSimulator-osx-*.zip"

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

Expand All @@ -519,18 +536,18 @@ EXIT /b 1
sshPublisherDesc(
configName: 'OMSimulator',
transfers: [
sshTransfer(
remoteDirectory: "${DEPLOYMENT_PREFIX}linux-arm32/",
sourceFiles: 'OMSimulator-linux-arm32-*.tar.gz'),
//sshTransfer(
// remoteDirectory: "${DEPLOYMENT_PREFIX}linux-arm32/",
// sourceFiles: 'OMSimulator-linux-arm32-*.tar.gz'),
sshTransfer(
remoteDirectory: "${DEPLOYMENT_PREFIX}linux-amd64/",
sourceFiles: 'OMSimulator-linux-amd64-*.tar.gz'),
sshTransfer(
remoteDirectory: "${DEPLOYMENT_PREFIX}win-mingw-ucrt64/",
sourceFiles: 'OMSimulator-mingw-ucrt64-*.zip'),
sshTransfer(
remoteDirectory: "${DEPLOYMENT_PREFIX}osx/",
sourceFiles: 'OMSimulator-osx-*.zip'),
//sshTransfer(
// remoteDirectory: "${DEPLOYMENT_PREFIX}osx/",
// sourceFiles: 'OMSimulator-osx-*.zip'),
sshTransfer(
remoteDirectory: "${DEPLOYMENT_PREFIX}win-msvc64/",
sourceFiles: 'OMSimulator-win64-*.zip')
Expand Down Expand Up @@ -592,6 +609,16 @@ def isWindows() {
return !isUnix()
}

def isMac() {
if (isUnix()) {
def uname = sh script: 'uname', returnStdout: true
if (uname.startsWith("Darwin")) {
return true
}
}
return false
}

void buildOMS() {
if (isWindows()) {
bat ("""
Expand Down Expand Up @@ -619,8 +646,15 @@ void buildOMS() {
echo "running on node: ${env.NODE_NAME}"
def nproc = numPhysicalCPU()
sh "git fetch --tags"
sh "cmake -S . -B build/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install/ -DOM_OMS_ENABLE_TESTSUITE:BOOL=ON"
sh "cmake --build build/ --parallel ${nproc} --target install -v"
if (isMac()) {
sh('''#!/bin/zsh -l
cmake -S . -B build/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install/ -DOM_OMS_ENABLE_TESTSUITE:BOOL=ON
cmake --build build/ --parallel ${nproc} --target install -v
''')
} else {
sh "cmake -S . -B build/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install/ -DOM_OMS_ENABLE_TESTSUITE:BOOL=ON"
sh "cmake --build build/ --parallel ${nproc} --target install -v"
}
}
}

Expand Down Expand Up @@ -677,6 +711,10 @@ def shouldWeBuildMINGW() {
}

def shouldWeBuildMacOSArm64() {
/* M1 Mac takes 4h to do a 10 seconds cmake configure!!!!!
* disable the M1 until we find out what the issue is
*/
return false
if (isPR()) {
if (pullRequest.labels.contains("CI/macOS-arm64")) {
return true
Expand Down
2 changes: 1 addition & 1 deletion testsuite/rtest
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ $nodelete = 0;

sub isMinGW_UCRT {
my $temp = $ENV{'MSYSTEM'};
print("MSYSTEM: " . $temp . "\n");
# print("MSYSTEM: " . $temp . "\n");
if (defined $temp) {
return ($^O eq 'MSWin32') && ($temp eq 'UCRT64');
} else {
Expand Down

0 comments on commit 32c534c

Please sign in to comment.