mirror of
https://github.com/FairRootGroup/FairLogger.git
synced 2025-10-13 08:41:12 +00:00
Update alfa ci
This commit is contained in:
parent
180acaae26
commit
aaacaf316e
53
Jenkinsfile
vendored
53
Jenkinsfile
vendored
|
@ -4,24 +4,53 @@ def specToLabel(Map spec) {
|
||||||
return "${spec.os}-${spec.arch}-${spec.compiler}-FairSoft_${spec.fairsoft}"
|
return "${spec.os}-${spec.arch}-${spec.compiler}-FairSoft_${spec.fairsoft}"
|
||||||
}
|
}
|
||||||
|
|
||||||
def buildMatrix(List specs, Closure callback) {
|
def jobMatrix(String prefix, List specs, Closure callback) {
|
||||||
def nodes = [:]
|
def nodes = [:]
|
||||||
for (spec in specs) {
|
for (spec in specs) {
|
||||||
def label = specToLabel(spec)
|
def label = specToLabel(spec)
|
||||||
nodes[label] = {
|
def fairsoft = spec.fairsoft
|
||||||
|
def os = spec.os
|
||||||
|
def compiler = spec.compiler
|
||||||
|
nodes["${prefix}/${label}"] = {
|
||||||
node(label) {
|
node(label) {
|
||||||
githubNotify(context: "alfa-ci/${label}", description: 'Building ...', status: 'PENDING')
|
githubNotify(context: "${prefix}/${label}", description: 'Building ...', status: 'PENDING')
|
||||||
try {
|
try {
|
||||||
deleteDir()
|
deleteDir()
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|
||||||
|
sh """\
|
||||||
|
echo "export SIMPATH=\${SIMPATH_PREFIX}${fairsoft}" >> Dart.cfg
|
||||||
|
echo "export FAIRSOFT_VERSION=${fairsoft}" >> Dart.cfg
|
||||||
|
"""
|
||||||
|
if (os =~ /Debian/ && compiler =~ /gcc8/) {
|
||||||
|
sh '''\
|
||||||
|
echo "source /etc/profile.d/modules.sh" >> Dart.cfg
|
||||||
|
echo "module use /cvmfs/it.gsi.de/modulefiles" >> Dart.cfg
|
||||||
|
echo "module load compiler/gcc/8" >> Dart.cfg
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
if (os =~ /MacOS/) {
|
||||||
|
sh "echo \"export EXTRA_FLAGS='-DCMAKE_CXX_COMPILER=clang++'\" >> Dart.cfg"
|
||||||
|
} else {
|
||||||
|
sh "echo \"export EXTRA_FLAGS='-DCMAKE_CXX_COMPILER=g++'\" >> Dart.cfg"
|
||||||
|
}
|
||||||
|
|
||||||
|
sh '''\
|
||||||
|
echo "export BUILDDIR=$PWD/build" >> Dart.cfg
|
||||||
|
echo "export SOURCEDIR=$PWD" >> Dart.cfg
|
||||||
|
echo "export PATH=\\\$SIMPATH/bin:\\\$PATH" >> Dart.cfg
|
||||||
|
echo "export GIT_BRANCH=$JOB_BASE_NAME" >> Dart.cfg
|
||||||
|
echo "echo \\\$PATH" >> Dart.cfg
|
||||||
|
'''
|
||||||
|
sh 'cat Dart.cfg'
|
||||||
|
|
||||||
callback.call(spec, label)
|
callback.call(spec, label)
|
||||||
|
|
||||||
deleteDir()
|
deleteDir()
|
||||||
githubNotify(context: "alfa-ci/${label}", description: 'Success', status: 'SUCCESS')
|
githubNotify(context: "${prefix}/${label}", description: 'Success', status: 'SUCCESS')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
deleteDir()
|
deleteDir()
|
||||||
githubNotify(context: "alfa-ci/${label}", description: 'Error', status: 'ERROR')
|
githubNotify(context: "${prefix}/${label}", description: 'Error', status: 'ERROR')
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,19 +62,13 @@ def buildMatrix(List specs, Closure callback) {
|
||||||
pipeline{
|
pipeline{
|
||||||
agent none
|
agent none
|
||||||
stages {
|
stages {
|
||||||
stage("Run Build/Test Matrix") {
|
stage("Run CI Matrix") {
|
||||||
steps{
|
steps{
|
||||||
script {
|
script {
|
||||||
parallel(buildMatrix([
|
parallel(jobMatrix('alfa-ci/build', [
|
||||||
[os: 'Debian8', arch: 'x86_64', compiler: 'gcc4.9', fairsoft: 'may18'],
|
[os: 'Debian8', arch: 'x86_64', compiler: 'gcc8.1.0', fairsoft: 'fairmq_dev'],
|
||||||
[os: 'MacOS10.13', arch: 'x86_64', compiler: 'AppleLLVM9.0.0', fairsoft: 'may18'],
|
[os: 'MacOS10.13', arch: 'x86_64', compiler: 'AppleLLVM10.0.0', fairsoft: 'fairmq_dev'],
|
||||||
]) { spec, label ->
|
]) { spec, label ->
|
||||||
sh '''\
|
|
||||||
echo "export BUILDDIR=$PWD/build" >> Dart.cfg
|
|
||||||
echo "export SOURCEDIR=$PWD" >> Dart.cfg
|
|
||||||
echo "export PATH=$SIMPATH/bin:$PATH" >> Dart.cfg
|
|
||||||
echo "export GIT_BRANCH=$JOB_BASE_NAME" >> Dart.cfg
|
|
||||||
'''
|
|
||||||
sh './Dart.sh alfa_ci Dart.cfg'
|
sh './Dart.sh alfa_ci Dart.cfg'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,12 +8,40 @@ def buildMatrix(List specs, Closure callback) {
|
||||||
def nodes = [:]
|
def nodes = [:]
|
||||||
for (spec in specs) {
|
for (spec in specs) {
|
||||||
def label = specToLabel(spec)
|
def label = specToLabel(spec)
|
||||||
|
def fairsoft = spec.fairsoft
|
||||||
|
def os = spec.os
|
||||||
|
def compiler = spec.compiler
|
||||||
nodes[label] = {
|
nodes[label] = {
|
||||||
node(label) {
|
node(label) {
|
||||||
try {
|
try {
|
||||||
deleteDir()
|
deleteDir()
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|
||||||
|
sh """\
|
||||||
|
echo "export SIMPATH=\${SIMPATH_PREFIX}${fairsoft}" >> Dart.cfg
|
||||||
|
echo "export FAIRSOFT_VERSION=${fairsoft}" >> Dart.cfg
|
||||||
|
"""
|
||||||
|
if (os =~ /Debian/ && compiler =~ /gcc8/) {
|
||||||
|
sh '''\
|
||||||
|
echo "source /etc/profile.d/modules.sh" >> Dart.cfg
|
||||||
|
echo "module use /cvmfs/it.gsi.de/modulefiles" >> Dart.cfg
|
||||||
|
echo "module load compiler/gcc/8" >> Dart.cfg
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
if (os =~ /MacOS/) {
|
||||||
|
sh "echo \"export EXTRA_FLAGS='-DCMAKE_CXX_COMPILER=clang++'\" >> Dart.cfg"
|
||||||
|
} else {
|
||||||
|
sh "echo \"export EXTRA_FLAGS='-DCMAKE_CXX_COMPILER=g++'\" >> Dart.cfg"
|
||||||
|
}
|
||||||
|
sh '''\
|
||||||
|
echo "export BUILDDIR=$PWD/build" >> Dart.cfg
|
||||||
|
echo "export SOURCEDIR=$PWD" >> Dart.cfg
|
||||||
|
echo "export PATH=\\\$SIMPATH/bin:\\\$PATH" >> Dart.cfg
|
||||||
|
echo "export GIT_BRANCH=dev" >> Dart.cfg
|
||||||
|
echo "echo \\\$PATH" >> Dart.cfg
|
||||||
|
'''
|
||||||
|
sh 'cat Dart.cfg'
|
||||||
|
|
||||||
callback.call(spec, label)
|
callback.call(spec, label)
|
||||||
|
|
||||||
deleteDir()
|
deleteDir()
|
||||||
|
@ -35,16 +63,9 @@ pipeline{
|
||||||
steps{
|
steps{
|
||||||
script {
|
script {
|
||||||
parallel(buildMatrix([
|
parallel(buildMatrix([
|
||||||
[os: 'Debian8', arch: 'x86_64', compiler: 'gcc4.9', fairsoft: 'may18'],
|
[os: 'Debian8', arch: 'x86_64', compiler: 'gcc8.1.0', fairsoft: 'fairmq_dev'],
|
||||||
[os: 'MacOS10.11', arch: 'x86_64', compiler: 'AppleLLVM8.0.0', fairsoft: 'may18'],
|
[os: 'MacOS10.13', arch: 'x86_64', compiler: 'AppleLLVM10.0.0', fairsoft: 'fairmq_dev'],
|
||||||
[os: 'MacOS10.13', arch: 'x86_64', compiler: 'AppleLLVM9.0.0', fairsoft: 'may18'],
|
|
||||||
]) { spec, label ->
|
]) { spec, label ->
|
||||||
sh '''\
|
|
||||||
echo "export BUILDDIR=$PWD/build" >> Dart.cfg
|
|
||||||
echo "export SOURCEDIR=$PWD" >> Dart.cfg
|
|
||||||
echo "export PATH=$SIMPATH/bin:$PATH" >> Dart.cfg
|
|
||||||
echo "export GIT_BRANCH=dev" >> Dart.cfg
|
|
||||||
'''
|
|
||||||
sh './Dart.sh Nightly Dart.cfg'
|
sh './Dart.sh Nightly Dart.cfg'
|
||||||
sh './Dart.sh Profile Dart.cfg'
|
sh './Dart.sh Profile Dart.cfg'
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user