cavis/jenkinsfile

86 lines
3.3 KiB
Plaintext

pipeline {
agent none
stages {
stage('prep-build-environment-linux') {
agent {
label 'linux'
}
steps {
checkout scm
//sh 'nvidia-smi'
//sh 'nvcc --version'
sh 'gcc --version'
sh 'cmake --version'
sh 'sh ./gradlew --version'
}
}
stage('prep-build-environment-linux-cuda') {
agent {
dockerfile {
filename 'Dockerfile'
dir '.docker'
label 'linuxdocker'
//additionalBuildArgs '--build-arg version=1.0.2'
args '--gpus all'
}
}
steps {
checkout scm
sh 'nvidia-smi'
sh 'nvcc --version'
sh 'gcc --version'
sh 'cmake --version'
sh 'sh ./gradlew --version'
}
}
stage('build') {
environment {
MAVEN = credentials('Internal Archiva')
OSSRH = credentials('OSSRH')
}
parallel {
stage('build-linux-cuda') {
agent {
dockerfile {
filename 'Dockerfile'
dir '.docker'
label 'linuxdocker'
//additionalBuildArgs '--build-arg version=1.0.2'
args '--gpus all'
}
}
steps {
withGradle {
sh 'sh ./gradlew publish --stacktrace -x test -PCAVIS_CHIP=cuda -Pmavenuser=$MAVEN_USR -Pmavenpass=$MAVEN_PSW -PossrhUsername=$OSSRH_USR -PossrhPassword=$OSSRH_PSW'
}
//stash includes: '/cavis-native/cavis-native-lib/build/lib/*.jar', name: 'cuda-build'
}
}
stage('build-linux-cpu') {
agent {
label 'linux'
}
steps {
withGradle {
sh 'sh ./gradlew publish --stacktrace -x test -PCAVIS_CHIP=cpu -Pmavenuser=$MAVEN_USR -Pmavenpass=$MAVEN_PSW -PossrhUsername=$OSSRH_USR -PossrhPassword=$OSSRH_PSW'
}
//stash includes: '/cavis-native/cavis-native-lib/build/lib/*.jar', name: 'cpu-build'
}
}
}
}
/* stage('collect-release') {
agent {
label 'linux'
}
steps {
//unstash 'cuda-build'
//unstash 'cpu-build'
}
}
*/
}
}