4
0
mirror of https://github.com/QuasarApp/QuasarAppCI.git synced 2025-05-09 11:49:35 +00:00

add apple builder

This commit is contained in:
Andrei Yankovich 2022-01-22 22:10:39 +03:00
parent afe30156a9
commit b981a6fa01
2 changed files with 56 additions and 1 deletions

53
BuildBotLib/cmakeApple.py Normal file

@ -0,0 +1,53 @@
# This Python file uses the following encoding: utf-8
from BuildBotLib.cmake import CMake
from buildbot.plugins import util
from BuildBotLib.secretManager import SecretManager
class CMakeApple(CMake):
def __init__(self, platform):
CMake.__init__(self, platform)
# self.buildSystems = self.B_CMake
def makePrefix(self):
return "XCode"
def iosXmakeCmd(self, props):
file = self.home + "/buildBotSecret/secret.json"
secret = SecretManager(file, props)
applePlatform = str(props.getProperty('ApplePlatform', ''))
defines = self.getDefinesList(props)
defines += secret.convertToCmakeDefines()
defines += [
'-DCMAKE_PREFIX_PATH=$QTDIR',
'-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=$XCODE_DEVELOPMENT_TEAM',
'-DCMAKE_OSX_DEPLOYMENT_TARGET=$IOS_TARGET',
'-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOL_CHAIN_FILE',
'-DPLATFORM=' + applePlatform,
'-B cmake_build'
]
options = [
'cmake -G Xcode',
]
options += defines
return ' '.join(options)
def getPropertyes(self):
base = super().getPropertyes()
return base + [
util.StringParameter(
name='ApplePlatform',
label='Apple Platform (example OS64, SIMULATOR64)',
default='OS64'
),
]

@ -5,6 +5,8 @@ from buildbot.plugins import *
from BuildBotLib.buildbot import *
from buildbot.www import authz, auth
from BuildBotLib.cmake import CMake
from BuildBotLib.cmakeApple import CMakeApple
from BuildBotLib.docs import Docs
from BuildBotLib.qmake import QMake
from BuildBotLib.qtUpdater import QtUpdater
@ -32,7 +34,7 @@ cmakeAndroid = CMake(BaseModule.P_Android)
wasm = CMake(BaseModule.P_Wasm)
docs = Docs(BaseModule.P_Linux)
iosBuilder = CMake(BaseModule.P_iOS)
iosBuilder = CMakeApple(BaseModule.P_iOS)
repoGen = QIFRepogen()