Add a "suffix" parameter to buildTarget
This commit is contained in:
parent
b3b505c210
commit
4fcfcfaa49
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@ -1,11 +1,11 @@
|
||||
def buildTarget(String path, String rpmArch = 'noarch', String debArch = 'noarch', boolean isPackageArchDeb = true) {
|
||||
def buildTarget(String path, String rpmArch = 'noarch', String debArch = 'noarch', boolean isPackageArchDeb = true, String suffix = '') {
|
||||
String packageArch = isPackageArchDeb ? debArch : rpmArch;
|
||||
// Note: CMake 3.20 or higher is needed
|
||||
cmakeBuild buildDir: "cmake-build-${packageArch}", buildType: 'release', cleanBuild: true, installation: 'Latest',
|
||||
cmakeBuild buildDir: "cmake-build-${packageArch}${suffix}", buildType: 'release', cleanBuild: true, installation: 'Latest',
|
||||
cmakeArgs: "--no-warn-unused-cli -DCMAKE_C_COMPILER=/usr/bin/${path}-gcc -DCMAKE_CXX_COMPILER=/usr/bin/${path}-g++ -DCMAKE_LINKER=/usr/bin/${path}-ld.gold -DCMAKE_AR=/usr/bin/${path}-ar -DCMAKE_RC_COMPILER=/usr/bin/${path}-windres -DCPACK_RPM_PACKAGE_ARCHITECTURE=${rpmArch} -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=${debArch} -DCXX_TARGET=${packageArch} -DCPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS=/usr/${path}/lib/ -DCCACHE_PRESENT=False"
|
||||
cmake arguments: "--build ./cmake-build-${packageArch} --target ybcon", installation: 'Latest'
|
||||
sh "/usr/bin/${path}-strip ./cmake-build-${packageArch}/ybcon"
|
||||
cpack installation: 'Latest', workingDir: "cmake-build-${packageArch}"
|
||||
cmake arguments: "--build ./cmake-build-${packageArch}${suffix} --target ybcon", installation: 'Latest'
|
||||
sh "/usr/bin/${path}-strip ./cmake-build-${packageArch}${suffix}/ybcon*"
|
||||
cpack installation: 'Latest', workingDir: "cmake-build-${packageArch}${suffix}"
|
||||
}
|
||||
|
||||
pipeline { // Multi-branch pipeline script for Yerbacon.
|
||||
@ -36,10 +36,10 @@ pipeline { // Multi-branch pipeline script for Yerbacon.
|
||||
stage('Build for other platforms') {
|
||||
steps {
|
||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||
buildTarget('x86_64-w64-mingw32', 'x86_64', 'amd64')
|
||||
buildTarget('i686-w64-mingw32', 'i386', 'i386')
|
||||
buildTarget('armv7-w64-mingw32', 'armv7hl', 'armhf')
|
||||
buildTarget('aarch64-w64-mingw32', 'aarch64', 'arm64', false)
|
||||
buildTarget('x86_64-w64-mingw32', 'x86_64', 'amd64', 'windows')
|
||||
buildTarget('i686-w64-mingw32', 'i386', 'i386', 'windows')
|
||||
buildTarget('armv7-w64-mingw32', 'armv7hl', 'armhf', 'windows')
|
||||
buildTarget('aarch64-w64-mingw32', 'aarch64', 'arm64', false, 'windows')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user