added cmake

This commit is contained in:
Andrei Yankovich 2020-04-15 10:04:03 +03:00
parent 8acd639c86
commit ee9a6539e4
6 changed files with 51 additions and 50 deletions

View File

@ -35,7 +35,7 @@ class BuildBotChangeSource(BuildBotModule):
),
changes.GitPoller(
repourl='git@github.com:QuasarApp/Hanoi-Towers.git',
project='qmake-Hanoi-Towers',
project='cmake-Hanoi-Towers',
gitbin=os.path.dirname(os.path.realpath(__file__))
+ "/git/gitBin.sh",
branches=True, # получаем изменения со всех веток

View File

@ -1,9 +1,10 @@
# This Python file uses the following encoding: utf-8
class BuildBotModule:
masterConf = {}
def __init__(self):
masterConf = {}
self.masterConf = {}
def getMasterConf(self):
return self.masterConf

View File

@ -30,8 +30,9 @@ class BuildBotShedulers(BuildBotModule):
]
buildersRepo = ['RepoGen']
self.masterConf['schedulers'] = self.shedulers
self.masterConf['schedulers'] = self.shedulers + [
self.masterConf['schedulers'] += [
schedulers.AnyBranchScheduler(
name='github',
change_filter=util.ChangeFilter(project_re="qmake-*"),
@ -45,9 +46,21 @@ class BuildBotShedulers(BuildBotModule):
treeStableTimer=None
),
schedulers.AnyBranchScheduler(
name='github',
change_filter=util.ChangeFilter(project_re="cmake-*"),
builderNames=buildersCode,
properties={
'clean': True,
'test': True,
'release': False,
'deploy': False
},
treeStableTimer=None
),
schedulers.Triggerable(name="repogen",
builderNames=buildersRepo)
]
return self.getMasterConf()

View File

@ -1,62 +1,39 @@
# This Python file uses the following encoding: utf-8
from BuildBotLib.make import Make
from buildbot.plugins import secrets, util, steps
from pathlib import Path
import datetime
import os
import subprocess
from BuildBotLib.secretManager import *
from BuildBotLib.secretManager import SecretManager
class CMake(Make):
def __init__(self, platform):
Make.__init__(self, platform);
Make.__init__(self, platform)
def makePrefix(self):
return "C"
def mainCmd(self):
command = [
'cmake',
"-DCMAKE_PREFIX_PATH=$QTDIR",
]
return command
def linuxXmakeCmd(self, props):
secret = SecretManager(self.home + "/buildBotSecret/secret.json")
QT_Dir = subprocess.getoutput(['qmake-android -query QT_HOST_PREFIX'])
command = [
'cmake', '-DCMAKE_PREFIX_PATH=' + QT_Dir,
'-DSPEC_X=linux-g++',
'-DSIGN_PATH="' + secret.getValue('SIGPATH') + '"',
'-DSIGN_ALIES="quasarapp"',
'-DSIGN_STORE_PASSWORD="' + secret.getValue('SIGPASS') + '"'
]
return command
return self.mainCmd()
def windowsXmakeCmd(self, props):
secret = SecretManager(self.home + "/buildBotSecret/secret.json")
QT_Dir = subprocess.getoutput(['qmake-android -query QT_HOST_PREFIX'])
command = [
'cmake', '-DCMAKE_PREFIX_PATH=' + QT_Dir,
'-DSPEC_X=win64-g++',
'-DSIGN_PATH="' + secret.getValue('SIGPATH') + '"',
'-DSIGN_ALIES="quasarapp"',
'-DSIGN_STORE_PASSWORD="' + secret.getValue('SIGPASS') + '"'
]
return command
return self.mainCmd()
def androidXmakeCmd(self, props):
secret = SecretManager(self.home + "/buildBotSecret/secret.json")
QT_Dir = subprocess.getoutput(['qmake-android -query QT_HOST_PREFIX'])
command = [
'cmake', '-DCMAKE_PREFIX_PATH=' + QT_Dir,
'-DSPEC_X=android-clang',
'cmake',
'-DANDROID_ABI=arm64-v8a',
'-DANDROID_BUILD_ABI_arm64-v8a=ON',
'-DANDROID_BUILD_ABI_armeabi-v7a=ON',
'-DSIGN_PATH="' + secret.getValue('SIGPATH') + '"',
'-DSIGN_ALIES="quasarapp"',
'-DSIGN_STORE_PASSWORD="' + secret.getValue('SIGPASS') + '"'

View File

@ -237,9 +237,9 @@ class Make(BaseModule):
if self.isWin(""):
factory.addStep(self.generateStep(["rm", ".git", "-rdf"],
self.platform,
'clear work dir',
lambda step: True))
self.platform,
'clear work dir',
lambda step: True))
factory.addStep(
steps.Git(

View File

@ -23,11 +23,21 @@ bot = BuildBot()
qmakeLinux = QMake(BaseModule.P_Linux)
qmakeWindows = QMake(BaseModule.P_Windows)
qmakeAndroid = QMake(BaseModule.P_Android)
cmakeLinux = CMake(BaseModule.P_Linux)
cmakeWindows = CMake(BaseModule.P_Windows)
cmakeAndroid = CMake(BaseModule.P_Android)
repoGen = QIFRepogen()
bot.addBuilder("LinuxBuilder", qmakeLinux)
bot.addBuilder("WindowsBuilder", qmakeWindows)
bot.addBuilder("AndroidBuilder", qmakeAndroid)
bot.addBuilder("LinuxCMakeBuilder", cmakeLinux)
bot.addBuilder("WindowsCMakeBuilder", cmakeWindows)
bot.addBuilder("AndroidCMakeBuilder", cmakeAndroid)
bot.addBuilder("RepoGen", repoGen)