Update alfa-ci

This commit is contained in:
Dennis Klein 2018-12-10 16:43:37 +01:00 committed by Dennis Klein
parent 0cb8f6166a
commit 5e24fdba8b
2 changed files with 28 additions and 13 deletions

22
Jenkinsfile vendored
View File

@ -8,6 +8,9 @@ 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)
def fairsoft = spec.fairsoft
def os = spec.os
def compiler = spec.compiler
nodes["${prefix}/${label}"] = { nodes["${prefix}/${label}"] = {
node(label) { node(label) {
githubNotify(context: "${prefix}/${label}", description: 'Building ...', status: 'PENDING') githubNotify(context: "${prefix}/${label}", description: 'Building ...', status: 'PENDING')
@ -16,22 +19,27 @@ def jobMatrix(String prefix, List specs, Closure callback) {
checkout scm checkout scm
sh """\ sh """\
echo "export SIMPATH=\${SIMPATH_PREFIX}${spec.fairsoft}" >> Dart.cfg echo "export SIMPATH=\${SIMPATH_PREFIX}${fairsoft}" >> Dart.cfg
echo "export FAIRSOFT_VERSION=${spec.fairsoft}" >> Dart.cfg echo "export FAIRSOFT_VERSION=${fairsoft}" >> Dart.cfg
""" """
if ((spec.os == 'Debian8') && (spec.compiler == 'gcc8.1')) { if (os =~ /Debian/ && compiler =~ /gcc8/) {
sh '''\ sh '''\
echo "source /etc/profile.d/modules.sh" >> Dart.cfg echo "source /etc/profile.d/modules.sh" >> Dart.cfg
echo "module use /cvmfs/it.gsi.de/modulefiles" >> Dart.cfg echo "module use /cvmfs/it.gsi.de/modulefiles" >> Dart.cfg
echo "module load compiler/gcc/8" >> 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 '''\ sh '''\
echo "export BUILDDIR=$PWD/build" >> Dart.cfg echo "export BUILDDIR=$PWD/build" >> Dart.cfg
echo "export SOURCEDIR=$PWD" >> Dart.cfg echo "export SOURCEDIR=$PWD" >> Dart.cfg
echo "export PATH=\\\$SIMPATH/bin:\\\$PATH" >> Dart.cfg echo "export PATH=\\\$SIMPATH/bin:\\\$PATH" >> Dart.cfg
echo "export GIT_BRANCH=$JOB_BASE_NAME" >> Dart.cfg echo "export GIT_BRANCH=$JOB_BASE_NAME" >> Dart.cfg
echo "export EXTRA_FLAGS='-DCMAKE_CXX_COMPILER=g++'" >> Dart.cfg
echo "echo \\\$PATH" >> Dart.cfg echo "echo \\\$PATH" >> Dart.cfg
''' '''
sh 'cat Dart.cfg' sh 'cat Dart.cfg'
@ -58,14 +66,14 @@ pipeline{
steps{ steps{
script { script {
def build_jobs = jobMatrix('alfa-ci/build', [ def build_jobs = jobMatrix('alfa-ci/build', [
[os: 'Debian8', arch: 'x86_64', compiler: 'gcc8.1', fairsoft: 'fairmq_dev'], [os: 'Debian8', arch: 'x86_64', compiler: 'gcc8.1.0', fairsoft: 'fairmq_dev'],
//[os: 'MacOS10.13', arch: 'x86_64', compiler: 'AppleLLVM10.0.0', fairsoft: 'may18'], [os: 'MacOS10.13', arch: 'x86_64', compiler: 'AppleLLVM10.0.0', fairsoft: 'fairmq_dev'],
]) { spec, label -> ]) { spec, label ->
sh './Dart.sh alfa_ci Dart.cfg' sh './Dart.sh alfa_ci Dart.cfg'
} }
def profile_jobs = jobMatrix('alfa-ci/codecov', [ def profile_jobs = jobMatrix('alfa-ci/codecov', [
[os: 'Debian8', arch: 'x86_64', compiler: 'gcc8.1', fairsoft: 'fairmq_dev'], [os: 'Debian8', arch: 'x86_64', compiler: 'gcc8.1.0', fairsoft: 'fairmq_dev'],
]) { spec, label -> ]) { spec, label ->
withCredentials([string(credentialsId: 'fairmq_codecov_token', variable: 'CODECOV_TOKEN')]) { withCredentials([string(credentialsId: 'fairmq_codecov_token', variable: 'CODECOV_TOKEN')]) {
sh './Dart.sh codecov Dart.cfg' sh './Dart.sh codecov Dart.cfg'

View File

@ -8,6 +8,9 @@ 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 {
@ -15,22 +18,26 @@ def buildMatrix(List specs, Closure callback) {
checkout scm checkout scm
sh """\ sh """\
echo "export SIMPATH=\${SIMPATH_PREFIX}${spec.fairsoft}" >> Dart.cfg echo "export SIMPATH=\${SIMPATH_PREFIX}${fairsoft}" >> Dart.cfg
echo "export FAIRSOFT_VERSION=${spec.fairsoft}" >> Dart.cfg echo "export FAIRSOFT_VERSION=${fairsoft}" >> Dart.cfg
""" """
if ((spec.os == 'Debian8') && (spec.compiler == 'gcc8.1')) { if (os =~ /Debian/ && compiler =~ /gcc8/) {
sh '''\ sh '''\
echo "source /etc/profile.d/modules.sh" >> Dart.cfg echo "source /etc/profile.d/modules.sh" >> Dart.cfg
echo "module use /cvmfs/it.gsi.de/modulefiles" >> Dart.cfg echo "module use /cvmfs/it.gsi.de/modulefiles" >> Dart.cfg
echo "module load compiler/gcc/8" >> 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 '''\ sh '''\
echo "export BUILDDIR=$PWD/build" >> Dart.cfg echo "export BUILDDIR=$PWD/build" >> Dart.cfg
echo "export SOURCEDIR=$PWD" >> Dart.cfg echo "export SOURCEDIR=$PWD" >> Dart.cfg
echo "export PATH=\\\$SIMPATH/bin:\\\$PATH" >> Dart.cfg echo "export PATH=\\\$SIMPATH/bin:\\\$PATH" >> Dart.cfg
echo "export GIT_BRANCH=dev" >> Dart.cfg echo "export GIT_BRANCH=dev" >> Dart.cfg
echo "export EXTRA_FLAGS='-DCMAKE_CXX_COMPILER=g++'" >> Dart.cfg
echo "echo \\\$PATH" >> Dart.cfg echo "echo \\\$PATH" >> Dart.cfg
''' '''
sh 'cat Dart.cfg' sh 'cat Dart.cfg'
@ -56,8 +63,8 @@ pipeline{
steps{ steps{
script { script {
parallel(buildMatrix([ parallel(buildMatrix([
[os: 'Debian8', arch: 'x86_64', compiler: 'gcc8.1', fairsoft: 'fairmq_dev'], [os: 'Debian8', arch: 'x86_64', compiler: 'gcc8.1.0', fairsoft: 'fairmq_dev'],
//[os: 'MacOS10.13', arch: 'x86_64', compiler: 'AppleLLVM10.0.0', fairsoft: 'may18'], [os: 'MacOS10.13', arch: 'x86_64', compiler: 'AppleLLVM10.0.0', fairsoft: 'fairmq_dev'],
]) { spec, label -> ]) { spec, label ->
sh './Dart.sh Nightly Dart.cfg' sh './Dart.sh Nightly Dart.cfg'
sh './Dart.sh Profile Dart.cfg' sh './Dart.sh Profile Dart.cfg'