Cross-compile to 4 windows architectures instead of just one

This commit is contained in:
Username404 2021-09-12 12:54:55 +02:00
parent 9cc7f8e39e
commit 5f97e94abf
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 5 additions and 5 deletions

10
Jenkinsfile vendored
View File

@ -1,4 +1,4 @@
def buildTarget(String path, String rpmArch, String debArch, boolean isPackageArchDeb = true) { def buildTarget(String path, String rpmArch = 'noarch', String debArch = 'noarch', boolean isPackageArchDeb = true) {
String packageArch = isPackageArchDeb ? debArch : rpmArch; String packageArch = isPackageArchDeb ? debArch : rpmArch;
// Note: CMake 3.20 or higher is needed // Note: CMake 3.20 or higher is needed
cmakeBuild buildDir: "cmake-build-${packageArch}", buildType: 'release', cleanBuild: true, installation: 'Latest', cmakeBuild buildDir: "cmake-build-${packageArch}", buildType: 'release', cleanBuild: true, installation: 'Latest',
@ -36,10 +36,10 @@ pipeline { // Multi-branch pipeline script for Yerbacon.
stage('Build for other platforms') { stage('Build for other platforms') {
steps { steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
cmakeBuild buildDir: 'cmake-build-release-win32', buildType: 'release', cleanBuild: true, installation: 'Latest', buildTarget('x86_64-w64-mingw32', 'x86_64', 'amd64')
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 -DCCACHE_PRESENT=False' buildTarget('i686-w64-mingw32', 'i386', 'i386')
cpack installation: 'Latest', workingDir: 'cmake-build-release-win32' buildTarget('armv7-w64-mingw32', 'armv7hl', 'armhf')
dir('cmake-build-release-win32') { archiveArtifacts artifacts:'*.exe', fingerprint: false } buildTarget('aarch64-w64-mingw32', 'aarch64', 'arm64', false)
} }
} }
} }