mirror of
https://github.com/QuasarApp/QuasarAppCI.git
synced 2025-05-06 02:09:36 +00:00
commit
ab58358461
@ -13,6 +13,8 @@ class BaseModule:
|
||||
P_Linux = 'Linux'
|
||||
P_Android = 'Android'
|
||||
P_Wasm = 'Wasm'
|
||||
P_iOS = 'iOS'
|
||||
P_Mac = 'Mac'
|
||||
|
||||
def __init__(self, platform, pwd="."):
|
||||
self.home = str(Path.home())
|
||||
@ -36,6 +38,12 @@ class BaseModule:
|
||||
def isWasm(self, step):
|
||||
return self.platform == BaseModule.P_Wasm
|
||||
|
||||
def isiOS(self, step):
|
||||
return self.platform == BaseModule.P_iOS
|
||||
|
||||
def isMac(self, step):
|
||||
return self.platform == BaseModule.P_Mac
|
||||
|
||||
def generateCmd(self, bashString):
|
||||
|
||||
if isinstance(bashString, list):
|
||||
@ -89,7 +97,7 @@ class BaseModule:
|
||||
|
||||
return 'make'
|
||||
|
||||
def makeTarget(self, target):
|
||||
def makeTarget(self, target, cxxFlags=None):
|
||||
command = [self.make()]
|
||||
return command + [target]
|
||||
|
||||
|
@ -34,6 +34,7 @@ class BuildBotShedulers(BuildBotModule):
|
||||
'LinuxCMakeBuilderQt6',
|
||||
'WindowsCMakeBuilder',
|
||||
'Wasm32Builder',
|
||||
'IOSCMakeBuilder',
|
||||
]
|
||||
|
||||
prodBuilders = ['AndroidBuilder_v7',
|
||||
@ -42,6 +43,7 @@ class BuildBotShedulers(BuildBotModule):
|
||||
'LinuxCMakeBuilder',
|
||||
'LinuxCMakeBuilderQt6',
|
||||
'WindowsCMakeBuilder',
|
||||
'IOSCMakeBuilder'
|
||||
]
|
||||
|
||||
buildersDeployCode = ['DocsGenerator']
|
||||
|
@ -28,6 +28,7 @@ class BuildBotWorkers(BuildBotModule):
|
||||
worker.Worker("AndroidBuilder_v8Qt6", password),
|
||||
worker.Worker("LinuxCMakeBuilder", password),
|
||||
worker.Worker("LinuxCMakeBuilderQt6", password),
|
||||
worker.Worker("IOSCMakeBuilder", password),
|
||||
worker.Worker("WindowsCMakeBuilder", password),
|
||||
worker.Worker("RepoGen", password),
|
||||
worker.Worker("Wasm32Builder", password),
|
||||
|
@ -4,7 +4,7 @@ from BuildBotLib.make import Make
|
||||
from BuildBotLib.secretManager import SecretManager
|
||||
from buildbot.plugins import steps, util
|
||||
import multiprocessing
|
||||
import os
|
||||
|
||||
|
||||
class CMake(Make):
|
||||
|
||||
@ -15,22 +15,29 @@ class CMake(Make):
|
||||
def makePrefix(self):
|
||||
return "C"
|
||||
|
||||
def make(self):
|
||||
return 'cmake --build cmake_build --target all'
|
||||
def makeTarget(self, target, cxxFlags=None):
|
||||
command = 'cmake --build cmake_build --config Release'
|
||||
|
||||
def makeTarget(self, target):
|
||||
return 'cmake --build cmake_build --target ' + target
|
||||
if len(target):
|
||||
command += ' --target ' + target
|
||||
else:
|
||||
command += ' --parallel'
|
||||
|
||||
def makeCommand(self, props):
|
||||
command = self.make()
|
||||
cxx = []
|
||||
if cxxFlags is not None:
|
||||
cxx += cxxFlags
|
||||
|
||||
cpus = multiprocessing.cpu_count()
|
||||
if self.isiOS(''):
|
||||
cxx += ['-allowProvisioningUpdates']
|
||||
|
||||
if cpus:
|
||||
command += ' --parallel ' + str(cpus)
|
||||
if len(cxx):
|
||||
command += ' -- ' + ' '.join(cxx)
|
||||
|
||||
return command
|
||||
|
||||
def makeCommand(self, props):
|
||||
return self.makeTarget('')
|
||||
|
||||
def linuxXmakeCmd(self, props):
|
||||
defines = self.getDefinesList(props)
|
||||
|
||||
@ -99,7 +106,7 @@ class CMake(Make):
|
||||
def getQtMajorVersion(self, props):
|
||||
qtDir = str(props.getProperty('QTDIR', ''))
|
||||
|
||||
if "5." in qtDir :
|
||||
if "5." in qtDir:
|
||||
return "5"
|
||||
elif "6." in qtDir:
|
||||
return "6"
|
||||
@ -144,6 +151,30 @@ class CMake(Make):
|
||||
def androidXmakeCmd(self, props):
|
||||
return self.androidXmakeSinglAbiCmd(props)
|
||||
|
||||
def iosXmakeCmd(self, props):
|
||||
file = self.home + "/buildBotSecret/secret.json"
|
||||
secret = SecretManager(file, props)
|
||||
|
||||
defines = self.getDefinesList(props)
|
||||
|
||||
defines += secret.convertToCmakeDefines()
|
||||
|
||||
defines += [
|
||||
'-DCMAKE_PREFIX_PATH=$QTDIR',
|
||||
'-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=$XCODE_DEVELOPMENT_TEAM',
|
||||
'-DDEPLOYMENT_TARGET=$DEPLOYMENT_TARGET',
|
||||
'-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOL_CHAIN_FILE',
|
||||
'-DPLATFORM=OS64',
|
||||
'-B cmake_build'
|
||||
]
|
||||
|
||||
options = [
|
||||
'cmake -G Xcode',
|
||||
]
|
||||
options += defines
|
||||
|
||||
return ' '.join(options)
|
||||
|
||||
def wasmXmakeCmd(self, props):
|
||||
|
||||
defines = self.getDefinesList(props)
|
||||
@ -174,4 +205,3 @@ class CMake(Make):
|
||||
)
|
||||
|
||||
return factory
|
||||
|
||||
|
@ -34,9 +34,9 @@ class Docs(CMake):
|
||||
return 'mv docs/* ' + str(props.getProperty('copyFolder'))
|
||||
|
||||
res += [self.generateStep('mkdir -p Distro',
|
||||
platform,
|
||||
'make target dir',
|
||||
self.isDeploy)]
|
||||
platform,
|
||||
'make target dir',
|
||||
self.isDeploy)]
|
||||
|
||||
res += [self.generateStep(move,
|
||||
platform,
|
||||
|
@ -143,6 +143,12 @@ class Make(BaseModule):
|
||||
|
||||
return command
|
||||
|
||||
def iosXmakeCmd(self, props):
|
||||
return ""
|
||||
|
||||
def macXmakeCmd(self, props):
|
||||
return ""
|
||||
|
||||
def androidXmakeEnv(self, props):
|
||||
return {}
|
||||
|
||||
@ -155,6 +161,12 @@ class Make(BaseModule):
|
||||
def linuxXmakeEnv(self, props):
|
||||
return {}
|
||||
|
||||
def iosXmakeEnv(self, props):
|
||||
return {}
|
||||
|
||||
def macXmakeEnv(self, props):
|
||||
return {}
|
||||
|
||||
def makePrefix(self):
|
||||
return "X"
|
||||
|
||||
@ -168,6 +180,8 @@ class Make(BaseModule):
|
||||
BaseModule.P_Windows: self.windowsXmakeEnv,
|
||||
BaseModule.P_Android: self.androidXmakeEnv,
|
||||
BaseModule.P_Wasm: self.wasmXmakeEnv,
|
||||
BaseModule.P_iOS: self.iosXmakeEnv,
|
||||
BaseModule.P_Mac: self.macXmakeEnv,
|
||||
|
||||
}
|
||||
|
||||
@ -213,6 +227,8 @@ class Make(BaseModule):
|
||||
BaseModule.P_Windows: self.windowsXmakeCmd,
|
||||
BaseModule.P_Android: self.androidXmakeCmd,
|
||||
BaseModule.P_Wasm: self.wasmXmakeCmd,
|
||||
BaseModule.P_iOS: self.iosXmakeCmd,
|
||||
BaseModule.P_Mac: self.macXmakeCmd,
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ from buildbot.plugins import *
|
||||
from BuildBotLib.buildbot import *
|
||||
from buildbot.www import authz, auth
|
||||
from BuildBotLib.cmake import CMake
|
||||
|
||||
from BuildBotLib.docs import Docs
|
||||
from BuildBotLib.qmake import QMake
|
||||
from BuildBotLib.qtUpdater import QtUpdater
|
||||
@ -32,10 +33,13 @@ cmakeAndroid = CMake(BaseModule.P_Android)
|
||||
wasm = CMake(BaseModule.P_Wasm)
|
||||
docs = Docs(BaseModule.P_Linux)
|
||||
|
||||
iosBuilder = CMake(BaseModule.P_iOS)
|
||||
|
||||
repoGen = QIFRepogen()
|
||||
|
||||
release = Releaser()
|
||||
|
||||
|
||||
bot.addBuilder("LinuxBuilder", qmakeLinux)
|
||||
bot.addBuilder("WindowsBuilder", qmakeWindows)
|
||||
|
||||
@ -54,5 +58,7 @@ bot.addBuilder("Wasm32Builder", wasm)
|
||||
bot.addBuilder("DocsGenerator", docs)
|
||||
bot.addBuilder("prodDeployer", release)
|
||||
|
||||
bot.addBuilder("IOSCMakeBuilder", iosBuilder)
|
||||
|
||||
c = BuildmasterConfig = bot.getMaster()
|
||||
|
||||
|
2
start.sh
2
start.sh
@ -4,4 +4,4 @@ pip install treq --upgrade
|
||||
pip install buildbot_gitea --upgrade
|
||||
BASE_DIR=$(dirname "$(readlink -f "$0")")
|
||||
|
||||
buildbot start $BASE_DIR
|
||||
buildbot restart $BASE_DIR
|
||||
|
Loading…
x
Reference in New Issue
Block a user