Jenkins: Add macOS Intel to Jenkinsfile

This commit is contained in:
richardg867
2022-04-06 15:39:32 -03:00
committed by GitHub
parent ce7a1ad1c1
commit 7f27f44b3a

26
.ci/Jenkinsfile vendored
View File

@@ -16,20 +16,22 @@
*/ */
/* ['main builds', 'branch builds'] */ /* ['main builds', 'branch builds'] */
def repository = ['https://github.com/86Box/86Box.git', 'https://github.com/richardg867/86Box.git'] def repository = ['https://github.com/86Box/86Box.git', scm.userRemoteConfigs[0].url]
def commitBrowser = ['https://github.com/86Box/86Box/commit/%s', null] def commitBrowser = ['https://github.com/86Box/86Box/commit/%s', null]
def branch = ['master', 'cleanup30'] def branch = ['master', scm.branches[0].name]
def buildType = ['beta', 'alpha'] def buildType = ['beta', 'alpha']
def buildBranch = env.JOB_BASE_NAME.contains('-') ? 1 : 0 def buildBranch = env.JOB_BASE_NAME.contains('-') ? 1 : 0
def osArchs = [ def osArchs = [
'Windows': ['32', '64'], 'Windows': ['32', '64'],
'Linux': ['x86', 'x86_64', 'arm32', 'arm64'] 'Linux': ['x86', 'x86_64', 'arm32', 'arm64'],
'macOS': ['x86_64']
] ]
def osFlags = [ def osFlags = [
'Windows': '-D QT=ON', 'Windows': '-D QT=ON',
'Linux': '-D QT=ON' 'Linux': '-D QT=ON',
'macOS': '-D QT=ON'
] ]
def archNames = [ def archNames = [
@@ -41,6 +43,11 @@ def archNames = [
'arm64': 'ARM (64-bit)' 'arm64': 'ARM (64-bit)'
] ]
def archNamesMac = [
'x86_64': 'Intel',
'arm64': 'Apple Silicon'
]
def dynarecNames = [ def dynarecNames = [
'ODR': 'Old Recompiler (recommended)', 'ODR': 'Old Recompiler (recommended)',
'NDR': 'New Recompiler (beta)', 'NDR': 'New Recompiler (beta)',
@@ -53,9 +60,7 @@ def dynarecArchs = [
'64': ['ODR', 'NDR'], '64': ['ODR', 'NDR'],
'x86_64': ['ODR', 'NDR'], 'x86_64': ['ODR', 'NDR'],
'arm32': ['NDR'], 'arm32': ['NDR'],
'ARM32': ['NDR'], 'arm64': ['NDR']
'arm64': ['NDR'],
'ARM64': ['NDR']
] ]
def dynarecFlags = [ def dynarecFlags = [
@@ -238,7 +243,7 @@ pipeline {
osArchs.each { os, thisOsArchs -> osArchs.each { os, thisOsArchs ->
def combinations = [:] def combinations = [:]
thisOsArchs.each { arch -> thisOsArchs.each { arch ->
def thisArchDynarecs = dynarecArchs[arch] def thisArchDynarecs = dynarecArchs[arch.toLowerCase()]
if (!thisArchDynarecs) if (!thisArchDynarecs)
thisArchDynarecs = ['NoDR'] thisArchDynarecs = ['NoDR']
thisArchDynarecs.each { dynarec -> thisArchDynarecs.each { dynarec ->
@@ -257,7 +262,10 @@ pipeline {
/* Run build process. */ /* Run build process. */
def packageName = "${env.JOB_BASE_NAME}${dynarecSlugs[dynarec]}${presetSlugs[preset]}-$os-$arch$buildSuffix" def packageName = "${env.JOB_BASE_NAME}${dynarecSlugs[dynarec]}${presetSlugs[preset]}-$os-$arch$buildSuffix"
def ret = -1 def ret = -1
dir("${dynarecNames[dynarec]}/$os - ${archNames[arch]}") { def archName = archNames[arch]
if (os == 'macOS')
archName = archNamesMac[arch]
dir("${dynarecNames[dynarec]}/$os - $archName") {
ret = runBuild("-b \"$packageName\" \"$arch\" ${presetFlags[preset]} ${dynarecFlags[dynarec]} ${osFlags[os]} $buildFlags") ret = runBuild("-b \"$packageName\" \"$arch\" ${presetFlags[preset]} ${dynarecFlags[dynarec]} ${osFlags[os]} $buildFlags")
} }