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

111
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}"
@@ -52,45 +50,92 @@ pipeline {
skipDefaultCheckout() skipDefaultCheckout()
} }
stages { stages {
stage('Get view') { stage('Basic tests') {
steps { agent {
xcorePrepareSandbox("${VIEW}", "${REPO}") label 'x86_64&&brew'
} }
} stages {
stage('Library checks') { stage('Get view') {
steps { steps {
xcoreLibraryChecks("${REPO}") xcorePrepareSandbox("${VIEW}", "${REPO}")
}
}
stage('Library checks') {
steps {
xcoreLibraryChecks("${REPO}")
}
}
stage('Tests') {
steps {
runXmostest("${REPO}", 'tests')
}
}
stage('xCORE builds') {
steps {
dir("${REPO}") {
xcoreAllAppNotesBuild('examples')
dir("${REPO}") {
runXdoc('doc')
}
}
}
}
} }
} post {
stage('Tests') { cleanup {
steps { xcoreCleanSandbox()
runXmostest("${REPO}", 'tests')
}
}
stage('Host builds') {
steps {
dir("${REPO}/${REPO}/host/xmosdfu") {
sh 'make -f Makefile.OSX64'
} }
} }
} }
stage('xCORE builds') { stage('Build host apps') {
steps { failFast true
dir("${REPO}") { parallel {
xcoreAllAppNotesBuild('examples') stage('Build Linux host app') {
dir("${REPO}") { agent {
runXdoc('doc') 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') {
post { agent {
success { label 'x86_64&&brew'
updateViewfiles() }
} steps {
cleanup { updateViewfiles()
cleanWs() }
post {
cleanup {
cleanWs()
}
}
} }
} }
} }