Move cross-compilation to another stage in the Jenkinsfile.

This commit is contained in:
Username404 2021-08-09 18:02:05 +02:00
parent 3c14405874
commit 9a9cc4aa50
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 11 additions and 5 deletions

16
Jenkinsfile vendored
View File

@ -21,11 +21,18 @@ pipeline { // Multi-branch pipeline script for Yerbacon.
cmakeBuild buildDir: 'cmake-build-release-win32', buildType: 'release', cleanBuild: true, installation: 'Main',
cmakeArgs: '-DCMAKE_C_COMPILER=/usr/bin/i686-w64-mingw32-gcc-posix -DCMAKE_CXX_COMPILER=/usr/bin/i686-w64-mingw32-c++-posix -DCMAKE_SYSTEM_PROCESSOR=i686'
cmake arguments: '--build ./cmake-build-release --target ybcon -- -j 9', installation: 'Main'
cmake arguments: '--build ./cmake-build-release-win32 --target ybcon -- -j 9', installation: 'Main'
sh 'strip ./cmake-build-*/ybcon'
catchError { cpack installation: 'Main', workingDir: 'cmake-build-release' }
catchError { cpack installation: 'Main', workingDir: 'cmake-build-release-arm' }
catchError { cpack installation: 'Main', workingDir: 'cmake-build-release-win32' }
cpack installation: 'Main', workingDir: 'cmake-build-release'
cpack installation: 'Main', workingDir: 'cmake-build-release-arm'
}
}
stage('Cross-compile') {
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
cmake arguments: '--build ./cmake-build-release-win32 --target ybcon -- -j 9', installation: 'Main'
cpack installation: 'Main', workingDir: 'cmake-build-release-win32'
dir('cmake-build-release-win32') { archiveArtifacts artifacts:'*.exe', fingerprint: false }
}
}
}
stage('Deploy') {
@ -33,7 +40,6 @@ pipeline { // Multi-branch pipeline script for Yerbacon.
echo 'Deploying....'
dir('cmake-build-release') { archiveArtifacts artifacts:'*.deb, *.rpm, *.tar.gz, *.sh', fingerprint: false }
dir('cmake-build-release-arm') { zip zipFile: './Yerbacon-ARM_lpkg.zip', archive: true, glob: "*.tar.gz, *.sh, *.rpm, *.deb" }
dir('cmake-build-release-win32') { archiveArtifacts artifacts:'*.exe', fingerprint: false }
}
}
}