Files
lib_xua/Jenkinsfile
2019-08-23 14:32:24 +01:00

119 lines
2.4 KiB
Groovy

@Library('xmos_jenkins_shared_library@develop') _
getApproval()
pipeline {
agent none
environment {
REPO = 'lib_xua'
VIEW = 'lib_xua_release_0_1_3'
}
options {
skipDefaultCheckout()
}
stages {
stage('Basic tests') {
agent {
label 'x86_64&&brew'
}
stages {
stage('Get view') {
steps {
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 {
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('Release and update') {
agent {
label 'x86_64&&brew'
}
stages {
stage('Release') {
when {
expression {
isReleaseBranchOfOrganisation('xmos')
}
}
steps {
sh 'mkdir ${REPO}/empty'
xcoreReleaseToGithub("${WORKSPACE}/${REPO}","${WORKSPACE}/${REPO}/empty")
}
}
stage('Update') {
steps {
updateViewfiles()
}
}
}
post {
cleanup {
xcoreCleanSandbox()
}
}
}
}
}