74 lines
3.2 KiB
Groovy
74 lines
3.2 KiB
Groovy
pipeline {
|
|
agent any
|
|
options {
|
|
skipDefaultCheckout(true)
|
|
}
|
|
environment {
|
|
CI_OUTPUT_NAME = "RSETexture"
|
|
CI_VERSION = "2.1.0"
|
|
CI_BUILD_NUMBER = "$BUILD_NUMBER"
|
|
}
|
|
stages {
|
|
stage('Prepare') {
|
|
steps {
|
|
cleanWs()
|
|
}
|
|
}
|
|
stage('Build') {
|
|
steps {
|
|
parallel(
|
|
linux: {
|
|
dir("linux") {
|
|
checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Texture'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Texture.git']]])
|
|
sh 'git submodule update --init --recursive'
|
|
sh 'conan install . -of build -s build_type=Release -o tools=True -pr:h=default -pr:b=default --build=missing'
|
|
cmakeBuild buildDir: 'build', cmakeArgs: '-DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DRSPTEXTURE_SHARED=ON -DRSPTEXTURE_STATIC=OFF -DBUILD_TOOLS=ON -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release', installation: 'latest', steps: [[args: 'all']]
|
|
}
|
|
},
|
|
windows: {
|
|
dir("windows") {
|
|
checkout([$class: 'GitSCM', branches: [[name: '**']], browser: [$class: 'GiteaBrowser', repoUrl: 'https://git.jcsmith.fr/JCS-Prod/RSE-Terrain'], extensions: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh', url: 'ssh://git@git.jcsmith.fr:2322/JCS-Prod/RSE-Texture.git']]])
|
|
sh 'git submodule update --init --recursive'
|
|
sh 'conan install . -of build -s build_type=Release -o tools=True -pr:b=default -pr:h=windows --build=missing'
|
|
cmakeBuild buildDir: 'build', cmakeArgs: '-DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DRSPTEXTURE_SHARED=ON -DRSPTEXTURE_STATIC=OFF -DBUILD_TOOLS=ON -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres', installation: 'latest', steps: [[args: 'all']]
|
|
}
|
|
}
|
|
)
|
|
}
|
|
}
|
|
stage('Deploy') {
|
|
steps {
|
|
dir("zip_linux") {
|
|
sh 'cp -R ../linux/build/bin ../linux/build/lib ../linux/RSPTextureLib/include .'
|
|
}
|
|
dir("zip_win") {
|
|
sh 'cp -R ../windows/build/bin ../windows/build/lib ../windows/RSPTextureLib/include .'
|
|
}
|
|
zip archive: false, dir: 'zip_linux', exclude: '', glob: '', zipFile: 'linux_x64.zip'
|
|
sh 'mv linux_x64.zip ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_Linux_x86_64.zip'
|
|
zip archive: false, dir: 'zip_win', exclude: '', glob: '', zipFile: 'mingw64.zip'
|
|
sh 'mv mingw64.zip ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip'
|
|
archiveArtifacts(artifacts: '*.zip')
|
|
fingerprint(targets: '*.zip')
|
|
}
|
|
}
|
|
stage('Sign') {
|
|
steps {
|
|
sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_Linux_x86_64.zip.gpg ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_Linux_x86_64.zip'
|
|
sh 'gpg --batch --detach-sign -o ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip.gpg ${CI_OUTPUT_NAME}_${CI_VERSION}.${BUILD_NUMBER}_mingw64.zip'
|
|
archiveArtifacts(artifacts: '*.gpg')
|
|
fingerprint(targets: '*.gpg')
|
|
}
|
|
}
|
|
}
|
|
/*
|
|
post {
|
|
always {
|
|
cleanWs(cleanWhenNotBuilt: false,
|
|
deleteDirs: true,
|
|
disableDeferredWipeout: true,
|
|
notFailBuild: true)
|
|
}
|
|
}
|
|
*/
|
|
} |