3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-07 06:33:48 +01:00

[jenkins] add osx builds using triqs zip artifact

This commit is contained in:
Dylan Simon 2018-02-14 16:35:07 -05:00
parent 586958eea9
commit d7df10d95d

55
Jenkinsfile vendored
View File

@ -1,9 +1,12 @@
def triqsProject = '/TRIQS/triqs/' + env.BRANCH_NAME.replaceAll('/', '%2F')
properties([ properties([
disableConcurrentBuilds(), disableConcurrentBuilds(),
buildDiscarder(logRotator(numToKeepStr: '10', daysToKeepStr: '30')),
pipelineTriggers([ pipelineTriggers([
upstream( upstream(
threshold: 'SUCCESS', threshold: 'SUCCESS',
upstreamProjects: '/TRIQS/triqs/' + env.BRANCH_NAME.replaceAll('/', '%2F') upstreamProjects: triqsProject
) )
]) ])
]) ])
@ -31,4 +34,54 @@ for (int i = 0; i < dockerPlatforms.size(); i++) {
} }
} }
def osxPlatforms = [
["gcc", ['CC=gcc-7', 'CXX=g++-7']],
["clang", ['CC=/usr/local/opt/llvm/bin/clang', 'CXX=/usr/local/opt/llvm/bin/clang++', 'CXXFLAGS=-I/usr/local/opt/llvm/include', 'LDFLAGS=-L/usr/local/opt/llvm/lib']]
]
for (int i = 0; i < osxPlatforms.size(); i++) {
def platformEnv = osxPlatforms[i]
def platform = platformEnv[0]
platforms["osx-$platform"] = { ->
stage("osx-$platform") {
timeout(time: 1, unit: 'HOURS') {
node('osx && triqs') {
def workDir = pwd()
def tmpDir = pwd(tmp:true)
def buildDir = "$tmpDir/build"
def installDir = "$tmpDir/install"
dir(installDir) {
deleteDir()
}
copyArtifacts(projectName: triqsProject, selector: upstream(fallbackToLastSuccessful: true), filter: "osx-${platform}.zip")
unzip(zipFile: "osx-${platform}.zip", dir: installDir)
/* fixup zip-stripped permissions (JENKINS-13128) */
sh "chmod +x $installDir/bin/*"
checkout scm
dir(buildDir) { withEnv(platformEnv[1]+[
"PATH=$installDir/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin",
"CPATH=$installDir/include",
"LIBRARY_PATH=$installDir/lib",
"CMAKE_PREFIX_PATH=$installDir/share/cmake"]) {
deleteDir()
sh "cmake $workDir -DTRIQS_ROOT=$installDir"
sh "make -j2"
try {
sh "make test"
} catch (exc) {
archiveArtifacts(artifacts: 'Testing/Temporary/LastTest.log')
throw exc
}
sh "make install"
} }
// zip(zipFile: "osx-${platform}.zip", archive: true, dir: installDir)
}
}
}
}
}
parallel platforms parallel platforms