Build host apps on both Linux and macOS

This commit is contained in:
Sam Chesney
2019-08-20 13:17:06 +01:00
parent 9cb697f5de
commit 344d87342c

67
Jenkinsfile vendored
View File

@@ -3,9 +3,7 @@
getApproval() getApproval()
pipeline { pipeline {
agent { agent none
label 'x86_64&&brew&&macOS'
}
environment { environment {
REPO = 'lib_xua' REPO = 'lib_xua'
VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}" VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}"
@@ -51,6 +49,11 @@ pipeline {
options { options {
skipDefaultCheckout() skipDefaultCheckout()
} }
stages {
stage('Basic tests') {
agent {
label 'x86_64&&brew'
}
stages { stages {
stage('Get view') { stage('Get view') {
steps { steps {
@@ -67,13 +70,6 @@ pipeline {
runXmostest("${REPO}", 'tests') runXmostest("${REPO}", 'tests')
} }
} }
stage('Host builds') {
steps {
dir("${REPO}/${REPO}/host/xmosdfu") {
sh 'make -f Makefile.OSX64'
}
}
}
stage('xCORE builds') { stage('xCORE builds') {
steps { steps {
dir("${REPO}") { dir("${REPO}") {
@@ -86,11 +82,60 @@ pipeline {
} }
} }
post { post {
success { cleanup {
xcoreCleanSandbox()
}
}
}
stage('Build host apps') {
failFast true
parallel {
stage('Build Linux host app') {
agent {
label 'x86_64&&brew&&linux'
}
steps {
xcorePrepareSandbox("${VIEW}", "${REPO}")
dir("${REPO}/${REPO}/host/xmosdfu") {
sh 'make -f Makefile.Linux64'
}
}
post {
cleanup {
xcoreCleanSandbox()
}
}
}
stage('Build Mac host app') {
agent {
label 'x86_64&&brew&&macOS'
}
steps {
xcorePrepareSandbox("${VIEW}", "${REPO}")
dir("${REPO}/${REPO}/host/xmosdfu") {
sh 'make -f Makefile.OSX64'
}
}
post {
cleanup {
xcoreCleanSandbox()
}
}
}
}
}
stage('Update') {
agent {
label 'x86_64&&brew'
}
steps {
updateViewfiles() updateViewfiles()
} }
post {
cleanup { cleanup {
cleanWs() cleanWs()
} }
} }
} }
}
}