From 15cc2a749c3e48dbabdb0baf18c0ed6dad9725a6 Mon Sep 17 00:00:00 2001 From: 12345swordy Date: Fri, 30 Aug 2024 15:59:06 -0500 Subject: [PATCH] Delete Buildbot --- buildbot/README | 2 - buildbot/master/.gitignore | 6 - buildbot/master/buildbot.mk | 34 - buildbot/master/cleanup.sh | 32 - buildbot/master/master.cfg | 969 ------------------ buildbot/master/passwords.py.template | 11 - buildbot/master/public_html/bg_gradient.jpg | Bin 1822 -> 0 bytes buildbot/master/public_html/default.css | 640 ------------ buildbot/master/public_html/favicon.ico | Bin 1150 -> 0 bytes buildbot/master/public_html/robots.txt | 11 - buildbot/slave/buildbot.mk | 36 - buildbot/slave/cppcheck/cppcheck.sh | 21 - buildbot/slave/cppcheck/cppcheck.supress | 5 - buildbot/slave/create-build-dirs.py | 27 - buildbot/slave/create-doc.sh | 30 - buildbot/slave/create-md5sums.py | 61 -- buildbot/slave/ld | 9 - .../slave/linux/create_linux_static_bundle.sh | 83 -- buildbot/slave/linux/linuxStatic.cmake | 26 - .../static-show-used-dynamic-libraries.sh | 13 - .../linux/static-test-if-shared-linked.sh | 20 - buildbot/slave/no-msync.c | 8 - buildbot/slave/osx/create_Mac_bundle.sh | 162 --- buildbot/slave/osx/macos_sierra_x64.cmake | 17 - buildbot/slave/osx/rsync-mac.sh | 26 - buildbot/slave/prepare.py | 62 -- buildbot/slave/prepare.sh | 55 - buildbot/slave/rsync.sh | 39 - buildbot/slave/run-tests.sh | 18 - buildbot/slave/safe-exec.sh | 16 - buildbot/slave/source/make_source_package.sh | 110 -- buildbot/slave/update-mingwlibs.py | 26 - buildbot/slave/validation/tests-analyze.sh | 42 - buildbot/slave/validation/tests-cleanup.sh | 12 - buildbot/slave/validation/tests-env.sh | 23 - buildbot/slave/validation/tests-install.sh | 16 - buildbot/slave/validation/tests-prepare.sh | 47 - buildbot/slave/validation/tests-run.sh | 12 - buildbot/slave/wiki/mediawiki_upload.sh | 183 ---- .../slave/wiki/spring_json_to_mediawiki.py | 56 - buildbot/slave/wiki/update_changelog.sh | 79 -- buildbot/slave/wiki/update_download_page.sh | 42 - buildbot/slave/wiki/update_manpages.sh | 36 - .../slave/wiki/update_springsettings_page.sh | 46 - buildbot/slave/wiki/update_weapondefs_page.sh | 87 -- buildbot/slave/win/make_installer.sh | 98 -- buildbot/slave/win/makensis | 3 - buildbot/slave/win/update-mingwlibs.sh | 29 - buildbot/slave/win/win32.cmake | 9 - .../stacktrace_translator/frontend/index.php | 181 ---- .../stacktrace_translator/frontend/index.tpl | 31 - .../stacktrace_translator/frontend/style.css | 7 - .../stacktrace_translator.py | 491 --------- buildbot/version_list/list.php | 97 -- 54 files changed, 4202 deletions(-) delete mode 100644 buildbot/README delete mode 100644 buildbot/master/.gitignore delete mode 100644 buildbot/master/buildbot.mk delete mode 100755 buildbot/master/cleanup.sh delete mode 100644 buildbot/master/master.cfg delete mode 100644 buildbot/master/passwords.py.template delete mode 100644 buildbot/master/public_html/bg_gradient.jpg delete mode 100644 buildbot/master/public_html/default.css delete mode 100644 buildbot/master/public_html/favicon.ico delete mode 100644 buildbot/master/public_html/robots.txt delete mode 100644 buildbot/slave/buildbot.mk delete mode 100755 buildbot/slave/cppcheck/cppcheck.sh delete mode 100644 buildbot/slave/cppcheck/cppcheck.supress delete mode 100755 buildbot/slave/create-build-dirs.py delete mode 100755 buildbot/slave/create-doc.sh delete mode 100755 buildbot/slave/create-md5sums.py delete mode 100755 buildbot/slave/ld delete mode 100755 buildbot/slave/linux/create_linux_static_bundle.sh delete mode 100644 buildbot/slave/linux/linuxStatic.cmake delete mode 100755 buildbot/slave/linux/static-show-used-dynamic-libraries.sh delete mode 100755 buildbot/slave/linux/static-test-if-shared-linked.sh delete mode 100644 buildbot/slave/no-msync.c delete mode 100755 buildbot/slave/osx/create_Mac_bundle.sh delete mode 100644 buildbot/slave/osx/macos_sierra_x64.cmake delete mode 100755 buildbot/slave/osx/rsync-mac.sh delete mode 100644 buildbot/slave/prepare.py delete mode 100644 buildbot/slave/prepare.sh delete mode 100755 buildbot/slave/rsync.sh delete mode 100755 buildbot/slave/run-tests.sh delete mode 100755 buildbot/slave/safe-exec.sh delete mode 100755 buildbot/slave/source/make_source_package.sh delete mode 100755 buildbot/slave/update-mingwlibs.py delete mode 100755 buildbot/slave/validation/tests-analyze.sh delete mode 100755 buildbot/slave/validation/tests-cleanup.sh delete mode 100755 buildbot/slave/validation/tests-env.sh delete mode 100755 buildbot/slave/validation/tests-install.sh delete mode 100755 buildbot/slave/validation/tests-prepare.sh delete mode 100755 buildbot/slave/validation/tests-run.sh delete mode 100755 buildbot/slave/wiki/mediawiki_upload.sh delete mode 100755 buildbot/slave/wiki/spring_json_to_mediawiki.py delete mode 100755 buildbot/slave/wiki/update_changelog.sh delete mode 100755 buildbot/slave/wiki/update_download_page.sh delete mode 100755 buildbot/slave/wiki/update_manpages.sh delete mode 100755 buildbot/slave/wiki/update_springsettings_page.sh delete mode 100755 buildbot/slave/wiki/update_weapondefs_page.sh delete mode 100755 buildbot/slave/win/make_installer.sh delete mode 100755 buildbot/slave/win/makensis delete mode 100755 buildbot/slave/win/update-mingwlibs.sh delete mode 100644 buildbot/slave/win/win32.cmake delete mode 100644 buildbot/stacktrace_translator/frontend/index.php delete mode 100644 buildbot/stacktrace_translator/frontend/index.tpl delete mode 100644 buildbot/stacktrace_translator/frontend/style.css delete mode 100755 buildbot/stacktrace_translator/stacktrace_translator.py delete mode 100644 buildbot/version_list/list.php diff --git a/buildbot/README b/buildbot/README deleted file mode 100644 index 243db7da44..0000000000 --- a/buildbot/README +++ /dev/null @@ -1,2 +0,0 @@ -For a HOWTO set up buildbot see https://springrts.com/wiki/Buildbot - diff --git a/buildbot/master/.gitignore b/buildbot/master/.gitignore deleted file mode 100644 index ca6db8015f..0000000000 --- a/buildbot/master/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/buildbot.tac -/master.cfg.sample -/passwords.py -/passwords.pyc -/state.sqlite -/templates diff --git a/buildbot/master/buildbot.mk b/buildbot/master/buildbot.mk deleted file mode 100644 index af03233c99..0000000000 --- a/buildbot/master/buildbot.mk +++ /dev/null @@ -1,34 +0,0 @@ -# Author: Tobi Vollebregt -# -# Makefile to speed up some Spring buildbot related tasks. -# -# NOTE: renamed to buildbot.mk in the repository, because Makefile is in .gitignore -# (with good reason, as long as we allow in-source builds) -# - -.PHONY : start stop -.PHONY : start-master stop-master reload checkconfig -.PHONY : start-stacktrace-translator stop-stacktrace-translator - -start-master: - env -i PATH=$$PATH buildbot start master - -stop-master: - buildbot stop master - -start-stacktrace-translator: - spring/buildbot/stacktrace_translator/stacktrace_translator.py >> ~/log/stacktrace_translator.log 2>&1 & - -stop-stacktrace-translator: - -[ -e ~/run/stacktrace_translator.pid ] && kill `cat ~/run/stacktrace_translator.pid` - rm -f ~/run/stacktrace_translator.pid - -start: start-master start-stacktrace-translator - -stop: stop-stacktrace-translator stop-master - -reload: checkconfig - @buildbot sighup master - -checkconfig: - @cd master && buildbot checkconfig diff --git a/buildbot/master/cleanup.sh b/buildbot/master/cleanup.sh deleted file mode 100755 index fd38e9e3a0..0000000000 --- a/buildbot/master/cleanup.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# Removes non-release builds older than ${AGE} days, -# and debug symbols older than ${DBG_AGE}. -# ${DBG_AGE} must be smaller than or equal to ${AGE}. - -AGE=120 -DBG_AGE=30 -ZIP_AGE=10 - -renice 19 -p $$ >/dev/null -ionice -c3 -p $$ - -RM="rm" -RMDIR="rmdir" - -# Uncomment this for dry run. -#RM=echo -#RMDIR=echo -BUILDBOTDIR=/home/buildbot/www/default - -#old debug files -find ${BUILDBOTDIR} -type f -not -path '*/master/*' -path "*dbg.7z*" -mtime +${DBG_AGE} -exec ${RM} '{}' \; -#old zip (only needed for zk) -find ${BUILDBOTDIR} -type f -not -path '*/master/*' -path "*minimal-portable+dedicated.zip" -mtime +${ZIP_AGE} -exec ${RM} '{}' \; - -#very old files -find ${BUILDBOTDIR} -type f -not -path '*/master/*' -mtime +${AGE} -exec ${RM} '{}' \; -#broken symbolic links -find ${BUILDBOTDIR} -type l -xtype l -not -path '*/master/*' -exec ${RM} '{}' \; -#empty directories -find ${BUILDBOTDIR} -ignore_readdir_race -type d -empty -exec ${RMDIR} '{}' \; - diff --git a/buildbot/master/master.cfg b/buildbot/master/master.cfg deleted file mode 100644 index 59b37da270..0000000000 --- a/buildbot/master/master.cfg +++ /dev/null @@ -1,969 +0,0 @@ -# -*- python -*- -# vim: syntax=python -import sys,os - -master_repo = 'git://github.com/spring/spring.git' -mingwlibs_repo = 'git://github.com/spring/mingwlibs.git' - -c = BuildmasterConfig = {} -c['slaves'] = [] -c['builders'] = [] -c['schedulers'] = [] -c['status'] = [] - -# http://docs.buildbot.net/latest/manual/cfg-global.html#data-lifetimea -# automaticly delete old logs -c['changeHorizon'] = 200 -c['buildHorizon'] = 100 -c['eventHorizon'] = 50 -c['logHorizon'] = 40 - -# import the passwords from another file. this way we can keep config in git -import passwords -reload(passwords) -c['db_url'] = "mysql://buildbot:%s@localhost/buildbot?max_idle=300" % passwords.db - -####### build properties - -c['properties'] = { - 'default-branch': 'develop', - 'default-config': 'default', -} - -def determine(props, key, defKey, defVal): - if props.hasProperty(key) and props[key]: - return props[key] - elif props.hasProperty(defKey): - return props[defKey] - return defVal - -def determine_branch(props): - return determine(props, 'branch', 'default-branch', 'develop') - -def determine_config(props): - return determine(props, 'config', 'default-config', 'default') - -def WithProps(fmt): - fmt = fmt.replace('%(bc)s', '%(branch)s / %(config)s') - return WithProperties(fmt, branch=determine_branch, config=determine_config) - -def WithConfig(fmt = '%s'): - return WithProps(fmt.replace('%s', '%(config)s')) - -def WithBranch(fmt = '%s'): - return WithProps(fmt.replace('%s', '%(branch)s')) - -####### build configs - -build_configs = { - 'validation': ['-DDEBUG_SIGNAL_NANS=TRUE', '-DCMAKE_BUILD_TYPE=DEBUG'], - 'debug' : ['-DCMAKE_BUILD_TYPE=DEBUG'], - 'default' : ['-DCMAKE_BUILD_TYPE=RELWITHDEBINFO'], - 'fast' : ['-DCMAKE_BUILD_TYPE=RELEASE'], - 'profiling' : ['-DCMAKE_BUILD_TYPE=PROFILE'], - 'syncdebug' : ['-DCMAKE_BUILD_TYPE=DEBUG', '-DSYNCDEBUG=TRUE', '-DDEBUG_SIGNAL_NANS=FALSE'], - 'tracesync' : ['-DCMAKE_BUILD_TYPE=RELWITHDEBINFO', '-DTRACE_SYNC=TRUE'], -} - -####### BUILDSLAVES - -from buildbot.buildslave import BuildSlave - - -# the `jobs' property is the -j argument to make on this slave -c['slaves'].append(BuildSlave("abma1", passwords.abma1, max_builds=1, properties={'jobs': 1})) -c['slaves'].append(BuildSlave("abma2", passwords.abma2, max_builds=1, properties={'jobs': 1})) -#c['slaves'].append(BuildSlave("koshi1", passwords.koshi1, max_builds=1, properties={'jobs': 2})) -c['slaves'].append(BuildSlave("zydox1", passwords.zydox1, max_builds=1, properties={'jobs': 2})) -c['slaves'].append(BuildSlave("jk1", passwords.jk1, max_builds=1, properties={'jobs': 4})) -c['slaves'].append(BuildSlave("supermario", passwords.supermario, max_builds=1, properties={'jobs': 4})) -c['slaves'].append(BuildSlave("turboss", passwords.turboss, max_builds=1, properties={'jobs': 8})) -c['slaves'].append(BuildSlave("turboss1", passwords.turboss1, max_builds=1, properties={'jobs': 4})) -c['slaves'].append(BuildSlave("validation", passwords.validation, max_builds=1, properties={'jobs': 2})) -c['slaves'].append(BuildSlave("buildslave-i686",passwords.buildslave_i686, max_builds=1, properties={'jobs': 1})) -c['slaves'].append(BuildSlave("buildslave-x64", passwords.buildslave_x64, max_builds=1, properties={'jobs': 1})) -c['slaves'].append(BuildSlave("buildslave-win32", passwords.buildslave_win32, max_builds=1, properties={'jobs': 1})) - -c['slavePortnum'] = 9989 -#win_linux_slaves = ["koshi1"] - -####### SCHEDULERS - -def changeIsImportant(change): - for name in change.files: - if (name.endswith('.cpp') or name.endswith('.c') or - name.endswith('.hpp') or name.endswith('.h') or - name.endswith('.inl') or name.endswith('CMakeLists.txt')): - return True - return False - -import string -def workdir_per_branch(sourcestamps): - valid_chars = "-_.()%s%s" % (string.ascii_letters, string.digits) - filename = sourcestamps[0].branch - return ''.join(c for c in filename if c in valid_chars) - -from buildbot.changes.filter import ChangeFilter -from buildbot.schedulers import basic, timed, forcesched -from buildbot.schedulers.forcesched import StringParameter - -c['schedulers'].append(basic.AnyBranchScheduler( - name="full-sched", - treeStableTimer=60, - fileIsImportant=changeIsImportant, - change_filter=ChangeFilter(branch_re='develop|release|post_release'), - builderNames=["full-windows-test", "full-windows-x64", "msvc", "quick-macosx", "validationtests", "linux-static-x64"])) - -c['schedulers'].append(basic.AnyBranchScheduler( - name="release-sched", - treeStableTimer=60, - change_filter=ChangeFilter(branch_re='master'), - builderNames=["full-windows-test", "full-windows-x64", "msvc", "full-macosx", "linux-static-x32", "linux-static-x64", "sourcebuilder", "wikibuilder", "doxygen"])) - -c['schedulers'].append(timed.Nightly( - name='nightly', - branch='develop', - fileIsImportant=changeIsImportant, - onlyIfChanged=True, - builderNames=["cppcheck", "full-macosx", "linux-static-x32"], hour=6, minute=0)) - -c['schedulers'].append(forcesched.ForceScheduler( - name="force", - builderNames=[ - "mingwlibs", - "msvc", - "full-windows-test", - "full-windows-x64", - "full-macosx", - "linux-static-x32", - "linux-static-x64", - "sourcebuilder", - "wikibuilder", - "cppcheck", - "doxygen", - "validationtests", - "quick-macosx", - ], - branch=forcesched.StringParameter(name="branch", label="branch:", required=True, size=30, default="develop") - ) - ) - - -# prioritize release builds -def nextBuild(bldr, requests): - for r in requests: - if r.source.branch == 'master': - return r - return requests[0] - -####### BUILDERS - -from buildbot.process.factory import BuildFactory -from buildbot.steps.source import Git -from buildbot.steps.shell import Compile, Test, ShellCommand, WarningCountingShellCommand, WithProperties -from buildbot.status.builder import WARNINGS, FAILURE, SUCCESS - -# common build config steps ---------------------------------------------@ - -# description / descritionDone style : doing X / done X - -class LocalPreScript(ShellCommand): - name = 'local pre script' - description = "executing local pre script" - descriptionDone = "executed local pre script" - command = ['buildbot/slave/safe-exec.sh', '../../local.start', WithBranch()] - haltOnFailure = False -# hideStepIf = lambda s, result: result==SUCCESS - alwaysRun = True - -class LocalPostScript(ShellCommand): - name = 'local post script' - description = "executing local post script" - descriptionDone = "executed local post script" - command = ['buildbot/slave/safe-exec.sh', '../../local.stop', WithBranch()] - haltOnFailure = False -# hideStepIf = lambda s, result: result==SUCCESS - alwaysRun = True - -class GitRenameLocalBranch1(ShellCommand): - name = 'gitRenameLocalBranch1' - description = [WithBranch('renaming local git branch to temp')] - descriptionDone = [WithBranch('renamed local git branch to temp')] - command = ['git', 'branch', '-M', 'temp'] - haltOnFailure = True - -class GitRenameLocalBranch2(ShellCommand): - name = 'gitRenameLocalBranch2' - description = [WithBranch('renaming local git branch to %s')] - descriptionDone = [WithBranch('renamed local git branch to %s')] - command = ['git', 'branch', '-M', WithBranch()] - haltOnFailure = True - -class BuildConfigNinja(Compile): - warnOnWarnings = True - description = [WithProps('building %(bc)s config')] - descriptionDone = [WithProps('built %(bc)s config')] - name = 'buildConfigNinja' - command = ['ninja', '-k 10', WithProps('-j%(jobs:-1)s'), '-C', WithConfig('build/%s')] - -class BuildConfigNinjaWiki(BuildConfigNinja): - name = 'buildConfigNinja' - command = ['ninja', 'engine-headless', 'manpages', '-k 10', WithProps('-j%(jobs:-1)s'), '-C', WithConfig('build/%s')] - -class TestConfig(Test): - command = ['buildbot/slave/run-tests.sh',WithConfig(), WithBranch()] - -class CreateBuildDirPy(ShellCommand) : - name = "build dir create" - haltOnFailure = True - description = [WithProps('creating %(bc)s dir')] - descriptionDone = [WithProps('created %(bc)s dir')] - command = ["python2", "buildbot/slave/create-build-dirs.py", WithConfig(), WithBranch()] - - def __init__(self, extra_opts = None, **kwargs): - if extra_opts is None: - extra_opts = [] - self.extra_opts = extra_opts - ShellCommand.__init__(self, **kwargs) - - #mandatory for later (automatic) re-creation of step object - self.addFactoryArguments(extra_opts = extra_opts) - - def start(self): - #substitute the correct (cmake) arguments for the configuration - config = determine_config(self.getProperties()) - self.command += build_configs[config] + self.extra_opts - ShellCommand.start(self) - -class CreateInstaller(ShellCommand) : - name = "create installer" - description = [WithProps('creating %(bc)s installer')] - descriptionDone = [WithProps('created %(bc)s installer')] - # last argument is max number of threads (e.g., for 7z) - command = ['./buildbot/slave/win/make_installer.sh', WithConfig(), WithBranch(), WithProps('%(jobs:-on)s')] - -class CreateMacBundle(ShellCommand) : - name = "create Mac .app bundle" - description = [WithProps('creating %(bc)s Mac bundle')] - descriptionDone = [WithProps('created %(bc)s Mac bundle')] - command = ['./buildbot/slave/osx/create_Mac_bundle.sh', WithConfig(), WithBranch()] - -class CreateLinuxStaticBundle(ShellCommand) : - name = "create linux bundle" - description = [WithProps('creating %(bc)s bundle')] - descriptionDone = [WithProps('created %(bc)s bundle')] - command = ['./buildbot/slave/linux/create_linux_static_bundle.sh', WithConfig(), WithBranch()] - -class CreateSourceBundle(ShellCommand) : - name = "create source bundle" - description = [WithProps('creating %(bc)s bundle')] - descriptionDone = [WithProps('created %(bc)s bundle')] - command = ['./buildbot/slave/source/make_source_package.sh', WithConfig(), WithBranch()] - -class HashStuff(ShellCommand): - name = "md5sums" - description = [WithProps('hashing %(bc)s')] - descriptionDone = [WithProps('hasheded %(bc)s')] - command = ['./buildbot/slave/create-md5sums.py', WithConfig(), WithBranch(), ".7z", ".exe", ".zip", ".tar.gz", ".tar.lzma"] - -class RsyncStuff(ShellCommand) : - name = "rsync" - description = [WithProps('uploading %(bc)s')] - descriptionDone = [WithProps('uploaded %(bc)s')] - command = ['./buildbot/slave/rsync.sh', WithConfig(), WithBranch()] - -class RsyncMac(ShellCommand) : - name = "rsync" - description = [WithProps('uploading %(bc)s')] - descriptionDone = [WithProps('uploaded %(bc)s')] - command = ['./buildbot/slave/osx/rsync-mac.sh', WithConfig(), WithBranch()] - -class SyncSubmodules(ShellCommand) : - name = "syncsubmodules" - description = 'syncing .gitmodules with .git/config' - descriptionDone = 'synced submodule paths' - command = ['git', 'submodule', 'sync'] - -class InitSubmodules(ShellCommand) : - name = "submodules" - description = 'updating submodules' - descriptionDone = 'updated submodules' - command = ['git', 'submodule', 'update', '--init'] - -class CppCheck(WarningCountingShellCommand) : - name = "cppcheck" - description = "running cppcheck" - descriptionDone = "ran cppcheck" - warnOnWarnings = True - warningPattern = '\[[^:]+\:[0-9]+\].*' - command = ['./buildbot/slave/cppcheck/cppcheck.sh', WithProps('-j%(jobs:-1)s')] - - def __init__(self, **kwargs): - # cppcheck --quiet may be quiet for a long while... - kwargs.update({'timeout': 10800}) - WarningCountingShellCommand.__init__(self, **kwargs) - -class GenerateSources(WarningCountingShellCommand) : - name = "generatesources" - description = "creating source files" - descriptionDone = "created source files" - warnOnWarnings = True - command = ['ninja', 'generateSources', WithProps('-j%(jobs:-1)s'), '-C', WithConfig('build/%s')] - -class BuildDocs(WarningCountingShellCommand) : - name = "doxygen" - description = "creating docs" - descriptionDone = "created docs" - warnOnWarnings = True - command = ['buildbot/slave/create-doc.sh', WithConfig(), WithBranch()] - -class ValidationTestPrepare(WarningCountingShellCommand) : - name = "validation test prepare" - description = "preparing validation tests" - descriptionDone = "prepared validation tests" - warnOnWarnings = True - haltOnFailure = True - command = ['./buildbot/slave/validation/tests-prepare.sh', WithConfig(), WithBranch()] - def __init__(self, game, map, ai, version, **kwargs): - self.game = game - self.map = map - self.ai = ai - self.version = version - WarningCountingShellCommand.__init__(self, **kwargs) - self.addFactoryArguments(game = game) - self.addFactoryArguments(map = map) - self.addFactoryArguments(ai = ai) - self.addFactoryArguments(version = version) - def start(self): - self.command.append(self.game) - self.command.append(self.map) - self.command.append(self.ai) - self.command.append(self.version) - WarningCountingShellCommand.start(self) - -class ValidationTestRun(WarningCountingShellCommand) : - name = "validation test" - warnOnWarnings = True - command = ['./buildbot/slave/validation/tests-run.sh', WithConfig(), WithBranch()] - warningPattern = "(.*Error:|^#\d+ ).*" - def __init__(self, game, map, ai, version, **kwargs): - self.game = game - self.map = map - self.ai = ai - self.version = version - WarningCountingShellCommand.__init__(self, **kwargs) - self.addFactoryArguments(game = game) - self.addFactoryArguments(map = map) - self.addFactoryArguments(ai = ai) - self.addFactoryArguments(version = version) - - self.addSuppression([(None,".*LuaRules::RunCallIn: error = 2, RecvFromSynced,.*", None, None)]) - self.description = ["testing %s with %s" % (self.ai, self.game)] - self.descriptionDone = ["tested %s with %s" % (self.ai, self.game)] - - def start(self): - self.command.append(self.game) - self.command.append(self.map) - self.command.append(self.ai) - self.command.append(self.version) - WarningCountingShellCommand.start(self) - - def evaluateCommand(self, cmd): - if cmd.rc != 0: - return FAILURE - if self.warnCount >= 1: - return WARNINGS - return SUCCESS - -class ValidationTestInstall(WarningCountingShellCommand) : - name = "validation test install" - description = "install" - descriptionDone = "installed" - warnOnWarnings = True - command = ['./buildbot/slave/validation/tests-install.sh', WithConfig(), WithBranch()] - -class ValidationTestCleanup(WarningCountingShellCommand) : - name = "validation test cleanup" - description = "cleaning validation tests" - descriptionDone = "cleaned validation tests" - warnOnWarnings = True - command = ['./buildbot/slave/validation/tests-cleanup.sh', WithConfig(), WithBranch()] - -class ValidationTestAnalyze(WarningCountingShellCommand) : - name = "analyze core dumps" - warnOnWarnings = True - command = ['./buildbot/slave/validation/tests-analyze.sh', WithConfig(), WithBranch()] - alwaysRun = True - def __init__(self, game, map, ai, version, **kwargs): - self.game = game - self.map = map - self.ai = ai - self.version = version - WarningCountingShellCommand.__init__(self, **kwargs) - self.addFactoryArguments(game = game) - self.addFactoryArguments(map = map) - self.addFactoryArguments(ai = ai) - self.addFactoryArguments(version = version) - self.description = ["analyzing %s with %s" % (self.ai, self.game)] - self.descriptionDone = ["analyzed %s with %s" % (self.ai, self.game)] - def start(self): - self.command.append(self.game) - self.command.append(self.map) - self.command.append(self.ai) - self.command.append(self.version) - ShellCommand.start(self) - -class UpdateMingwLibs(WarningCountingShellCommand) : - name = "update mingwlibs" - description = "updating mingwlibs" - descriptionDone = "updated mingwlibs" - warnOnWarnings = True - command = ['./buildbot/slave/win/update-mingwlibs.sh', WithConfig(), WithBranch()] - -class UpdateMsvcLibs(WarningCountingShellCommand) : - name = "update mingwlibs" - description = "updating mingwlibs" - descriptionDone = "updated mingwlibs" - warnOnWarnings = True - command = ['python', 'buildbot/slave/update-mingwlibs.py', WithConfig(), WithBranch()] - -class TestIfStaticLinked(ShellCommand) : - name = "static link test" - warnOnWarnings = True -# hideStepIf = lambda s, result: result==SUCCESS - command = ['./buildbot/slave/linux/static-test-if-shared-linked.sh', WithConfig('build/%s/spring')] - def __init__(self, libname = '', name = '', **kwargs): - if not name: - name = libname - self.name = name - self.libname = libname - ShellCommand.__init__(self, **kwargs) - self.description = ["testing %s" % (self.name)] - self.descriptionDone = ["tested %s" % (self.name)] - - #mandatory for later (automatic) re-creation of step object - self.addFactoryArguments(libname = libname, name = name) - - def start(self): - self.command.append(self.libname) - ShellCommand.start(self) - - def evaluateCommand(self, cmd): - if cmd.rc == 0: - return SUCCESS - if cmd.rc == 1: - return WARNINGS - return FAILURE - -class ShowSharedLinkedLibraries(ShellCommand) : - name = "ldd" - description = "running ldd" - descriptionDone = "remaining libraries" - warnOnWarnings = True - command = ['./buildbot/slave/linux/static-show-used-dynamic-libraries.sh', WithConfig('build/%s/spring')] - -class ShowSharedLinkedLibrariesUnitsync(ShellCommand) : - name = "ldd" - description = "running ldd on unitsync" - descriptionDone = "remaining libraries" - warnOnWarnings = True - command = ['./buildbot/slave/linux/static-show-used-dynamic-libraries.sh', WithConfig('build/%s/libunitsync.so')] - -class HTMLManpages(ShellCommand) : - name = "upload HTML ManPages" - description = 'upload html manpages' - descriptionDone = 'upload html manpages' - command = ['./buildbot/slave/wiki/update_manpages.sh', WithConfig(), WithBranch()] - -class WikiChangelog(ShellCommand) : - name = "update Changelog wiki page" - description = 'updating changelog wiki' - descriptionDone = 'updated changelog wiki' - command = ['./buildbot/slave/wiki/update_changelog.sh', WithConfig(), WithBranch()] - -class WikiSpringSettings(ShellCommand) : - name = "update Springsettings.cfg wiki page" - description = 'updating springsettings.cfg wiki' - descriptionDone = 'updated springsettings.cfg wiki' - command = ['./buildbot/slave/wiki/update_springsettings_page.sh', WithConfig(), WithBranch()] - -class WikiWeaponDefs(ShellCommand) : - name = "update WeaponDefs wiki page" - description = 'updating WeaponDefs wiki' - descriptionDone = 'updated WeaponDefs wiki' - command = ['./buildbot/slave/wiki/update_weapondefs_page.sh', WithConfig(), WithBranch()] - -class BuildMingwBoost(WarningCountingShellCommand) : - name = "build boost" - description = "building boost" - descriptionDone = "build boost" - warnOnWarnings = True - command = ['./buildbot/mingwlibs_boost.sh', WithConfig(), WithBranch()] - -# end common build config steps -----------------------------------------@ - - -class WindowsFullBuildFactory(BuildFactory): - def __init__(self): - BuildFactory.__init__(self) - self.workdir = workdir_per_branch - self.useProgress = False - self.addStep( Git(repourl=master_repo) ) - self.addStep( GitRenameLocalBranch1() ) - self.addStep( GitRenameLocalBranch2() ) - self.addStep( SyncSubmodules() ) - self.addStep( InitSubmodules() ) - self.addStep( UpdateMingwLibs() ) - self.addStep( CreateBuildDirPy() ) - self.addStep( BuildConfigNinja() ) - self.addStep( TestConfig() ) - self.addStep( CreateInstaller() ) - self.addStep( HashStuff() ) - self.addStep( RsyncStuff() ) - -class LinuxFullBuildFactory(BuildFactory): - def __init__(self): - BuildFactory.__init__(self) - self.workdir = workdir_per_branch - self.useProgress = False - self.addStep( Git(repourl=master_repo) ) - self.addStep( GitRenameLocalBranch1() ) - self.addStep( GitRenameLocalBranch2() ) - self.addStep( SyncSubmodules() ) - self.addStep( InitSubmodules() ) - self.addStep( CreateBuildDirPy() ) - self.addStep( BuildConfigNinja() ) - self.addStep( TestConfig() ) - -class MacOSXFullBuildFactory(BuildFactory): - def __init__(self): - BuildFactory.__init__(self) - self.workdir = workdir_per_branch - self.useProgress = False - self.addStep( Git(repourl=master_repo) ) - self.addStep( GitRenameLocalBranch1() ) - self.addStep( GitRenameLocalBranch2() ) - self.addStep( SyncSubmodules() ) - self.addStep( InitSubmodules() ) - self.addStep( CreateBuildDirPy() ) - self.addStep( BuildConfigNinja() ) - self.addStep( TestConfig() ) - self.addStep( CreateMacBundle() ) - self.addStep( HashStuff() ) - self.addStep( RsyncMac() ) - -class LinuxStaticBuildFactory(BuildFactory): - def __init__(self): - BuildFactory.__init__(self) - self.workdir = workdir_per_branch - self.useProgress = False - self.addStep( Git(repourl=master_repo) ) - self.addStep( LocalPreScript() ) - self.addStep( GitRenameLocalBranch1() ) - self.addStep( GitRenameLocalBranch2() ) - self.addStep( SyncSubmodules() ) - self.addStep( InitSubmodules() ) - self.addStep( CreateBuildDirPy() ) - self.addStep( BuildConfigNinja() ) - self.addStep( TestConfig() ) - self.addStep( TestIfStaticLinked(libname="boost") ) - self.addStep( TestIfStaticLinked(libname="minizip") ) - self.addStep( TestIfStaticLinked(libname="libz.", name="zlib") ) - self.addStep( TestIfStaticLinked(libname="SDL") ) - self.addStep( TestIfStaticLinked(libname="glew") ) - self.addStep( TestIfStaticLinked(libname="libIL", name="devil") ) - self.addStep( TestIfStaticLinked(libname="jpeg") ) - self.addStep( TestIfStaticLinked(libname="png") ) - self.addStep( TestIfStaticLinked(libname="freetype") ) - self.addStep( TestIfStaticLinked(libname="vorbis") ) - self.addStep( TestIfStaticLinked(libname="ogg") ) - self.addStep( TestIfStaticLinked(libname="Xcursor") ) - self.addStep( TestIfStaticLinked(libname="libstdc", name="stdc++") ) - self.addStep( TestIfStaticLinked(libname="libgcc") ) - self.addStep( TestIfStaticLinked(libname="libgomp", name="openmp") ) - self.addStep( TestIfStaticLinked(libname="libc", name="glibc") ) - self.addStep( TestIfStaticLinked(libname="libm", name="math") ) - self.addStep( TestIfStaticLinked(libname="libpthread", name="pthread") ) - self.addStep( ShowSharedLinkedLibraries() ) - self.addStep( ShowSharedLinkedLibrariesUnitsync() ) - self.addStep( CreateLinuxStaticBundle() ) - self.addStep( HashStuff() ) - self.addStep( RsyncStuff() ) - self.addStep( LocalPostScript() ) - -class MacOSXQuickBuildFactory(BuildFactory): - def __init__(self): - BuildFactory.__init__(self) - self.workdir = workdir_per_branch - self.useProgress = False - self.addStep( Git(repourl=master_repo) ) - self.addStep( GitRenameLocalBranch1() ) - self.addStep( GitRenameLocalBranch2() ) - self.addStep( SyncSubmodules() ) - self.addStep( InitSubmodules() ) - self.addStep( CreateBuildDirPy() ) - self.addStep( BuildConfigNinja() ) - -class CppCheckBuildFactory(BuildFactory): - def __init__(self): - BuildFactory.__init__(self) - self.addStep( Git(repourl=master_repo) ) - self.addStep( SyncSubmodules() ) - self.addStep( InitSubmodules() ) - self.addStep( CppCheck() ) - -class DoxygenBuildFactory(BuildFactory): - def __init__(self): - BuildFactory.__init__(self) - self.addStep( Git(repourl=master_repo) ) - self.addStep( SyncSubmodules() ) - self.addStep( InitSubmodules() ) - self.addStep( CreateBuildDirPy() ) - self.addStep( GenerateSources() ) - self.addStep( BuildDocs() ) - self.addStep( RsyncStuff() ) - -class SourceFactory(BuildFactory): - def __init__(self): - BuildFactory.__init__(self) - self.addStep( Git(repourl=master_repo) ) - self.addStep( SyncSubmodules() ) - self.addStep( InitSubmodules() ) - self.addStep( CreateSourceBundle() ) - self.addStep( HashStuff() ) - self.addStep( RsyncStuff() ) - -class WikiFactory(BuildFactory): - def __init__(self): - BuildFactory.__init__(self) - self.addStep( Git(repourl=master_repo) ) - self.addStep( GitRenameLocalBranch1() ) - self.addStep( GitRenameLocalBranch2() ) - self.addStep( SyncSubmodules() ) - self.addStep( InitSubmodules() ) - self.addStep( CreateBuildDirPy() ) - self.addStep( BuildConfigNinjaWiki() ) - self.addStep( HTMLManpages() ) - self.addStep( WikiChangelog() ) - self.addStep( WikiSpringSettings() ) - self.addStep( WikiWeaponDefs() ) - -class ValidationBuildFactory(BuildFactory): - def addTest(self, gamep, mapp, aip, versionp): - self.addStep( ValidationTestPrepare(game=gamep, map=mapp, ai=aip, version=versionp )) - self.addStep( ValidationTestRun(game=gamep, map=mapp, ai=aip, version=versionp )) - self.addStep( ValidationTestAnalyze(game=gamep, map=mapp, ai=aip, version=versionp )) - - def __init__(self): - BuildFactory.__init__(self) - self.useProgress = False - self.addStep( Git(repourl=master_repo) ) - self.addStep( GitRenameLocalBranch1() ) - self.addStep( GitRenameLocalBranch2() ) - self.addStep( SyncSubmodules() ) - self.addStep( InitSubmodules() ) - self.addStep( CreateBuildDirPy() ) - self.addStep( ValidationTestCleanup() ) - self.addStep( ValidationTestInstall() ) - self.addTest("devgame:test", "Altair_Crossing-V1", "NullAI", "0.1") - self.addTest("ba:test", "Altair_Crossing-V1", "AAI", "0.9") - self.addTest("ba:test", "Altair_Crossing-V1", "E323AI", "3.25.0") - self.addTest("ba:test", "Altair_Crossing-V1", "KAIK", "0.13") - self.addTest("ba:test", "Altair_Crossing-V1", "RAI", "0.601") - self.addTest("zk:stable", "Altair_Crossing-V1", "CAI", "") - self.addTest("swiw:test", "Altair_Crossing-V1", "C.R.A.I.G.", "") - # BAR seems quiet "unstable" atm - #self.addTest("bar:test", "Altair_Crossing-V1", "Shard", "dev") - self.addStep( TestConfig() ) - self.addStep( RsyncStuff() ) - -class MingwLibsBuildFactory(BuildFactory): - def __init__(self): - BuildFactory.__init__(self) - self.useProgress = False - self.addStep( Git(repourl=mingwlibs_repo) ) - self.addStep( BuildMingwBoost() ) - -class MsvcFullBuildFactory(BuildFactory): - def __init__(self): - BuildFactory.__init__(self) - self.workdir = workdir_per_branch - self.useProgress = False - self.addStep( Git(repourl=master_repo) ) - self.addStep( GitRenameLocalBranch1() ) - self.addStep( GitRenameLocalBranch2() ) - self.addStep( SyncSubmodules() ) - self.addStep( InitSubmodules() ) - self.addStep( UpdateMsvcLibs() ) - self.addStep( CreateBuildDirPy() ) - self.addStep( BuildConfigNinja() ) - self.addStep( TestConfig() ) - self.addStep( CreateInstaller() ) - #self.addStep( RsyncStuff() ) - -windows_builder_test = { - 'name': 'full-windows-test', - 'slavenames': ['buildslave-win32'], - 'builddir': 'full-windows-test', - 'factory': WindowsFullBuildFactory(), - 'env': { - 'MINGW_HOST': 'i686-w64-mingw32.static.posix-', - 'CHOST' : 'i686-w64-mingw32.static.posix', - 'ROOT' : '/home/buildbot/mxe/usr', - 'OUTPUTDIR' : 'win32', - 'CMAKEBIN': '/home/buildbot/mxe/usr/bin/i686-w64-mingw32.static.posix-cmake', - 'CMAKEPARAM' : - ' -DMINGWLIBS:PATH=/home/buildbot/mingwlibs' - ' -DCMAKE_SYSTEM_NAME:STRING=Windows' - ' -DUSERDOCS_PLAIN:BOOL=ON' - ' -DCMAKE_INSTALL_PREFIX:PATH=' - ' -G Ninja', - 'CXX' : '/home/buildbot/mxe/usr/bin/i686-w64-mingw32.static.posix-g++', - 'CC' : '/home/buildbot/mxe/usr/bin/i686-w64-mingw32.static.posix-gcc', - 'MAKE' : 'ninja', - 'MINGWLIBS_PATH' : '/home/buildbot/mingwlibs', - 'MINGWLIBS_REPO_URL' : 'git://github.com/spring/mingwlibs.git', - 'PATH' : '/home/buildbot/mxe/usr/bin:/usr/bin:/bin', - } -} - -windows_builder_x64 = { - 'name': 'full-windows-x64', - 'slavenames': ['turboss'], - 'builddir': 'full-windows-x64', - 'factory': WindowsFullBuildFactory(), - 'env': { - 'MINGW_HOST': 'x86_64-w64-mingw32.static.posix-', - 'CHOST' : 'x86_64-w64-mingw32.static.posix', - 'ROOT' : '/home/jtoledano/mxe/usr/x86_64-w64-mingw32.static.posix', - 'OUTPUTDIR' : 'win64', - 'CMAKEPARAM' : - ' -DMINGWLIBS:PATH=/home/jtoledano/mingwlibs64' - ' -DCMAKE_FIND_ROOT_PATH:PATH=/home/jtoledano/mxe/usr/libexec/gcc/x86_64-w64-mingw32.static.posix/5.5.0' - ' -DCMAKE_SYSTEM_NAME:STRING=Windows' - ' -DUSERDOCS_PLAIN:BOOL=ON' - ' -DCMAKE_INSTALL_PREFIX:PATH=' - ' -G Ninja', - 'CXX' : 'x86_64-w64-mingw32.static.posix-g++', - 'CC' : 'x86_64-w64-mingw32.static.posix-gcc', - 'MAKE' : 'ninja', - 'MINGWLIBS_PATH' : '/home/jtoledano/mingwlibs64', - 'MINGWLIBS_REPO_URL' : 'git://github.com/spring/mingwlibs64.git', - 'PATH' : '/home/jtoledano/mxe/usr/bin:/usr/bin:/bin', - } -} - -macosx_builder = { - 'name': 'full-macosx', - 'slavenames': ['turboss1'], - 'builddir': 'full-macosx', - 'factory': MacOSXFullBuildFactory(), - 'env': { - 'OUTPUTDIR' : 'osx64', - 'MAKE' : 'ninja', - 'CMAKEPARAM': - ' -C../../buildbot/slave/osx/macos_sierra_x64.cmake' - ' -DUSERDOCS_PLAIN:BOOL=ON' - ' -G Ninja', - 'PATH': '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin' - } -} - -lxeparams = "-DPREFER_STATIC_LIBS:BOOL=1 \ --DCMAKE_USE_RELATIVE_PATHS:BOOL=1 \ --DCMAKE_INSTALL_PREFIX:PATH= \ --DBINDIR:PATH=./ \ --DLIBDIR:PATH=./ \ --DDATADIR:PATH=./ \ --DMANDIR:PATH=share/man \ --DDOCDIR:PATH=share/doc/spring \ --DIL_IL_HEADER:PATH=${INCLUDEDIR}/IL/il.h -DIL_INCLUDE_DIR:PATH=${INCLUDEDIR} -DIL_IL_LIBRARY:PATH=${LIBDIR}/libIL.a \ --DIL_LIBRARIES:PATH=${LIBDIR}/libIL.a \ --DILU_LIBRARIES:PATH=${LIBDIR}/libILU.a \ --DPNG_PNG_INCLUDE_DIR:PATH=${INCLUDEDIR} -DPNG_LIBRARY_RELEASE:PATH=${LIBDIR}/libpng.a \ --DJPEG_INCLUDE_DIR:PATH=${INCLUDEDIR} -DJPEG_LIBRARY:PATH=${LIBDIR}/libjpeg.a \ --DTIFF_INCLUDE_DIR:PATH=${INCLUDEDIR} -DTIFF_LIBRARY_RELEASE:PATH=${LIBDIR}/libtiff.a \ --DZLIB_INCLUDE_DIR:PATH=${INCLUDEDIR} -DZLIB_LIBRARY_RELEASE:PATH=${LIBDIR}/libz.a \ --DGLEW_INCLUDE_DIR:PATH=${INCLUDEDIR} -DGLEW_LIBRARIES:PATH=${LIBDIR}/libGLEW.a \ --DLIBUNWIND_INCLUDE_DIRS:PATH=${INCLUDEDIR} -DLIBUNWIND_LIBRARY:PATH=${LIBDIR}/libunwind.a \ --DCURL_INCLUDE_DIR:PATH=${INCLUDEDIR} -DCURL_LIBRARY:PATH=${LIBDIR}/libcurl.a \ --DOPENSSL_INCLUDE_DIR:PATH=${INCLUDEDIR} -DOPENSSL_SSL_LIBRARY:PATH=${LIBDIR}/libssl.a -DOPENSSL_CRYPTO_LIBRARY:PATH=${LIBDIR}/libcrypto.a \ --G Ninja \ -".replace("${INCLUDEDIR}", "/home/buildbot/lib/include").replace("${LIBDIR}", "/home/buildbot/lib/lib") - -linux_static_builder_x64 = { - 'name': 'linux-static-x64', - 'slavenames': ['buildslave-x64'], - 'builddir': 'linux-static-x64', - 'factory': LinuxStaticBuildFactory(), - 'env': { - 'OUTPUTDIR' : 'linux64', - 'MAKE' : 'ninja', - 'CMAKEPARAM': lxeparams, - } -} - -linux_static_builder_x32 = { - 'name': 'linux-static-x32', - 'slavenames': ['buildslave-i686'], - 'builddir': 'linux-static-x32', - 'factory': LinuxStaticBuildFactory(), - 'env': { - 'OUTPUTDIR' : 'linux32', - 'MAKE' : 'ninja', - 'CMAKEPARAM': lxeparams, - } -} - -macosx_quick_builder = { - 'name': 'quick-macosx', - 'slavenames': ['turboss1'], - 'builddir': 'quick-macosx', - 'factory': MacOSXQuickBuildFactory(), - 'properties': {'default-config': 'fast'}, - 'env': macosx_builder['env'], -} - -cppcheck_builder = { - 'name': 'cppcheck', - 'slavenames': ['zydox1'], - 'builddir': 'cppcheck', - 'slavebuilddir': 'full-linux', - 'factory': CppCheckBuildFactory() -} - -source_builder = { - 'name': 'sourcebuilder', - 'slavenames': ['abma2'], - 'builddir': 'source', - 'factory' : SourceFactory() -} - -wiki_builder = { - 'name': 'wikibuilder', - 'slavenames': ['jk1'], - 'builddir': 'wiki', - 'factory' : WikiFactory(), - 'properties': {'default-config': 'fast'}, - 'env': { - 'CMAKEPARAM': - ' -DAI_TYPES:STRING=NONE' - ' -DBUILD_spring-legacy:BOOL=OFF' - ' -DBUILD_spring-dedicated:BOOL=OFF' - ' -G Ninja', - 'MAKE' : 'ninja', - } -} - -doxygen_builder = { - 'name': 'doxygen', - 'slavenames': ['abma2'], - 'builddir': 'doxygen', - 'factory': DoxygenBuildFactory(), - 'env' : { - 'MAKE': 'ninja', - 'CMAKEPARAM': - ' -G Ninja' - ' -DCMAKE_FIND_ROOT_PATH:PATH=/opt/oracle-jdk-bin-1.7.0.13' - } -} - -validation_builder = { - 'name': 'validationtests', - 'slavenames': ['zydox1', 'abma1', 'validation'], - 'builddir': 'zydox-fedora', - 'factory': ValidationBuildFactory(), - 'properties': {'default-config': 'validation'}, - 'env': { - 'CFLAGS' : '-fsanitize=address -fno-omit-frame-pointer', - 'CXXFLAGS': '-fsanitize=address -fno-omit-frame-pointer', - 'CMAKEPARAM': - ' -G Ninja', - 'MAKE' : 'ninja', - 'ASAN_OPTIONS' : 'detect_leaks=0', # see ASAN_OPTIONS=help=1 - } -} - -mingwlibs_builder = { - 'name': 'mingwlibs', - 'slavenames': ['jk1', 'abma2'], - 'builddir': 'mingwlibs', - 'factory': MingwLibsBuildFactory(), - 'properties': {'branch': 'master'} -} - -msvc_builder = { - 'name': 'msvc', - 'slavenames': ['supermario'], - 'builddir': 'msvc', - 'factory': MsvcFullBuildFactory(), - 'properties': {'branch': 'master'}, - 'env': { - 'MAKE' : 'ninja', - 'CMAKEPARAM': '-DFREETYPE_INCLUDE_DIRS=vclibs/include/freetype' - ' -G Ninja ' - ' -DAI_TYPES:STRING=NONE', #FIXME: fix AIs / remove this - 'CXX' : 'cl.exe', - 'CC' : 'cl.exe', - } -} - -#order of these lines are the same as on waterfall -c['builders'].append(windows_builder_test) -c['builders'].append(windows_builder_x64) -c['builders'].append(linux_static_builder_x32) -c['builders'].append(linux_static_builder_x64) -c['builders'].append(macosx_quick_builder) -c['builders'].append(validation_builder) -c['builders'].append(macosx_builder) -c['builders'].append(cppcheck_builder) -c['builders'].append(doxygen_builder) -c['builders'].append(source_builder) -c['builders'].append(wiki_builder) -c['builders'].append(mingwlibs_builder) -c['builders'].append(msvc_builder) - - -####### STATUS TARGETS - -from buildbot.status.html import WebStatus -from buildbot.status.web.authz import Authz -from buildbot.status.web.auth import HTPasswdAuth -authz = Authz( - auth = HTPasswdAuth('htpasswd'), - forceBuild = 'auth', - forceAllBuilds = 'auth', - stopBuild = 'auth', - stopAllBuilds = 'auth', - stopChange = 'auth', - cancelPendingBuild = 'auth' -) -web = WebStatus( - http_port='tcp:7778:interface=127.0.0.1', - authz=authz, - change_hook_dialects={ 'github' : {} } -) -c['status'].append(web) - -from buildbot.status import words -irc = words.IRC("irc.springrts.com", "MrBuild", - channels=["sy"], - password=passwords.mrbuild, - notify_events={ - 'successToFailure': 1, - 'warningsToFailure': 1, - 'failureToSuccess': 1, - 'failureToWarnings': 1, - }) -c['status'].append(irc) - -####### DEBUGGING OPTIONS - -#c['debugPassword'] = "debugpassword" -#c['manhole'] = buildbot.manhole.PasswordManhole("tcp:9999:interface=127.0.0.1", "admin", "password") - -####### PROJECT IDENTITY - -c['projectName'] = "Spring" -c['projectURL'] = "https://springrts.com" -c['buildbotURL'] = "http://buildbot.springrts.com/" diff --git a/buildbot/master/passwords.py.template b/buildbot/master/passwords.py.template deleted file mode 100644 index 35c1e5ffb5..0000000000 --- a/buildbot/master/passwords.py.template +++ /dev/null @@ -1,11 +0,0 @@ -# password list for buildslaves -macosx1 = '' -debugpassword = '' -freenode = '' -koshi1 = '' -abma1 = '' -abma2 = '' -zydox1 = '' -jk1 = '' -mrbuild = '' - diff --git a/buildbot/master/public_html/bg_gradient.jpg b/buildbot/master/public_html/bg_gradient.jpg deleted file mode 100644 index 6c2e5ddf2fc87743a0794ee59f2a46addd2c3c92..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1822 zcmbu3e>~HPAICrYmHcYfnBx3gSYxNGlBTps8|LRw&f(+?#|bqV&Chu_Lh~~}u59KC zIZbz0!nDpRC8r_3#nG6~uQt*TcI*3n+~aZo-|PL?`|*0ep6{1pSTO}?xj2)Z0T2iT zkdy-`#sJ69+ket$$bSNS4l5o2i0wcfpbY^b05AdsL4Xupz%BrQD7*e!AP87Z>0q@0 z5Eur5LI5!2|27C=0_-PxeX}zz9n9tk`7c(cS4~47DsOfF*Y4jCWfrP5tdy@n5T#)M zQ2v3$rL$K!{1@PzLM6oJgm;l*6wrWxl+7RrzyVl-yTCpXsaJ_ldBgm9nXq~wx?%`r z5*(DHwd`Dtu=Fn-w!2^SSRzarps5d;?jIOU1Ox>%#-G) zj311~%^B8}Q{{%HAdo?lZPmC$D) zp38G4PG=cYdV(o^<)Pc$k?l4L}i**f7l(omrF)}m@+ zttQiP#bNf7Xx;;6RlDUccgeidc`UIbP|gpzRiaNRoh=@JXegBXw}!Z+?PqyL?ys+I zga(`ce!#GFf?lD<nrnf`R{(OA8{_sb z*Jx)4nQ(S?Oq~v0pI0PFpa``b+$2y#vR)n}zlfhUW4GMER_lFG>*4-3yaG9GmNYd8 z1Q1X*6HC95CIwoUS2F^YI|e33yrQ7tdemKWqX=7Ce4M!Um;zX}IFivWVj9t2SR@5no8Zo(&U?khna^u!obV2yxwL{&WNg6ORE0Y8B+)J zhGLFq+nP|GT$vv95QO)2-9Arf6T3l*?LEcT<9LJTT?~fcJ1ENQLt6N=S?1EjS0p}p zIE@xhTKAeUL#W36v6oz;GQP)8C=|HknD?fnL@EB;aB@+9jF?I?jDcm4-B0%6ZPjo@ zq0z0t758&7&Q~z43cwnJ+#r!U``<;-`!~;K5$<1}O4yO~k>&6Hm*j~R^_B>$S!)bR z5FFhR%_S1_n!6LiwZlKqX}rRI-7WJ!u_e2qWwqS2$6b~g_UQvm8vo_B%t8mxRO)8S z?%Rb?`7;ZLGt$@Kl?{g+OwVA(T+n-v<~p_X;9yr@pYL0x28(Z8NhX+bG8}i|N~Wc) z-$gj5ughnxzS`N2gW7zuu`kv*+A)xr54u}#a%G2ve0fm*G{kII58@!(hjH>;A`+>SV+kJk=-jiPrHm{nVHoC~U$ z({039`P!MQq5VFt`_gZ&npix}ByQ<#$@(( zdpGG2f~5K}&EALNym+#Z%k~jejaZVL?RFcNlXuQ8H7%ub@N3P&C~S%tIal>D#wWpW z(#fb&#ieF6wx##k+&4N&0u^MUt#|5L$E_--XuxF37+)qTFUN!hlz_^v>*x}0&J_Xx zF}Y3N`|OLKYew}2l}Wg=!te7K0jH)2j1f+0a:hover { - color: black; -} - -div.Announcement>div.Notice { - background-color: #afdaff; - padding: 0.5em; - font-size: 16px; - text-align: center; -} - -div.Announcement>div.Open { - border: 3px solid #8fdf5f; - padding: 0.5em; - font-size: 16px; - text-align: center; -} - -div.Announcement>div.Closed { - border: 5px solid #e98080; - padding: 0.5em; - font-size: 24px; - font-weight: bold; - text-align: center; -} - -td.Time { - color: #000; - border-bottom: 1px solid #aaa; - background-color: #eee; -} - -td.Activity,td.Change,td.Builder { - color: #333333; - background-color: #CCCCCC; -} - -td.Change { - border-radius: 5px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; -} - -td.Event { - color: #777; - background-color: #ddd; - border-radius: 5px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; -} - -td.Activity { - border-top-left-radius: 10px; - -webkit-border-top-left-radius: 10px; - -moz-border-radius-topleft: 10px; - min-height: 20px; - padding: 2px 0 2px 0; -} - -td.idle,td.waiting,td.offline,td.building { - border-top-left-radius: 0px; - -webkit-border-top-left-radius: 0px; - -moz-border-radius-topleft: 0px; -} - -.LastBuild { - border-top-left-radius: 5px; - -webkit-border-top-left-radius: 5px; - -moz-border-radius-topleft: 5px; - border-top-right-radius: 5px; - -webkit-border-top-right-radius: 5px; - -moz-border-radius-topright: 5px; -} - -/* Console view styles */ -td.DevStatus > table { - table-layout: fixed; -} - -td.DevRev { - padding: 4px 8px 4px 8px; - color: #333333; - border-top-left-radius: 5px; - -webkit-border-top-left-radius: 5px; - -moz-border-radius-topleft: 5px; - background-color: #eee; - width: 1%; -} - -td.DevRevCollapse { - border-bottom-left-radius: 5px; - -webkit-border-bottom-left-radius: 5px; - -moz-border-radius-bottomleft: 5px; -} - -td.DevName { - padding: 4px 8px 4px 8px; - color: #333333; - background-color: #eee; - width: 1%; - text-align: left; -} - -td.DevStatus { - padding: 4px 4px 4px 4px; - color: #333333; - background-color: #eee; -} - -td.DevSlave { - padding: 4px 4px 4px 4px; - color: #333333; - background-color: #eee; -} - -td.first { - border-top-left-radius: 5px; - -webkit-border-top-left-radius: 5px; - -moz-border-radius-topleft: 5px; -} - -td.last { - border-top-right-radius: 5px; - -webkit-border-top-right-radius: 5px; - -moz-border-radius-topright: 5px; -} - -td.DevStatusCategory { - border-radius: 5px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-width: 1px; - border-style: solid; -} - -td.DevStatusCollapse { - border-bottom-right-radius: 5px; - -webkit-border-bottom-right-radius: 5px; - -moz-border-radius-bottomright: 5px; -} - -td.DevDetails { - font-weight: normal; - padding: 8px 8px 8px 8px; - color: #333333; - background-color: #eee; - text-align: left; -} - -td.DevDetails li a { - padding-right: 5px; -} - -td.DevComment { - font-weight: normal; - padding: 8px 8px 8px 8px; - color: #333333; - background-color: #eee; - text-align: left; -} - -td.DevBottom { - border-bottom-right-radius: 5px; - -webkit-border-bottom-right-radius: 5px; - -moz-border-radius-bottomright: 5px; - border-bottom-left-radius: 5px; - -webkit-border-bottom-left-radius: 5px; - -moz-border-radius-bottomleft: 5px; -} - -td.Alt { - background-color: #ddd; -} - -.legend { - border-radius: 5px !important; - -webkit-border-radius: 5px !important; - -moz-border-radius: 5px !important; - width: 100px; - max-width: 100px; - text-align: center; - padding: 2px 2px 2px 2px; - height: 14px; - white-space: nowrap; -} - -.DevStatusBox { - text-align: center; - height: 20px; - padding: 0 2px; - line-height: 0; - white-space: nowrap; -} - -.DevStatusBox a { - opacity: 0.85; - border-width: 1px; - border-style: solid; - border-radius: 4px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - display: block; - width: 90%; - height: 20px; - line-height: 20px; - margin-left: auto; - margin-right: auto; -} - -.DevStatusBox a.notinbuilder { - border-style: none; -} - -.DevSlaveBox { - text-align: center; - height: 10px; - padding: 0 2px; - line-height: 0; - white-space: nowrap; -} - -.DevSlaveBox a { - opacity: 0.85; - border-width: 1px; - border-style: solid; - border-radius: 4px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - display: block; - width: 90%; - height: 10px; - line-height: 20px; - margin-left: auto; - margin-right: auto; -} - -a.noround { - border-radius: 0px; - -webkit-border-radius: 0px; - -moz-border-radius: 0px; - position: relative; - margin-top: -8px; - margin-bottom: -8px; - height: 36px; - border-top-width: 0; - border-bottom-width: 0; -} - -a.begin { - border-top-width: 1px; - position: relative; - margin-top: 0px; - margin-bottom: -7px; - height: 27px; - border-top-left-radius: 4px; - -webkit-border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; - border-top-right-radius: 4px; - -webkit-border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; -} - -a.end { - border-bottom-width: 1px; - position: relative; - margin-top: -7px; - margin-bottom: 0px; - height: 27px; - border-bottom-left-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - border-bottom-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; -} - -.center_align { - text-align: center; -} - -.right_align { - text-align: right; -} - -.left_align { - text-align: left; -} - -div.BuildWaterfall { - border-radius: 7px; - -webkit-border-radius: 7px; - -moz-border-radius: 7px; - position: absolute; - left: 0px; - top: 0px; - background-color: #FFFFFF; - padding: 4px 4px 4px 4px; - float: left; - display: none; - border-width: 1px; - border-style: solid; -} - -/* LastBuild, BuildStep states */ -.success { - color: #000; - background-color: #8d4; - border-color: #4F8530; -} - -.failure { - color: #000; - background-color: #e88; - border-color: #A77272; -} - -.failure-again { - color: #000; - background-color: #eA9; - border-color: #A77272; -} - -.warnings { - color: #FFFFFF; - background-color: #fa3; - border-color: #C29D46; -} - -.skipped { - color: #000; - background: #AADDEE; - border-color: #AADDEE; -} - -.exception,.retry { - color: #FFFFFF; - background-color: #c6c; - border-color: #ACA0B3; -} - -.start { - color: #000; - background-color: #ccc; - border-color: #ccc; -} - -.running,.waiting,td.building { - color: #000; - background-color: #fd3; - border-color: #C5C56D; -} - -.paused { - color: #FFFFFF; - background-color: #8080FF; - border-color: #dddddd; -} - -.offline,td.offline { - color: #FFFFFF; - background-color: #777777; - border-color: #dddddd; -} - - -.start { - border-bottom-left-radius: 10px; - -webkit-border-bottom-left-radius: 10px; - -moz-border-radius-bottomleft: 10px; - border-bottom-right-radius: 10px; - -webkit-border-bottom-right-radius: 10px; - -moz-border-radius-bottomright: 10px; -} - -.notstarted { - border-width: 1px; - border-style: solid; - border-color: #aaa; - background-color: #fff; -} - -.closed { - background-color: #ff0000; -} - -.closed .large { - font-size: 1.5em; - font-weight: bolder; -} - -td.Project a:hover,td.start a:hover { - color: #000; -} - -.mini-box { - text-align: center; - height: 20px; - padding: 0 2px; - line-height: 0; - white-space: nowrap; -} - -.mini-box a { - border-radius: 0; - -webkit-border-radius: 0; - -moz-border-radius: 0; - display: block; - width: 100%; - height: 20px; - line-height: 20px; - margin-top: -30px; -} - -.mini-closed { - -box-sizing: border-box; - -webkit-box-sizing: border-box; - border: 4px solid red; -} - -/* grid styles */ -table.Grid { - border-collapse: collapse; -} - -table.Grid tr td { - padding: 0.2em; - margin: 0px; - text-align: center; -} - -table.Grid tr td.title { - font-size: 90%; - border-right: 1px gray solid; - border-bottom: 1px gray solid; -} - -table.Grid tr td.sourcestamp { - font-size: 90%; -} - -table.Grid tr td.builder { - text-align: right; - font-size: 90%; -} - -table.Grid tr td.build { - border: 1px gray solid; -} - -/* column container */ -div.column { - margin: 0 2em 2em 0; - float: left; -} - -/* info tables */ -table.info { - border-spacing: 1px; -} - -table.info td { - padding: 0.1em 1em 0.1em 1em; - text-align: center; -} - -table.info th { - padding: 0.2em 1.5em 0.2em 1.5em; - text-align: center; -} - -table.info td.left { - text-align: left -} - -table.info td .reason { - display:block; - font-weight: bold; -} - -.alt { - background-color: #f6f6f6; -} - -li { - padding: 0.1em 1em 0.1em 1em; -} - -.result { - padding: 0.3em 1em 0.3em 1em; -} - -/* log view */ -.log * { - vlink: #800080; -} - -span.stdout { - color: black; -} - -span.stderr { - color: red; -} - -span.header { - color: blue; -} -span.ansi30 { - color: black; -} -span.ansi31 { - color: red; -} -span.ansi32 { - color: green; -} -span.ansi33 { - color: orange; -} -span.ansi34 { - color: yellow; -} -span.ansi35 { - color: purple; -} -span.ansi36 { - color: blue; -} -span.ansi37 { - color: white; -} - -/* revision & email */ -.revision .full { - display: none; -} - -.user .email { - display: none; -} - -pre { - white-space: pre-wrap; -} - -/* change comments (use regular colors here) */ -pre.comments>a:link,pre.comments>a:visited { - color: blue; -} - -pre.comments>a:active { - color: purple; -} - -form.command_forcebuild { - border-top: 1px solid black; - padding: .5em; - margin: .5em; -} - -form.command_forcebuild > .row { - border-top: 1px dotted gray; - padding: .5em 0; -} - -form.command_forcebuild .force-textarea > .label { - display: block; -} - -form.command_forcebuild .force-nested > .label { - font-weight: bold; - display: list-item; -} - -form.command_forcebuild .force-any .force-text { - display: inline; -} diff --git a/buildbot/master/public_html/favicon.ico b/buildbot/master/public_html/favicon.ico deleted file mode 100644 index b0b0845dce40e4845f7e7251b37b78a40b34c961..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1150 zcmchXNoW&c7>55;t9WsN>Op(Zi+T_dQBkybP!Sj0MWn6Pt=4MNOwu$nPS(lVNhY0S zl1#HUX_GWby+|vbTtGz;1ikbqJ&P1U#O2`YKWd-_1y9cK%=_~3zu$bb5~8E~^5ujc z*OH!vgsdWjY^2ZiCOEK9u=D$CBsEtZFg0gI&co6q&^Zkcypt>5`GT^nph+oyuy zMb6cU$l!6k< z0TE*!A4(npCBd!fY*}!&HhOfPzs{!zRn(OcR4EgQ0`)mc9`#rj)o2E_Xd2@Y6}3nL z|y<1t4aaY7|qfds?i)p%VklH45K8e7z-zU5sITMB{32hdZOj6 z2K!`%=4v!wp}Epf24zYyoJ28{#3)s*$EX;`NHB(cK&Dw4IiK{xqPJ~Ni^JcGQW^y* zh0#bF*`R_DCsc}Jd~ZFLS(o)mTbN7NGf5$gtUrQ`Pr|SuA|;5gvZ2(y0?p<`6@_pL zc`=EL$4+3)%9i&{I-*bp7Bx2)Pap62EbtQI&L9#$2_RvG13fUe6 zccC4MsSkWtCyuu5K~I+fZd(*yhk`-Y1DW?i;#>$>9n;$N%TDo-B1Aq$T_HrBB7%B7 zR11S~uLsjp5AgQ!YdoBI1lgxzaKM2;KM%k8HvA@TqVfE~yl+Q{_rKHn53&McoCEjN z9A4BW@w9#)MS5>M3clzkAn;dGDaWaO>R+|Hfs!{mI$K!D+C{iIr*Ejy p=YQxI5b|X)As-eHGNYr=zr ~/run/slave_schroot_session - ## `ionice -c3' sets the process to idle IO priority. - ## This is only useful when using CFQ IO scheduler on the relevant disk. - schroot --run-session --chroot `cat ~/run/slave_schroot_session` --user=${USER} -- env -i PATH=/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin nice -19 ionice -c3 buildslave start /slave - -stop-slave: - ##### Not using schroot - #buildbot stop slaves/testslave - ##### Using schroot - schroot --run-session --chroot `cat ~/run/slave_schroot_session` --user=${USER} buildslave stop /slave - schroot --end-session --chroot `cat ~/run/slave_schroot_session` --user=${USER} - rm ~/run/slave_schroot_session - -enter-chroot: - schroot --run-session --chroot `cat ~/run/slave_schroot_session` --user=${USER} --directory / - -start: start-slave - -stop: stop-slave diff --git a/buildbot/slave/cppcheck/cppcheck.sh b/buildbot/slave/cppcheck/cppcheck.sh deleted file mode 100755 index ad29df8a13..0000000000 --- a/buildbot/slave/cppcheck/cppcheck.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -set +e - -CHECK="cppcheck --file-list=/dev/stdin --force --quiet \ - --suppressions-list=buildbot/slave/cppcheck/cppcheck.supress \ - --enable=performance,portability \ - --std=c++11" -# run CppCheck for the engine sources -find rts/ \ - -name "*\.cpp" -or -name "*\.c" \ - | grep -v '^rts/lib' \ - | $CHECK \ - -I rts \ - $@ - -# run CppCheck for the native AI sources -find AI/ \ - -name "*\.cpp" -or -name "*\.c" \ - | $CHECK \ - -I rts -I rts/ExternalAI/Interface -I AI/Wrappers \ - $@ diff --git a/buildbot/slave/cppcheck/cppcheck.supress b/buildbot/slave/cppcheck/cppcheck.supress deleted file mode 100644 index d4673c73e8..0000000000 --- a/buildbot/slave/cppcheck/cppcheck.supress +++ /dev/null @@ -1,5 +0,0 @@ -//hide "SYNCDEBUG is already guaranteed to be defined" -preprocessor914 -passedByValue -invalidPointerCast -invalidscanf diff --git a/buildbot/slave/create-build-dirs.py b/buildbot/slave/create-build-dirs.py deleted file mode 100755 index b6a52f95d9..0000000000 --- a/buildbot/slave/create-build-dirs.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python2 - -import prepare -import os, subprocess, sys, shutil - - -CMAKEPARAM=[] -if 'CMAKEPARAM' in os.environ: - CMAKEPARAM=os.environ['CMAKEPARAM'].split(" ") - -CMAKEBIN='cmake' -if 'CMAKEBIN' in os.environ: - CMAKEBIN=os.environ['CMAKEBIN'] - -print("Creating BUILDDIR: %s" %(prepare.BUILDDIR)) -if not os.path.isdir(prepare.BUILDDIR): - os.makedirs(prepare.BUILDDIR) - -basedir = os.path.join(prepare.BUILDDIR, 'base') -if os.path.isdir(basedir): - print("erasing old base content... %s" %(basedir)) - shutil.rmtree(basedir) - -print("configuring %s with %s %s in %s" %(prepare.SOURCEDIR, CMAKEBIN, CMAKEPARAM + sys.argv[3:], prepare.BUILDDIR)) -subprocess.call([CMAKEBIN] + CMAKEPARAM + sys.argv[3:] + [prepare.SOURCEDIR], cwd=prepare.BUILDDIR) -subprocess.call([prepare.MAKE, "generateSources", "-j1"], cwd=prepare.BUILDDIR) - diff --git a/buildbot/slave/create-doc.sh b/buildbot/slave/create-doc.sh deleted file mode 100755 index de79ecfd9a..0000000000 --- a/buildbot/slave/create-doc.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# generates documentation from springs source code -set -e -. buildbot/slave/prepare.sh - -DEST=${TMP_BASE}/doc/${REV} -mkdir -p $DEST/engine - -echo $DEST -( -cat Doxyfile -echo "OUTPUT_DIRECTORY = $DEST/engine" -echo "HTML_OUTPUT = ./" -) | doxygen - -echo $DEST - -#FIXME: find a way to directly generate in $DEST -cd AI/Interfaces/Java/bin -ant doc -cd - -mv dist/AI/Interfaces/Java/0.1/doc/jdoc/ $DEST/Java - -cd AI/Wrappers/JavaOO/bin -ant doc -cd - -mv dist/AI/Wrappers/JavaOO/doc/jdoc/ $DEST/JavaOO - -echo "Wrote doc to $DEST" - diff --git a/buildbot/slave/create-md5sums.py b/buildbot/slave/create-md5sums.py deleted file mode 100755 index 72ad944708..0000000000 --- a/buildbot/slave/create-md5sums.py +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env python3 - -import prepare -import hashlib, sys, os - -path = prepare.TMP_BASE -suffixes = sys.argv[3:] # config + branch are used in prepare.py -suffix = ".md5" - -def hashfile(filename, blocksize=4096): - hasher = hashlib.md5() - f = open(filename, "rb") - buf = f.read(blocksize) - while len(buf) > 0: - hasher.update(buf) - buf = f.read(blocksize) - return hasher.hexdigest() - -def createhash(filename, md5): - f = open(md5, 'wb') - hexdigest = hashfile(filename) - line = "%s %s" %(hexdigest, os.path.basename(filename)) - f.write(str.encode(line)) - f.close() - return hexdigest - -def verify(fn, md5): - f = open(md5, "rb").read().decode("utf-8") - hexdigest, filename = f.split(" ", 1) - if filename != os.path.basename(fn): - print("Invalid file: %s %s"% (filename, fn)) - return False, "" - h = hashfile(fn) - return h == hexdigest, h - -def handlefile(f, suffixes, suffix): - if f.endswith(suffix): - return - skip = True - - basename = os.path.basename(f) - - for s in suffixes: # check if filename matches suffix - if basename.endswith(s): - skip = False - break - if skip: return - - md5file = f + suffix - if os.path.isfile(md5file): - res, h = verify(f, md5file) - print("Verifying %s: %s - %s" % (h, f, res)) - else: - h = createhash(f, md5file) - print("Creating %s: %s" % (h, md5file)) - - -for root, directories, filenames in os.walk(path): - for filename in filenames: - handlefile(os.path.join(root, filename), suffixes, suffix) - diff --git a/buildbot/slave/ld b/buildbot/slave/ld deleted file mode 100755 index c1fb3b922b..0000000000 --- a/buildbot/slave/ld +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# Surrounds the linker command with a lock, so that -# only one linker process can run at any one time. - -# The real linker should be renamed to `ld.orig' - -echo "DEBUG: $0 $@" -exec /usr/bin/flock / $0.orig $@ diff --git a/buildbot/slave/linux/create_linux_static_bundle.sh b/buildbot/slave/linux/create_linux_static_bundle.sh deleted file mode 100755 index 5a0a15b993..0000000000 --- a/buildbot/slave/linux/create_linux_static_bundle.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash -set -e -. buildbot/slave/prepare.sh - -FILEPREFIX="${OUTPUTDIR}-static" -PLATFORM=${OUTPUTDIR} - -DEST=${TMP_BASE}/inst -INSTALLDIR=${DEST} - -echo "Installing into $DEST" - -#Ultra settings, max number of threads taken from commandline. -SEVENZIP="nice -19 ionice -c3 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on -mmt=${2:-on}" -SEVENZIP_NONSOLID="nice -19 ionice -c3 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=off -mmt=${2:-on}" -ZIP="zip -r9" - -cd ${BUILDDIR} -DESTDIR=${DEST} ${MAKE} install -cd ${INSTALLDIR} - - -EXECUTABLES="spring* lib*.so pr-downloader $(find AI/Skirmish -name libSkirmishAI.so) $(find AI/Interfaces -name libAIInterface.so)" - -DEBUGFILES="" - -#strip symbols into a separate file -for tostripfile in ${EXECUTABLES}; do - if [ -f ${tostripfile} ]; then - if readelf -h ${tostripfile} &> /dev/null; then - # dont strip binaries that we processed earlier - if ! objdump -h ${tostripfile} | grep -q .gnu_debuglink; then - echo "stripping ${tostripfile}" - debugfile=${tostripfile%.*}.dbg - objcopy --only-keep-debug ${tostripfile} ${debugfile} - strip --strip-debug --strip-unneeded ${tostripfile} - objcopy --add-gnu-debuglink=${debugfile} ${tostripfile} - DEBUGFILES="${DEBUGFILES} ${debugfile}" - else - echo "not stripping ${tostripfile}" - fi - # remove RPATH/RUNPATH - chrpath --delete ${tostripfile} - fi - fi -done - -# not all distros have a libSDL-1.2.so.0 link, so better link to the always existing libSDL.so -# note, cmake says it links to /usr/lib/libSDL.so. But the final binary links then libSDL-1.2.so.0, so either cmake or gcc/ld fails. -# WTF it seems libraries with general names are against ubuntu's `naming scheme` (see https://bugs.launchpad.net/ubuntu/+source/libsdl1.2/+bug/182439) ... -if (( 0 > 1)); then - SDL_LIB_NAME_VER="libSDL-1.2.so.0" - SDL_LIB_NAME_FIX="libSDL.so\x0\x0\x0\x0\x0\x0" - OMP_LIB_NAME_VER="libgomp.so.1" - OMP_LIB_NAME_FIX="libgomp.so\x0\x0" - for binary in ${BINARIES}; do - if [ -f ${binary} ]; then - if readelf -h ${binary} &> /dev/null; then - if grep -q "${SDL_LIB_NAME_VER}" ${binary}; then - echo "fix libSDL.so linking in ${binary}" - sed -i -e "s/${SDL_LIB_NAME_VER}/${SDL_LIB_NAME_FIX}/g" -e "s/${OMP_LIB_NAME_VER}/${OMP_LIB_NAME_FIX}/g" ${binary} - fi - fi - fi - done -fi - -mkdir -p ${TMP_PATH} - -#create archive for translate_stacktrace.py -${SEVENZIP_NONSOLID} ${TMP_PATH}/${VERSION}_spring_dbg.7z ${DEBUGFILES} - -#absolute path to the minimal portable (engine, unitsync + ais) -MIN_PORTABLE_ARCHIVE=${TMP_PATH}/spring_${VERSION}_minimal-portable-${FILEPREFIX}.7z - -#create portable spring excluding shard (ask AF why its excluded) -touch ${INSTALLDIR}/springsettings.cfg -${SEVENZIP} ${MIN_PORTABLE_ARCHIVE} ${INSTALLDIR}/* -xr!*.dbg -xr!*.dbg.7z - -# create relative symbolic links to current files for rsyncing -cd ${TMP_PATH}/../.. -ln -sfv ${REV}/$OUTPUTDIR/spring_${VERSION}_minimal-portable-${FILEPREFIX}.7z spring_testing_minimal-portable-${FILEPREFIX}.7z -echo ${VERSION} > LATEST_${PLATFORM} diff --git a/buildbot/slave/linux/linuxStatic.cmake b/buildbot/slave/linux/linuxStatic.cmake deleted file mode 100644 index 664b67292a..0000000000 --- a/buildbot/slave/linux/linuxStatic.cmake +++ /dev/null @@ -1,26 +0,0 @@ - -## Note, the `CACHE ...` prefix is needed -## else CMakeLists.txt overrides our given values! - -SET(PREFER_STATIC_LIBS TRUE CACHE BOOL "") - -# we want relative paths in debugsymbols -SET(CMAKE_USE_RELATIVE_PATHS TRUE CACHE BOOL "") - -SET(BUILD_spring-headless TRUE CACHE BOOL "") -SET(BUILD_spring-dedicated TRUE CACHE BOOL "") -#SET(AI_TYPES "NONE" CACHE STRING "") - -# fix a cmake relink bug during install -set(CMAKE_EXECUTABLE_FORMAT "ELF") - -SET(CMAKE_INSTALL_PREFIX "" CACHE STRING "") -SET(BINDIR "./" CACHE STRING "") -SET(LIBDIR "./" CACHE STRING "") -SET(DATADIR "./" CACHE STRING "") -SET(MANDIR "share/man" CACHE STRING "") -SET(DOCDIR "share/doc/spring" CACHE STRING "") - -#SET(APPLICATIONS_DIR "share/applications" CACHE STRING "") -#SET(PIXMAPS_DIR "share/pixmaps" CACHE STRING "") -#SET(MIME_DIR "share/mime" CACHE STRING "") diff --git a/buildbot/slave/linux/static-show-used-dynamic-libraries.sh b/buildbot/slave/linux/static-show-used-dynamic-libraries.sh deleted file mode 100755 index ad728a5c26..0000000000 --- a/buildbot/slave/linux/static-show-used-dynamic-libraries.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -BINARY=${1:-build/default/spring} - -echo "Direct linked libraries: " -echo "readelf -d ${BINARY}: " -readelf -d ${BINARY} | grep "Shared library:" | awk '{print $3" "$4" "$5;}' -echo " " -echo " " -echo "Indirect linked libraries and missing objects / functions: " -echo "ldd -v -r ${BINARY}: " -ldd -r -v ${BINARY} -exit $? diff --git a/buildbot/slave/linux/static-test-if-shared-linked.sh b/buildbot/slave/linux/static-test-if-shared-linked.sh deleted file mode 100755 index c03c4f6607..0000000000 --- a/buildbot/slave/linux/static-test-if-shared-linked.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -BINARY=${1:-build/default/spring} -LIBRARY=${2} - -# check if the binary links the library -readelf -d ${BINARY} | grep -i "Shared library:" | grep -iq ${LIBRARY} - -# grep returns 0 if found and 1 if not -RESULT=$? - -# invert the return argument (it should give an error when the library is linked) -if (( RESULT == 1 )); then - echo "${BINARY} static linked to ${LIBRARY}" - exit 0 -elif (( RESULT == 0 )); then - echo "${BINARY} links to ${LIBRARY}" - exit 1 -fi -exit $? diff --git a/buildbot/slave/no-msync.c b/buildbot/slave/no-msync.c deleted file mode 100644 index c97f825bca..0000000000 --- a/buildbot/slave/no-msync.c +++ /dev/null @@ -1,8 +0,0 @@ -/* compile using: gcc -shared -m32 no-msync.c -o no-msync.so */ -#include -#include -int msync(void *addr, size_t len, int flags) {} -static void _no_msync_init(void) __attribute__ ((constructor)); -static void _no_msync_init(void) { - putenv("LD_PRELOAD="); -} diff --git a/buildbot/slave/osx/create_Mac_bundle.sh b/buildbot/slave/osx/create_Mac_bundle.sh deleted file mode 100755 index 722124332e..0000000000 --- a/buildbot/slave/osx/create_Mac_bundle.sh +++ /dev/null @@ -1,162 +0,0 @@ -#!/bin/bash -set -e -. buildbot/slave/prepare.sh - - -DEST=${TMP_BASE}/inst -#FIXME: remove hardcoded /usr/local -INSTALLDIR=${DEST}/usr/local - -echo "Installing into $DEST" - -cd ${BUILDDIR} -${MAKE} install DESTDIR=${DEST} - -# The Spring.app bundle will have the following folder hierarchy: -# -> Contents -# ---> Info.plist -# ---> MacOS -# -----> executables -# ---> Resources -# -----> app icon -# ---> lib -# -----> Required libraries to run (from MacPorts) -# ---> share -# -----> game content, doc, etc. - -BUNDLE_NAME=Spring_${VERSION}.app -BUNDLE_BASE=${TMP_PATH}/${BUNDLE_NAME}/Contents - -echo "Creating ${BUNDLE_NAME}..." - -MACPORTS_BASE=`which port | sed s/[/]bin[/]port//` -STRIP="strip -r -u" - -mkdir -p ${BUNDLE_BASE} -echo "-- changing directory to ${BUNDLE_BASE}" -cd ${BUNDLE_BASE} - -# insert the version number in the Info.plist file -echo "-- creating executable header file (Info.plist)" -cat ${SOURCEDIR}/installer/Mac/Info.plist | sed s/###VERSION###/${VERSION}/ > Info.plist - -echo "-- creating folders MacOS and Resources" -mkdir MacOS Resources - -echo "-- installing executables into folder: MacOS" -mv ${INSTALLDIR}/bin/* MacOS/ - -echo "-- installing application icon into folder: Resources" -cp ${SOURCEDIR}/installer/Mac/spring.icns Resources/ - -echo "-- moving library folder into folder: lib" -mv ${INSTALLDIR}/lib . - -echo "-- moving unitsync library to folder: MacOS (due to spring's relative pathing)" -mv lib/libunitsync.dylib MacOS/ - -# not needed (yet) for the server lib, uncomment if necessary -#mv lib/libspringserver.dylib MacOS/ - -echo "-- moving game content into folder: share" -mv ${INSTALLDIR}/share . - -echo "-- copying 3rd-party libraries into folder: lib (provided by MacPorts)" -for executable in `ls MacOS` -do - # for each MacPorts's dylib required by the executable - for dylib in `otool -L MacOS/${executable} | grep ${MACPORTS_BASE} | egrep -o lib.*dylib` - do - # dylib =~ "lib{/optional-sub-dirs}/lib{name-version}.dylib" - - #echo "---- ${executable} requires ${MACPORTS_BASE}/${dylib}" - - # strip down the optional subdirectories (if any) - locallib=lib/`echo ${dylib} | egrep -o [^/]*$` - - if [ ! -f ${locallib} ] - then - echo "---- copying ${MACPORTS_BASE}/${dylib} to ${locallib}" - cp ${MACPORTS_BASE}/${dylib} ${locallib} - - #echo "---- taking write permissions on ${locallib}" - chmod u+w ${locallib} - - # change the bundled lib's id to relative pathing mode (not necessary but cleaner) - install_name_tool -id @loader_path/../${locallib} ${locallib} - fi - - #echo "---- telling ${executable} to use ${locallib} instead of ${MACPORTS_BASE}/${dylib}" - # point the executable to the bundled lib in relative pathing mode - install_name_tool -change ${MACPORTS_BASE}/${dylib} @loader_path/../${locallib} MacOS/${executable} - - # the bundled lib is autonomous => it can be stripped - #echo "---- stripping down ${locallib}" - ${STRIP} ${locallib} - done - - #echo "--- stripping down ${executable}" - ${STRIP} MacOS/${executable} -done - -# continue with recursive dependencies -echo "-- copying other required 3rd-party libraries into folder: lib (provided by MacPorts)" -end=0 -while [ $end -eq 0 ] -do - # assume we're already done - end=1 - - # for each dylib already bundled - for dylib in `ls lib` - do - # check if all dependent MacPorts libs are also bundled - - for requiredlib in `otool -L lib/${dylib} | grep ${MACPORTS_BASE} | egrep -o lib.*dylib` - do - #echo "---- lib/${dylib} requires ${MACPORTS_BASE}/${requiredlib}" - - # strip down lib's subdirectories (if any) - locallib=lib/`echo ${requiredlib} | egrep -o [^/]*$` - - if [ ! -f ${locallib} ] - then - # a new library will be copied, we'll have to loop to scan it - end=0 - - echo "---- copying ${MACPORTS_BASE}/${requiredlib} to ${locallib}" - cp ${MACPORTS_BASE}/${requiredlib} ${locallib} - - #echo "---- taking write permissions on ${locallib}" - chmod u+w ${locallib} - - # change the bundled lib's id to relative pathing mode (not necessary but cleaner) - install_name_tool -id @loader_path/../${locallib} ${locallib} - - # the bundled lib is autonomous => it can be stripped - #echo "---- stripping down ${locallib}" - ${STRIP} ${locallib} - fi - - # point the parent lib to the bundled lib in relative pathing mode - #echo "---- telling lib/${dylib} to use ${locallib} instead of ${MACPORTS_BASE}/${requiredlib}" - install_name_tool -change ${MACPORTS_BASE}/${requiredlib} @loader_path/../${locallib} lib/${dylib} - done - done -done - -# here, the bundle should be ready, a little compression and voila - -ARCHIVE_NAME=spring_${VERSION}_MacOSX-10.6-SnowLeopard.zip -echo "-- creating ${TMP_PATH}/${ARCHIVE_NAME}" -cd ${TMP_PATH} -zip -r9 ${ARCHIVE_NAME} ${BUNDLE_NAME} - -#remove temp files -rm -rf ${TMP_PATH}/${BUNDLE_NAME} - -#create symbolic link -cd ${TMP_PATH}/.. -ln -sfv ${REV}/${ARCHIVE_NAME} Spring_testing-MacOSX-10.6-SnowLeopard.zip -echo "-- done" - diff --git a/buildbot/slave/osx/macos_sierra_x64.cmake b/buildbot/slave/osx/macos_sierra_x64.cmake deleted file mode 100644 index fe2a9e8289..0000000000 --- a/buildbot/slave/osx/macos_sierra_x64.cmake +++ /dev/null @@ -1,17 +0,0 @@ -set(CMAKE_SYSTEM_NAME "Darwin" CACHE STRING "") -set(CMAKE_SYSTEM_VERSION "10.12" CACHE STRING "") -set(TARGET_ARCH "x86_64" CACHE STRING "") - -set(CMAKE_C_COMPILER "/usr/local/Cellar/gcc\@6/6.4.0_2/bin/gcc-6" CACHE STRING "") -set(CMAKE_CXX_COMPILER "/usr/local/Cellar/gcc\@6/6.4.0_2/bin/g++-6" CACHE STRING "") - -set(Boost_USE_STATIC_LIBS TRUE CACHE BOOL "") - -set(PRD_JSONCPP_INTERNAL FALSE CACHE BOOL "") - -set(GLEW_INCLUDE_DIR "/usr/local/include/GL" CACHE STRING "") - -set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" CACHE STRING "") - -include_directories("/usr/local/include") -link_directories("/usr/local/lib") diff --git a/buildbot/slave/osx/rsync-mac.sh b/buildbot/slave/osx/rsync-mac.sh deleted file mode 100755 index 17d4f01524..0000000000 --- a/buildbot/slave/osx/rsync-mac.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -set -e -. buildbot/slave/prepare.sh - -#TODO: this is the same as in rsync.sh - -REMOTE_HOST=springrts.com -REMOTE_USER=buildbot -REMOTE_BASE=/home/buildbot/www -RSYNC="rsync -avz --chmod=D+rx,F+r --bwlimit 50" -REMOTE_RSYNC="nice -19 ionice -c3 rsync" #prevent QQ about rsync killing server - -umask 022 - -#cleanup installed files before rsyncing -rm -rf ${TMP_BASE}/inst/ - -# Rsync archives to a world-visible location. -if [ ${REMOTE_HOST} = localhost ] && [ -w ${REMOTE_BASE} ]; then - ${RSYNC} ${TMP_BASE}/ ${REMOTE_BASE}/ -else - ${RSYNC} --rsync-path="${REMOTE_RSYNC}" ${TMP_BASE}/ ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_BASE}/ -fi - -# Clean up. -rm -rf ${TMP_BASE}/* diff --git a/buildbot/slave/prepare.py b/buildbot/slave/prepare.py deleted file mode 100644 index f7a752d6ca..0000000000 --- a/buildbot/slave/prepare.py +++ /dev/null @@ -1,62 +0,0 @@ -# This file is included by the other shell scripts to set up some variables. -# Each of the scripts (including this) gets 2 arguments: - -# It sets the following variables: -# - CONFIG : configuration (default, debug, syncdebug, etc.) -# - BRANCH : branch (master, etc.) -# - CONFIG_ : $CONFIG wrapped in [] or empty if CONFIG=default -# - BRANCH_ : $BRANCH wrapped in {} or empty if BRANCH=master -# - REV : output of `git describe --tags' -# - SOURCEDIR: absolute path to the source directory -# - BUILDDIR : absolute path to the build directory -# - TMP_BASE : folder for temporary work items -# - TMP_PATH : $TMP_BASE/$CONFIG/$BRANCH/$REV -# - VERSION_ : version string, unsafe, may include special characters -# - VERSION : sanitized version string, suitable for filenames - -# Quit on error. - -import os, sys, subprocess, tempfile - - -if len(sys.argv) < 2: - print("Please run with %s " %(sys.argv[0])) - exit(1) - - -print(sys.argv) -CONFIG=sys.argv[1] -BRANCH=sys.argv[2] - -REV=subprocess.check_output(["git", "describe", "--tags"], universal_newlines=True).strip() -SOURCEDIR=os.getcwd() -BUILDDIR=os.path.join(os.getcwd(), "build", CONFIG) -TMP_BASE=os.path.join(tempfile.gettempdir(), "spring") -TMP_PATH=os.path.join(TMP_BASE, CONFIG, BRANCH, REV) - -if 'OUTPUTDIR' in os.environ: - TMP_PATH=os.path.join(TMP_PATH, os.environ['OUTPUTDIR']) - -if CONFIG == "default": - CONFIG_='' -else: - CONFIG_="[%s]" %(CONFIG) - -if BRANCH == "master": - BRANCH_='' -else: - BRANCH_="{%s}" % (BRANCH) - - -VERSION_="%s%s%s"%(CONFIG_, BRANCH_, REV) -for char in "<>:\"/\\|?*": - VERSION_=VERSION_.replace(char,'') - -print("Detected VERSION_: %s"%(VERSION_)) - -if 'MAKE' in os.environ: - MAKE=os.environ['MAKE'] -else: - print("MAKE isn't set, using 'make' as default") - MAKE="make" - diff --git a/buildbot/slave/prepare.sh b/buildbot/slave/prepare.sh deleted file mode 100644 index ac9dd5a03e..0000000000 --- a/buildbot/slave/prepare.sh +++ /dev/null @@ -1,55 +0,0 @@ -# This file is included by the other shell scripts to set up some variables. -# Each of the scripts (including this) gets 2 arguments: - -# It sets the following variables: -# - CONFIG : configuration (default, debug, syncdebug, etc.) -# - BRANCH : branch (master, etc.) -# - CONFIG_ : $CONFIG wrapped in [] or empty if CONFIG=default -# - BRANCH_ : $BRANCH wrapped in {} or empty if BRANCH=master -# - REV : output of `git describe --tags' -# - SOURCEDIR: absolute path to the source directory -# - BUILDDIR : absolute path to the build directory -# - TMP_BASE : folder for temporary work items -# - TMP_PATH : $TMP_BASE/$CONFIG/$BRANCH/$REV -# - VERSION_ : version string, unsafe, may include special characters -# - VERSION : sanitized version string, suitable for filenames - -# Quit on error. -set -e - -if [ ! -n "$1" ] && [ ! -n "$2" ]; then - echo "Please run with $0 " - exit 1 -fi - - -CONFIG=${1:-default} -BRANCH=${2:-develop} -shift 2 - -REV=$(git describe --abbrev=7 --tags) -SOURCEDIR=${PWD} -BUILDDIR=${PWD}/build/${CONFIG} -TMP_BASE=/tmp/spring -TMP_PATH=${TMP_BASE}/${CONFIG}/${BRANCH}/${REV}/$OUTPUTDIR - -if [ x${CONFIG} = xdefault ]; then - CONFIG_='' -else - CONFIG_="[${CONFIG}]" -fi - -if [ x${BRANCH} = xmaster ]; then - BRANCH_='' -else - BRANCH_="{${BRANCH}}" -fi - -VERSION_="${CONFIG_}${BRANCH_}${REV}" -VERSION=`echo "${VERSION_}" | tr '<>:\"/\\|?*' -` - -if [ -z "${MAKE}" ]; then - echo "MAKE isn't set, using 'make' as default" - MAKE=make -fi - diff --git a/buildbot/slave/rsync.sh b/buildbot/slave/rsync.sh deleted file mode 100755 index 7b4d25c4c1..0000000000 --- a/buildbot/slave/rsync.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -set -e -. buildbot/slave/prepare.sh - -REMOTE_HOST=springrts.com -REMOTE_USER=buildbot -REMOTE_BASE=/home/buildbot/www -BWLIMIT=4000 -if [ "$OUTPUTDIR" == "win64" ] ; then - BWLIMIT=1000 -fi -RSYNC="rsync -avz --chmod=D+rx,F+r --bwlimit $BWLIMIT --exclude=download/ --exclude=tests/ --remove-source-files" -REMOTE_RSYNC="nice -19 ionice -c3 rsync" #prevent QQ about rsync killing server - -if [ -z "${TMP_BASE}" ]; then - echo "TMP_BASE is empty, something went wrong!" - exit 1 -fi - -umask 022 - -# use old files as base to reduce upload -# Commented out cause it doesn't work. Binaries & debugsymbols just don't share data between compiles :< -#RSYNC="${RSYNC} --fuzzy" -#RSYNC="${RSYNC} --compare-dest=\"${REMOTE_BASE}/${CONFIG}/${BRANCH}/LATEST_LINUX_STATIC/\"" - -# cleanup installed files before rsyncing -rm -rf ${TMP_BASE}/inst/ - -# Rsync archives to a world-visible location. -if [ ${REMOTE_HOST} = localhost ] && [ -w ${REMOTE_BASE} ]; then - ${RSYNC} ${TMP_BASE}/ ${REMOTE_BASE}/ -else - ${RSYNC} --rsync-path="${REMOTE_RSYNC}" ${TMP_BASE}/ ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_BASE}/ -fi - -# delete empty dirs (--remove-source-files doesn't remove dirs) -find ${TMP_BASE}/ -depth -type d -empty -delete - diff --git a/buildbot/slave/run-tests.sh b/buildbot/slave/run-tests.sh deleted file mode 100755 index 74be6f749d..0000000000 --- a/buildbot/slave/run-tests.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -e -. buildbot/slave/prepare.sh - -NUM_CORES=1 -which nproc &> /dev/null && NUM_CORES=`nproc` - -set +e #maybe limit is already lower, do not abort if so -ulimit -t $((300 + NUM_CORES * 100)) -ulimit -m 1200000 -#ulimit -v 4000000 -set -e - -cd ${BUILDDIR} -export SPRING_DATADIR=${BUILDDIR} -export WINEPATH="${BUILDDIR};${MINGWLIBS_PATH}/dll" -$MAKE check diff --git a/buildbot/slave/safe-exec.sh b/buildbot/slave/safe-exec.sh deleted file mode 100755 index 460147df5a..0000000000 --- a/buildbot/slave/safe-exec.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - - -if [ $# -le 1 ]; then - echo Usage: $0 /path/to/binary [params] - exit 1 -fi - -if [ -f $1 ] && [ -x $1 ]; then - TOEXEC=$1 - shift 1 - exec $TOEXEC $@ -else - echo $1 isn't executable / doesn't exist -fi - diff --git a/buildbot/slave/source/make_source_package.sh b/buildbot/slave/source/make_source_package.sh deleted file mode 100755 index 8591069154..0000000000 --- a/buildbot/slave/source/make_source_package.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/sh - -# tarball generation script - -. buildbot/slave/prepare.sh - -# Quit on error. -set -e - -OUTPUTDIR=${TMP_PATH} - -if [ -z "${TMP_PATH}" ] || [ "${TMP_PATH}" == "/" ]; then - echo "Invalid path: ${TMP_PATH}" - exit 1; -fi - -echo Using OUTPUTDIR=${OUTPUTDIR} - -# create output dir -mkdir -p "$OUTPUTDIR/source" - -# Sanity check. -if [ ! -x /usr/bin/git ]; then - echo "Error: Could not find /usr/bin/git" >&2 - exit 1 -fi - -# Find correct working directory. -# (Compatible with SConstruct, which is in trunk root) - -while [ ! -d installer ]; do - if [ "${PWD}" = "/" ]; then - echo "Error: Could not find installer directory." >&2 - echo "Make sure to run this script from a directory below your checkout directory." >&2 - exit 2 - fi - cd .. -done - -SOURCEROOT=$(pwd) - -describe=$(git describe --tags --candidates 999 --match "*.*") - -set +e # turn of quit on error -# Check if current HEAD has a version tag -git describe --tags --candidates 0 --match "*.*" &> /dev/null -onVersionTag=$(if [ $? -eq "0" ]; then echo "true"; else echo "false"; fi) -set -e # turn it on again - -isRelease=${onVersionTag} - -if [ "${BRANCH}" = "master" -a ! ${onVersionTag} ]; then - echo "Error: On branch master but not on a version tag." >&2 - echo "This indicates a tagging, branching or push error." >&2 - exit 3 -fi - -if ${isRelease}; then - echo "Making release-packages" - versionString=${describe} - versionInfo=${describe} -else - echo "Making test-packages" - # Insert the branch name as the patch-set part. - # (double-quotation is required because of the sub-shell) - versionString="${describe}_${BRANCH}" - versionInfo="${describe} ${BRANCH}" -fi - -echo "Using version \"${versionInfo}\" as source" -dir="spring_${versionString}" - -# Each one of these that is set, is built when running this script. -# Linux archives -# * linux (LF) line endings -# * GPL compatible -lzma="spring_${versionString}_src.tar.lzma" -tgz="spring_${versionString}_src.tar.gz" - -echo 'Exporting checkout dir with LF line endings' -git clone -s --recursive ${SOURCEROOT} ${OUTPUTDIR}/${dir} - -cd ${OUTPUTDIR}/${dir} - -# Checkout the release-version -git checkout ${BRANCH} - -# Add the engine version info, as we can not fetch it through git -# when using a source archive -echo "${versionInfo}" > ./VERSION -rm -rf ${dir}/.git \ - ${dir}/.gitignore \ - ${dir}/.gitmodules \ - ${dir}/.mailmap \ - ${dir}/tools/pr-downloader/src/lsl \ - ${dir}/tools/pr-downloader/src/lib/cimg - -cd .. -# XXX use git-archive instead? (submodules may cause a bit trouble with it) -# https://github.com/meitar/git-archive-all.sh/wiki - -echo "Creating .tar.lzma archive (${lzma})" -tar -c --lzma -v -f "${OUTPUTDIR}/source/${lzma}" ${dir} --exclude=.git - -echo "Creating .tar.gz archive (${tgz})" -tar -c --gzip -f "${OUTPUTDIR}/source/${tgz}" ${dir} --exclude=.git - -echo "Cleaning up ${OUTPUTDIR}/${dir}" -rm -rf "${OUTPUTDIR}/${dir}" - diff --git a/buildbot/slave/update-mingwlibs.py b/buildbot/slave/update-mingwlibs.py deleted file mode 100755 index 47b320307e..0000000000 --- a/buildbot/slave/update-mingwlibs.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python - -import os, subprocess, shutil -import prepare - -MINGWLIBS_PATH="vclibs" -if "MINGWLIBS_PATH" in os.environ: - MINGWLIBS_PATH = os.environ["MINGWLIBS_PATH"] -print('MINGWLIBS_PATH=%s' %(MINGWLIBS_PATH)) - -assert(len(MINGWLIBS_PATH) > 0) - -if not os.path.isdir(MINGWLIBS_PATH): - print("cloning mingwlibs git-repo...") - subprocess.call(["git", "clone", "git://github.com/spring/vclibs14.git", MINGWLIBS_PATH]) -else: - process = subprocess.Popen(["git", "fetch"], cwd=MINGWLIBS_PATH, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = process.communicate() - output = stdout + stderr - print(output) - if len(output) > 0: - print("removing builddir %s (mingwlibs updated)"%(prepare.BUILDDIR)) - shutil.rmtree(prepare.BUILDDIR) - subprocess.call(["git","clean", "-f", "-d"], cwd=MINGWLIBS_PATH) - subprocess.call(["git","reset", "--hard", "origin/master"], cwd=MINGWLIBS_PATH) - diff --git a/buildbot/slave/validation/tests-analyze.sh b/buildbot/slave/validation/tests-analyze.sh deleted file mode 100755 index c14f59a1be..0000000000 --- a/buildbot/slave/validation/tests-analyze.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -# analyzes existing coredumps and uploads all files created by spring to springrts.com/dl/buildbot -set -e -. buildbot/slave/validation/tests-env.sh - - -SPRING=${TESTDIR}/usr/local/bin/spring-headless -SEVENZIP="7z a" - -if ! [ -x $SPRING ]; then - echo Usage: $0 /path/to/spring - exit 1 -fi - -EXITCODE=0 - -for COREFILE in $(find ${TESTDIR}/.config/spring ${TESTDIR}/ -maxdepth 1 -type f -name "core.*") -do - echo Core file found, creating backtrace - GDBCMDS=$(mktemp) - ( - echo file $SPRING - echo core-file $COREFILE - echo info program - echo bt full - echo quit - ) > $GDBCMDS - gdb -batch -x $GDBCMDS - cat $GDBCMDS - # cleanup - rm -f $GDBCMDS - rm -f $COREFILE - EXITCODE=1 -done - -# zip output for upload -mkdir -p ${TMP_PATH}/validation/ -${SEVENZIP} ${TMP_PATH}/validation/$VERSION_$(date +"%Y-%m-%d_%H-%M-%S")-dbg.7z ${TMP_BASE}/tests/.config/spring/ -rm -rf ${TMP_BASE}/tests/.config/spring/ - -exit $EXITCODE diff --git a/buildbot/slave/validation/tests-cleanup.sh b/buildbot/slave/validation/tests-cleanup.sh deleted file mode 100755 index b41626017b..0000000000 --- a/buildbot/slave/validation/tests-cleanup.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# deletes all files created by the validation test -set -e - -. buildbot/slave/prepare.sh - -TESTDIR=${TMP_BASE}/tests - -#cleanup -rm -rf ${TESTDIR} - diff --git a/buildbot/slave/validation/tests-env.sh b/buildbot/slave/validation/tests-env.sh deleted file mode 100755 index d51c29fef1..0000000000 --- a/buildbot/slave/validation/tests-env.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# setups environment vars used in the validation test - -. buildbot/slave/prepare.sh - -TESTDIR=${TMP_BASE}/tests -DOWNLOADDIR=${TMP_BASE}/download -CONTENT_DIR=${TESTDIR}/.config/spring - -if [ ! -d test/validation/ ]; -then - echo "$0 has to be run from the source root dir" - exit 1 -fi - -GAME=$1 -MAP=$2 -AI=$3 -AIVER=$4 - -echo "Env: GAME=$GAME MAP=$MAP AI=$AI AIVER=$AIVER" - diff --git a/buildbot/slave/validation/tests-install.sh b/buildbot/slave/validation/tests-install.sh deleted file mode 100755 index 8124258493..0000000000 --- a/buildbot/slave/validation/tests-install.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -# installs spring into the test dir -set -e -. buildbot/slave/validation/tests-env.sh - -TESTDIR=${TMP_BASE}/tests - - -#install -cd ${BUILDDIR} -# FIXME: workarround for https://springrts.com/mantis/view.php?id=4716 -${MAKE} generateVersionFiles -DESTDIR=${TESTDIR} ${MAKE} pr-downloader_shared install-spring-headless install-pr-downloader demotool lua2php - - diff --git a/buildbot/slave/validation/tests-prepare.sh b/buildbot/slave/validation/tests-prepare.sh deleted file mode 100755 index 10bc059bb4..0000000000 --- a/buildbot/slave/validation/tests-prepare.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -# downloads game/map and creates script.txt - -set -e -. buildbot/slave/validation/tests-env.sh - -mkdir -p "${DOWNLOADDIR}" "${CONTENT_DIR}/LuaUI/Widgets" "${CONTENT_DIR}/LuaUI/Config" "${CONTENT_DIR}/LuaUI/Widgets_BA" - -PRDL="time ${TESTDIR}/usr/local/bin/pr-downloader --filesystem-writepath=$DOWNLOADDIR" -# get the name of the latest versions -GAME1=$($PRDL --download-game "$GAME" |egrep -o '\[Download\] (.*)' |head -n 1 |cut -b 12-) -$PRDL --download-map "$MAP" - -echo "Creating script: test/validation/prepare.sh \"$GAME1\" \"$MAP\" \"$AI\" \"$AIVER\"" -${SOURCEDIR}/test/validation/prepare.sh "$GAME1" "$MAP" "$AI" "$AIVER" 8452 > ${CONTENT_DIR}/script.txt -${SOURCEDIR}/test/validation/prepare-client.sh ValidationClient localhost 8452 >${CONTENT_DIR}/connect.txt - -#install required files into spring dir -cd ${SOURCEDIR} - -#symlink files into into destination dir -for i in games maps pool packages; -do - # delete existing destination dir - rm -rf ${CONTENT_DIR}/$i - ln -sfv ${DOWNLOADDIR}/$i ${CONTENT_DIR}/$i -done - -#copy widget + config -cp -suv ${SOURCEDIR}/test/validation/LuaUI/Widgets/test.lua ${CONTENT_DIR}/LuaUI/Widgets/test.lua -cp -suv ${SOURCEDIR}/test/validation/LuaUI/Widgets/test.lua ${CONTENT_DIR}/LuaUI/Widgets_BA/test.lua -cp -v ${SOURCEDIR}/test/validation/LuaUI/Config/ZK_data.lua ${CONTENT_DIR}/LuaUI/Config/ZK_data.lua -cp -v ${SOURCEDIR}/test/validation/LuaUI/Config/ZK_data.lua ${CONTENT_DIR}/LuaUI/Config/BA.lua - -# adjust springsettings.cfg -( - # set datadir - echo "SpringData = ${TESTDIR}/usr/local/share/games/spring" - # disable bandwith limits (for syncdebug) - echo "LinkIncomingMaxPacketRate = 0" - echo "LinkIncomingMaxWaitingPackets = 0" - echo "LinkIncomingPeakBandwidth = 0" - echo "LinkIncomingSustainedBandwidth = 0" - echo "LinkOutgoingBandwidth = 0" -) > ${CONTENT_DIR}/springsettings.cfg - diff --git a/buildbot/slave/validation/tests-run.sh b/buildbot/slave/validation/tests-run.sh deleted file mode 100755 index c8599351c9..0000000000 --- a/buildbot/slave/validation/tests-run.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# runs the validation test -set -e -. buildbot/slave/validation/tests-env.sh - -# don't abort on error -set +e -#run test -HOME=${TESTDIR} GAME=${GAME} ${SOURCEDIR}/test/validation/run.sh ${TESTDIR}/usr/local/bin/spring-headless script.txt - - diff --git a/buildbot/slave/wiki/mediawiki_upload.sh b/buildbot/slave/wiki/mediawiki_upload.sh deleted file mode 100755 index 3b60072a8b..0000000000 --- a/buildbot/slave/wiki/mediawiki_upload.sh +++ /dev/null @@ -1,183 +0,0 @@ -#!/bin/bash - -######################### -# Config -USERNAME=$1 -USERPASS=$2 -PAGE=$3 -SECTION=$4 -CONTENT=$5 -WIKIAPI="https://springrts.com/mediawiki/api.php" -cookie_jar="wikicj" - -######################### -# Login -echo "Logging into $WIKIAPI as $USERNAME..." - -#Login part 1 -echo "Logging in (1/2)..." -CR=$(curl -s \ - --location \ - --retry 2 \ - --retry-delay 5\ - --cookie $cookie_jar \ - --cookie-jar $cookie_jar \ - --user-agent "Curl Shell Script" \ - --keepalive-time 60 \ - --header "Accept-Language: en-us" \ - --header "Connection: keep-alive" \ - --compressed \ - --data-urlencode "lgname=${USERNAME}" \ - --data-urlencode "lgpassword=${USERPASS}" \ - --request "POST" "${WIKIAPI}?action=login&format=txt") - -CR2=($CR) -if [ "${CR2[9]}" = "[token]" ]; then - TOKEN=${CR2[11]} -else - echo "Login part 1 failed." - echo $CR - exit 1 -fi - -#Login part 2 -echo "Logging in (2/2)..." -CR=$(curl -s \ - --location \ - --cookie $cookie_jar \ - --cookie-jar $cookie_jar \ - --user-agent "Curl Shell Script" \ - --keepalive-time 60 \ - --header "Accept-Language: en-us" \ - --header "Connection: keep-alive" \ - --compressed \ - --data-urlencode "lgname=${USERNAME}" \ - --data-urlencode "lgpassword=${USERPASS}" \ - --data-urlencode "lgtoken=${TOKEN}" \ - --request "POST" "${WIKIAPI}?action=login&format=txt") - -#TODO-Add login part 2 check -echo "Successfully logged in as $USERNAME." - - -######################### -# Fetch Token - -echo "Fetching edit token..." -CR=$(curl -s \ - --location \ - --cookie $cookie_jar \ - --cookie-jar $cookie_jar \ - --user-agent "Curl Shell Script" \ - --keepalive-time 60 \ - --header "Accept-Language: en-us" \ - --header "Connection: keep-alive" \ - --compressed \ - --form "prop=info" \ - --form "intoken=edit" \ - --form "titles=$PAGE" \ - --request "POST" "${WIKIAPI}?action=query&format=txt") - -getvalue() { - STR=${1:-""} - KEY=${2:-""} - - if [[ ! `echo "$STR" | grep "$KEY"` ]]; then - echo ${3:-""} - return - fi - - STR=${STR##*${KEY}} - STR=${STR%% *}; - - echo ${STR:-${4:-""}} -} - -CR2=($CR) -EDITTOKEN=`getvalue "$CR" "\[edittoken\] => " "parse error"` -if [ ${#EDITTOKEN} = 34 ]; then - echo "Edit token is: $EDITTOKEN" -else - echo "Edit token not set." - echo $CR - exit 1 -fi - -######################### -# Translate section name to number - -if [ "$SECTION" != "" ]; then - CR=$(curl -s \ - --location \ - --cookie $cookie_jar \ - --cookie-jar $cookie_jar \ - --user-agent "Curl Shell Script" \ - --keepalive-time 60 \ - --header "Accept-Language: en-us" \ - --header "Connection: keep-alive" \ - --header "Expect:" \ - --form "page=$PAGE" \ - --form "prop=sections" \ - --request "POST" "${WIKIAPI}?action=parse&format=json&") - - PYCODE="import json, sys -d=json.load(sys.stdin) -s=d['parse']['sections'] -for t in s: - if 'line' in t: - if t['line'] == '$SECTION': - print str(t['index']) - exit - " - - SECTION_NUM=`echo "$CR" | python2 -c "$PYCODE"` - - if [ $? != 0 ] || [ "$SECTION_NUM" == "" ]; then - echo "python-json section parsing failed" - #echo "$CR" - exit 1 - fi - - echo "Section number for \"${SECTION}\" is \"${SECTION_NUM}\"" -fi - -######################### -# Upload - -if [ -f "$CONTENT" ]; then - CR=$(curl -s \ - --location \ - --cookie $cookie_jar \ - --cookie-jar $cookie_jar \ - --user-agent "Curl Shell Script" \ - --keepalive-time 60 \ - --header "Accept-Language: en-us" \ - --header "Connection: keep-alive" \ - --header "Expect:" \ - --form "title=$PAGE" \ - --form "bot=1" \ - --form "text=<$CONTENT" \ - --form "token=${EDITTOKEN}" \ - --request "POST" "${WIKIAPI}?action=edit&format=txt&") - #FIXME --form "section=${SECTION_NUM-0}" \ -else - CR=$(curl -s \ - --location \ - --cookie $cookie_jar \ - --cookie-jar $cookie_jar \ - --user-agent "Curl Shell Script" \ - --keepalive-time 60 \ - --header "Accept-Language: en-us" \ - --header "Connection: keep-alive" \ - --header "Expect:" \ - --form "title=$PAGE" \ - --form "bot=1" \ - --form "text=$CONTENT" \ - --form "section=${SECTION_NUM-0}" \ - --form "token=${EDITTOKEN}" \ - --request "POST" "${WIKIAPI}?action=edit&format=txt&") -fi - -echo $CR - -exit 0 diff --git a/buildbot/slave/wiki/spring_json_to_mediawiki.py b/buildbot/slave/wiki/spring_json_to_mediawiki.py deleted file mode 100755 index 64a047d3b6..0000000000 --- a/buildbot/slave/wiki/spring_json_to_mediawiki.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/python2 - -# parses the output of spring --list-config-vars from stdin and prints mediawiki, i.e.: -# spring-headless --list-config-vars | ./spring_json_to_mediawiki.py - -import json, sys, re -d=json.load(sys.stdin) - -for cfgtag in d.iterkeys(): - anchor = "{{taglink|" + cfgtag + "}}" - rneedle = r"(.*\w*)" + cfgtag + r"(\w*.*)" - rh = re.compile(rneedle) - rreplace = r"\1" + anchor + r"\2" - - for c,t in d.iteritems(): - if c != cfgtag: - if "description" in t: - if t['description'].find(cfgtag) >= 0: - t['description'] = rh.sub(rreplace, t['description']) - -for cfgtag,t in sorted(d.iteritems()): - if cfgtag == 'test': - continue - tmp="|name=" + cfgtag - defval="" - if "defaultValue" in t: - defval=t['defaultValue'] - if t['type'] == "std::string": - tmp += "|type=string" - tmp += "|defvalue=\"" + str(defval) + "\"" - elif t['type'] == "bool": - tmp += "|type=" + t['type'] - tmp += "|defvalue=" + ("true" if (defval > 0) else "false") - else: - tmp += "|type=" + t['type'] - tmp += "|defvalue=" + str(defval) - if "minimumValue" in t: - tmp += "|minvalue=" + str(t['minimumValue']) - if "maximumValue" in t: - tmp += "|maxvalue=" + str(t['maximumValue']) - if "safemodeValue" in t: - if t['type'] == "bool": - tmp += "|safevalue=" + ("true" if (t['safemodeValue'] > 0) else "false") - else: - tmp += "|safevalue=" + str(t['safemodeValue']) - else: - # add empty, so an empty column is shown (w/o this attr the column is hidden) - tmp += "|safevalue=" - desc="" - if "description" in t: - desc = "|description=" + t['description'].encode("utf8") - else: - srcfile = re.sub(r'.*rts/(.*)', r'trunk/rts/\1', t['declarationFile']) - desc = "|description=[" + srcfile.replace("trunk/", "https://github.com/spring/spring/blob/develop/", 1) + "#L" + str(t['declarationLine']) + " source pos]" - print "{{ConfigValue", tmp, desc, "}}" - diff --git a/buildbot/slave/wiki/update_changelog.sh b/buildbot/slave/wiki/update_changelog.sh deleted file mode 100755 index 201b519843..0000000000 --- a/buildbot/slave/wiki/update_changelog.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh - -######################### -# Config -SPRING="spring" -PAGE="Changelog" -SECTIONNAME="" - -if [ ! -f ~/.ssh/spring_wiki_account ]; then - echo "couldn't find ~/.ssh/spring_wiki_account with proper username & password!" - echo "please create with `echo \"$USERNAME:$PASSWORD\" > ~/.ssh/spring_wiki_account`" - exit 1 -fi -USERANDPASS=$(cat ~/.ssh/spring_wiki_account) -USERNAME=$(echo "${USERANDPASS}" | awk '{split($0,a,":"); print a[1]}') -USERPASS=$(echo "${USERANDPASS}" | awk '{split($0,a,":"); print a[2]}') - -#. buildbot/slave/prepare.sh $* -SPRING="${BUILDDIR}/${SPRING}" - -######################### -# Parse & Transform JSON - -TEMPLATE_CONTENT=`cat doc/changelog.txt` - -# skip header (content starts with first -) -TEMPLATE_CONTENT=`echo "$TEMPLATE_CONTENT" | -awk '{ if (content || match($0, /^-.*/)) content=1; if (content==1) print; }'` - -# replace (works for "!" too): -# - foo -# bar -# with -# - foo
bar -TEMPLATE_CONTENT=`echo "$TEMPLATE_CONTENT" | -sed '{:q;N;s/\r\n/\n/g;t q}' | -sed -r 's/^\s+([^-! ].*)/
\1/' | -sed '{:q;N;s/\n//g;t q}' | -sed 's/
/
/g' | -sed 's//\n/g'` - -# find release headers -# "-- 95.0 --...--" -> "=95.0=" -TEMPLATE_CONTENT=`echo "$TEMPLATE_CONTENT" | -awk '{ if (match($0, /^--.*--/)) { gsub(/^-*\s?/, "="); gsub(/\s?-*$/, "="); } print }'` - -# translate `items` to wiki syntax -# " - item" -> "*item" -# " ! item" -> "*item" -# " - itemParent" -> "*itemParent" -# " - itemSub" -> ":*itemSub" -TEMPLATE_CONTENT=`echo "$TEMPLATE_CONTENT" | -awk 'function rep(str, num, remain, result) { - if (num < 2) { - remain = (num == 1) - } else { - remain = (num % 2 == 1) - result = rep(str, (num - remain) / 2) - } - return result result (remain ? str : "") -} -{ j=0; leadingSpaces=$0; gsub(/[^ ].*/,"", leadingSpaces); j=gsub(/^(\s*)[-]/,"*"); j+=gsub(/^(\s*)[!]/,"*"); printf "%s%s%s\n", rep(":", length(leadingSpaces)-1), $0, rep("", j)}'` - -# find section headers -# "Misc:" -> "==Misc==" -TEMPLATE_CONTENT=`echo "$TEMPLATE_CONTENT" | -awk '{ if (match($0, /^[^:=*].*:/)) { gsub(/:/,""); printf "==%s==\n", $0;} else print }'` - - -TEMPLATE_CONTENT="__NOTOC__ -$TEMPLATE_CONTENT[[category:Development]]" - -######################### -# Upload -echo "$TEMPLATE_CONTENT" > /tmp/spring_changelog # the string is too long to pass by argument -$(dirname $0)/mediawiki_upload.sh "$USERNAME" "$USERPASS" "${PAGE}" "${SECTIONNAME}" "/tmp/spring_changelog" -rm /tmp/spring_changelog - -exit $? diff --git a/buildbot/slave/wiki/update_download_page.sh b/buildbot/slave/wiki/update_download_page.sh deleted file mode 100755 index 01e0659983..0000000000 --- a/buildbot/slave/wiki/update_download_page.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -######################### -# Config -PAGE_MAJOR="Template:EngineVersion:Stable:Major" -PAGE_MINOR="Template:EngineVersion:Stable:Minor" -PAGE_PATCH="Template:EngineVersion:Stable:Patchset" -PAGE_RDATE="Template:EngineVersion:Stable:ReleaseDate" - -if [ ! -f ~/.ssh/spring_wiki_account ]; then - echo "couldn't find ~/.ssh/spring_wiki_account with proper username & password!" - echo "please create with `echo \"$USERNAME:$PASSWORD\" > ~/.ssh/spring_wiki_account`" - exit 1 -fi -USERANDPASS=$(cat ~/.ssh/spring_wiki_account) -USERNAME=$(echo "${USERANDPASS}" | awk '{split($0,a,":"); print a[1]}') -USERPASS=$(echo "${USERANDPASS}" | awk '{split($0,a,":"); print a[2]}') - -. buildbot/slave/prepare.sh $* - -if [ x${BRANCH} != xmaster ]; then - echo "Don't update download page. We aren't on master branch." - exit -fi - - -######################### -# Prepare content -MAJOR=$(echo "${REV}" | awk '{split($0,a,"."); print a[1]}') -MINOR=$(echo "${REV}" | awk '{split($0,a,"."); print a[2]}') -PATCH=$(echo "${REV}" | awk '{split($0,a,"."); print a[3]}') -RDATE=`LC_TIME="en_US.UTF-8" date +"%e. %B %Y"` - - -######################### -# Upload -$(dirname $0)/mediawiki_upload.sh "$USERNAME" "$USERPASS" "${PAGE_MAJOR}" "" "$MAJOR" -$(dirname $0)/mediawiki_upload.sh "$USERNAME" "$USERPASS" "${PAGE_MINOR}" "" "$MINOR" -$(dirname $0)/mediawiki_upload.sh "$USERNAME" "$USERPASS" "${PAGE_PATCH}" "" "$PATCH" -$(dirname $0)/mediawiki_upload.sh "$USERNAME" "$USERPASS" "${PAGE_RDATE}" "" "$RDATE" - -exit $? diff --git a/buildbot/slave/wiki/update_manpages.sh b/buildbot/slave/wiki/update_manpages.sh deleted file mode 100755 index 79b7280905..0000000000 --- a/buildbot/slave/wiki/update_manpages.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -set -e -. buildbot/slave/prepare.sh $* - -######################### -# Config - -REMOTE_HOST=springrts.com -REMOTE_USER=buildbot -REMOTE_BASE=/home/buildbot/www -RSYNC="rsync -avz --chmod=D+rx,F+r --bwlimit 4000 --exclude=download/ --exclude=tests/" -REMOTE_RSYNC="nice -19 ionice -c3 rsync" #prevent QQ about rsync killing server - - -######################### -# Upload - -MANPAGES="${BUILDDIR}/manpages/*.html" - -umask 022 - -# Rsync archives to a world-visible location. -if [ ${REMOTE_HOST} = localhost ] && [ -w ${REMOTE_BASE} ]; then - mkdir -p ${REMOTE_BASE}/default/${BRANCH}/${REV}/manpages/ - ${RSYNC} ${MANPAGES} ${REMOTE_BASE}/default/${BRANCH}/${REV}/manpages/ -else - #hack: first create the subdirs - mkdir -p /tmp/default/${BRANCH}/${REV}/manpages/ - ${RSYNC} --rsync-path="${REMOTE_RSYNC}" /tmp/default ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_BASE}/ - rm -r /tmp/default - - # now copy files - ${RSYNC} --rsync-path="${REMOTE_RSYNC}" --recursive ${MANPAGES} ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_BASE}/default/${BRANCH}/${REV}/manpages/ -fi - diff --git a/buildbot/slave/wiki/update_springsettings_page.sh b/buildbot/slave/wiki/update_springsettings_page.sh deleted file mode 100755 index 71dc51e69d..0000000000 --- a/buildbot/slave/wiki/update_springsettings_page.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -######################### -# Config -SPRING="spring-headless" -PAGE="Springsettings.cfg" -SECTIONNAME="Available Options" - -if [ ! -f ~/.ssh/spring_wiki_account ]; then - echo "couldn't find ~/.ssh/spring_wiki_account with proper username & password!" - echo "please create with:" - echo "echo \"\$USERNAME:\$PASSWORD\" > ~/.ssh/spring_wiki_account" - exit 1 -fi -USERANDPASS=$(cat ~/.ssh/spring_wiki_account) -USERNAME=$(echo "${USERANDPASS}" | awk '{split($0,a,":"); print a[1]}') -USERPASS=$(echo "${USERANDPASS}" | awk '{split($0,a,":"); print a[2]}') - -. buildbot/slave/prepare.sh $* -SPRING="${BUILDDIR}/${SPRING}" - -######################### -# Parse & Transform JSON - -#TODO also reparse doc of previous spring and then check for new ones and mark them on the wiki (and maybe removed ones too) -SPRINGCFG_JSON=`$SPRING --list-config` -SPRING_VERSION=`$SPRING --sync-version` - -if [ $? != 0 ]; then - echo "spring failed" - exit 1 -fi - -TEMPLATE_CONTENT=`echo "$SPRINGCFG_JSON" | python2 $(dirname $0)/spring_json_to_mediawiki.py` -TEMPLATE_CONTENT=$(echo -e "=${SECTIONNAME}=\n{{HeaderNotice|(last update: $REV)}}\n
'''THIS SECTION IS AUTOMATICALLY GENERATED! DON'T EDIT IT!'''
\n${TEMPLATE_CONTENT}") - -if [ $? != 0 ]; then - echo "python parsing failed" - exit 1 -fi - -######################### -# Upload -$(dirname $0)/mediawiki_upload.sh "$USERNAME" "$USERPASS" "${PAGE}" "${SECTIONNAME}" "$TEMPLATE_CONTENT" - -exit $? diff --git a/buildbot/slave/wiki/update_weapondefs_page.sh b/buildbot/slave/wiki/update_weapondefs_page.sh deleted file mode 100755 index 342e980189..0000000000 --- a/buildbot/slave/wiki/update_weapondefs_page.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash - -######################### -# Config -SPRING="spring-headless" -PAGE="User:jk/WeaponDefs" -SECTIONNAME="List" - -if [ ! -f ~/.ssh/spring_wiki_account ]; then - echo "couldn't find ~/.ssh/spring_wiki_account with proper username & password!" - echo "please create with `echo \"$USERNAME:$PASSWORD\" > ~/.ssh/spring_wiki_account`" - exit 1 -fi -USERANDPASS=$(cat ~/.ssh/spring_wiki_account) -USERNAME=$(echo "${USERANDPASS}" | awk '{split($0,a,":"); print a[1]}') -USERPASS=$(echo "${USERANDPASS}" | awk '{split($0,a,":"); print a[2]}') - -. buildbot/slave/prepare.sh $* -SPRING="${BUILDDIR}/${SPRING}" - -######################### -# Parse & Transform JSON -SPRINGCFG_JSON=`$SPRING --list-def-tags` - -if [ $? != 0 ]; then - echo "spring failed" - exit 1 -fi - -PYCODE=$(cat <= 0: - t['description'] = rh.sub(rreplace, t['description']) - -for cfgtag,t in sorted(d.iteritems()): - tmp = "|name=" + cfgtag - if "fallbackName" in t: - tmp += "|fallback=" + t['fallbackName'] - defval="" - if "defaultValue" in t: - defval=t['defaultValue'] - if t['type'] == "std::string": - tmp += "|type=string" - tmp += "|defvalue=\"" + str(defval) + "\"" - elif t['type'] == "bool": - tmp += "|type=" + t['type'] - tmp += "|defvalue=" + ("true" if (defval > 0) else "false") - else: - tmp += "|type=" + t['type'] - tmp += "|defvalue=" + str(defval) - if "minimumValue" in t: - tmp += "|minvalue=" + str(t['minimumValue']) - if "maximumValue" in t: - tmp += "|maxvalue=" + str(t['maximumValue']) - desc="" - if "description" in t: - desc = "|description=" + t['description'].encode("utf8") - print "{{ConfigValue", tmp, desc, "}}" - -EOF -) - -TEMPLATE_CONTENT=`echo "$SPRINGCFG_JSON" | python2 -c "$PYCODE"` -TEMPLATE_CONTENT=$(echo -e "=${SECTIONNAME}=\n{{HeaderNotice|(last update: $REV)}}\n
'''THIS SECTION IS AUTOMATICALLY GENERATED! DON'T EDIT IT!'''
\n${TEMPLATE_CONTENT}") - -if [ $? != 0 ]; then - echo "python parsing failed" - exit 1 -fi - -######################### -# Upload -$(dirname $0)/mediawiki_upload.sh "$USERNAME" "$USERPASS" "${PAGE}" "${SECTIONNAME}" "$TEMPLATE_CONTENT" - -exit $? diff --git a/buildbot/slave/win/make_installer.sh b/buildbot/slave/win/make_installer.sh deleted file mode 100755 index cd8bd49664..0000000000 --- a/buildbot/slave/win/make_installer.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash -set -e -. buildbot/slave/prepare.sh - - -DEST=${TMP_BASE}/inst -INSTALLDIR=${DEST} -PLATFORM=$OUTPUTDIR - -echo "Installing into $DEST" - -#Ultra settings, max number of threads taken from commandline. -SEVENZIP="nice -19 ionice -c3 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on -mmt=${2:-on}" -SEVENZIP_NONSOLID="nice -19 ionice -c3 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=off -mmt=${2:-on}" - -if [ -z $MINGWLIBS_PATH ]; then - echo 'MINGWLIBS_PATH is not set' - exit 1 -fi - -#use host from env if set -if [ -z "$MINGW_HOST" ]; then - MINGW_HOST=i586-mingw32msvc- -fi - -cd ${BUILDDIR} -DESTDIR=${DEST} ${MAKE} install - -#strip symbols and archive them -cd ${INSTALLDIR} -EXECUTABLES="$(find -name '*.exe' -printf ' %f') unitsync.dll springserver.dll $(find AI/Skirmish -name SkirmishAI.dll) $(find AI/Interfaces -name AIInterface.dll) $(find -name pr-downloader_shared.dll -printf ' %f')" -DEBUGFILES="" -for tostripfile in ${EXECUTABLES}; do - if [ -f ${tostripfile} ]; then - # dont strip binaries that we processed earlier - if ! ${MINGW_HOST}objdump -h ${tostripfile} | grep -q .gnu_debuglink; then - echo "stripping ${tostripfile}" - debugfile=${tostripfile%.*}.dbg - (${MINGW_HOST}objcopy --only-keep-debug ${tostripfile} ${debugfile} && \ - ${MINGW_HOST}strip --strip-debug --strip-unneeded ${tostripfile} && \ - ${MINGW_HOST}objcopy --add-gnu-debuglink=${debugfile} ${tostripfile}) & - DEBUGFILES="${DEBUGFILES} ${debugfile}" - else - echo "not stripping ${tostripfile}" - fi - fi -done - -# strip UnitTests (don't store their debugsymbols in spring_dbg.7z) -for tostripfile in "${BUILDDIR}"/test/*.exe; do - if [ -f ${tostripfile} ]; then - ${MINGW_HOST}strip --strip-debug --strip-unneeded ${tostripfile} & - fi -done - -# wait for finished stripping -wait - -mkdir -p ${TMP_PATH} - -#absolute path to the minimal portable (engine, unitsync + ais) -MIN_PORTABLE_ARCHIVE=${TMP_PATH}/spring_${VERSION}_${PLATFORM}-minimal-portable.7z -INSTALLER_FILENAME=${TMP_PATH}/spring_${VERSION}_${PLATFORM}.exe -DEBUG_ARCHIVE=${TMP_PATH}/${VERSION}_${PLATFORM}_spring_dbg.7z -UNITTEST_ARCHIVE=${TMP_PATH}/${VERSION}_${PLATFORM}_UnitTests.7z -MIN_PORTABLE_ZIP=${TMP_PATH}/spring_${VERSION}_${PLATFORM}_minimal-portable.zip - -#create portable spring -touch ${INSTALLDIR}/springsettings.cfg -${SEVENZIP} ${MIN_PORTABLE_ARCHIVE} ${INSTALLDIR}/* -xr!*.dbg & - -# compress UnitTests -${SEVENZIP} ${UNITTEST_ARCHIVE} "${BUILDDIR}"/test/*.exe & - -# create archive for translate_stacktrace.py -${SEVENZIP_NONSOLID} ${DEBUG_ARCHIVE} ${DEBUGFILES} & - -# wait for 7zip -wait - -cd ${SOURCEDIR} - -# create symlinks required for building installer -rm -f ${SOURCEDIR}/installer/downloads/spring_testing_minimal-portable.7z -mkdir -p ${SOURCEDIR}/installer/downloads/ -ln -sv ${MIN_PORTABLE_ARCHIVE} ${SOURCEDIR}/installer/downloads/spring_testing_minimal-portable.7z - -# create installer -./installer/make_installer.sh - -# move installer to rsync-directory -mv ./installer/spring*.exe ${INSTALLER_FILENAME} - -./installer/make_portable_archive.sh ${INSTALLER_FILENAME} ${TMP_PATH} - -# create a file which contains the latest version of a branch -echo ${VERSION} > ${TMP_BASE}/${CONFIG}/${BRANCH}/LATEST_${PLATFORM} - diff --git a/buildbot/slave/win/makensis b/buildbot/slave/win/makensis deleted file mode 100755 index 4c09ebb4ab..0000000000 --- a/buildbot/slave/win/makensis +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -export LD_PRELOAD=/usr/local/bin/no-msync.so -exec /usr/bin/makensis "$@" diff --git a/buildbot/slave/win/update-mingwlibs.sh b/buildbot/slave/win/update-mingwlibs.sh deleted file mode 100755 index cf6697fb05..0000000000 --- a/buildbot/slave/win/update-mingwlibs.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -set -e - - -. buildbot/slave/prepare.sh - -if [ -z $MINGWLIBS_PATH ]; then - echo 'MINGWLIBS_PATH not set' - exit 1 -fi - -if [ ! -d $MINGWLIBS_PATH ]; then - echo "clone mingwlibs git-repo" - git clone $MINGWLIBS_REPO_URL $MINGWLIBS_PATH -fi - -cd $MINGWLIBS_PATH - -GITOUTPUT=$(git fetch 2>&1 |cat) -echo $GITOUTPUT -if [ -n "$GITOUTPUT" ]; -then - echo "removing builddir $BUILDDIR (mingwlibs updated)" - rm -rf "$BUILDDIR" - git clean -f -d - git reset --hard origin/master -fi - diff --git a/buildbot/slave/win/win32.cmake b/buildbot/slave/win/win32.cmake deleted file mode 100644 index 4cdc96e994..0000000000 --- a/buildbot/slave/win/win32.cmake +++ /dev/null @@ -1,9 +0,0 @@ -SET(CMAKE_SYSTEM_NAME Windows) - -# which compilers to use for C and C++ -SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc) -SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++) -SET(WINDRES i586-mingw32msvc-windres) - -# here is the target environment located -SET(CMAKE_FIND_ROOT_PATH /usr/lib/gcc/i586-mingw32msvc) diff --git a/buildbot/stacktrace_translator/frontend/index.php b/buildbot/stacktrace_translator/frontend/index.php deleted file mode 100644 index 16894232db..0000000000 --- a/buildbot/stacktrace_translator/frontend/index.php +++ /dev/null @@ -1,181 +0,0 @@ - 0 ) - die("Please wait $diff seconds to rerun this script"); - else - touch($lastrun); -} - -/** - returns true if url is valid http:// url - has to return false if url is local file -*/ -function isValidURL($url){ - return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url); -} -/** - posts to pastebin, returns url -*/ -function pastebin($text, $name=""){ - $name=substr($name,strlen($name)-23); //limit name to 23 chars - $request = http_build_query(array( 'paste_code' => $text, - 'name' => 'spring-stacktrace', - 'title' => $name, - 'private' => 1, - 'text' => $text, - )); - $context = stream_context_create(array('http' => array( - 'method' => "POST", - 'header' => 'Content-type: application/x-www-form-urlencoded', - 'content' => $request))); - $file = file_get_contents("http://paste.springfiles.com/api/create", false, $context); - return $file; -} - -/** - does the translate_stacktrace request on $rpcserver and returns the decoded result -*/ -function xmlrpcrequest($rpcserver, $infolog){ - $request = xmlrpc_encode_request("translate_stacktrace", $infolog); - - #$header[] = "Host: springrts.com"; - $header[] = "Content-type: text/xml"; - - $curl=curl_init(); - curl_setopt( $curl, CURLOPT_URL, $rpcserver); - curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 ); - curl_setopt( $curl, CURLOPT_HTTPHEADER, $header ); - curl_setopt( $curl, CURLOPT_CUSTOMREQUEST, 'POST' ); - curl_setopt( $curl, CURLOPT_FAILONERROR, 1); - curl_setopt( $curl, CURLOPT_POSTFIELDS, $request ); - - $file=curl_exec($curl); - $err=curl_error($curl); - if ($file===false) - die($rpcserver.":".$err); - curl_close($curl); - $res=xmlrpc_decode($file); - return $res; -} - -/** - fetches infolog.txt and normalize it -*/ -function getinfolog(){ - global $_REQUEST; - if(array_key_exists('url',$_REQUEST)){ - $url=$_REQUEST['url']; - }else - $url=""; - if($url!=""){ //url parameter unset - if (!isValidURL($url)){ - die("Invalid url!"); - } - $infolog=file_get_contents($url,false, NULL, -1, 100000); //retrieve remote infolog.txt - }else{ - if (array_key_exists('request',$_REQUEST)) - $infolog=$_REQUEST['request']; - else - return ""; - } - $infolog=addslashes($infolog); - $infolog=str_replace("\r\n","\n",$infolog); //windows linebreaks f'up some things here... - $infolog=str_replace("\n\n","\n",$infolog); - return stripslashes($infolog); -} - -function parse_template($tpl, $vars){ - $file=file_get_contents($tpl); - while(list($name,$value)=each($vars)){ - $file=str_replace("%".$name."%",$value,$file); - } - return $file; -} -/** - parses the result of an xmlrequest and returns a string ready for html output -*/ -function parse_result($res, $commit, $branch){ - $pastebin=""; - $name=""; - $textwithlinks=""; - if (array_key_exists('faultString',$res)){ - $cleantext= "Error: ".$res['faultString']."
\n"; - $cleantext.= "Maybe this stacktrace is from an self-compiled spring, or is the stack-trace to old?\n"; - $cleantext.= "This script only can handle >=0.82\n"; - }else{ - $textwithlinks="

translated with links to github source ('".$commit." ".$branch."' detected)

\n"; - $textwithlinks.="\n"; - $cleantext= "https://github.com/spring/spring/tree/".$commit."\n\n"; - for($i=0;$i\n"; - $cleantext.= $filename.":".$line."\n"; - - if (!empty($filename) && ($filename[0]=='r')){ - if (!empty($commit)){ - $textwithlinks.=''; - } else { - $textwithlinks.=''; - } - }else { - $textwithlinks.=""; - } - $textwithlinks.= "\n"; - } - $textwithlinks.= "
moduleaddressfileline
" . $address . " " . $filename . "'.$line.''.$line.'$line
\n"; - } - if (($cleantext!="")&&(isset($_REQUEST['pastebin']))){ - $url=pastebin($cleantext,$name); - $pastebin="Pastebin url: $url"; - } - $cleantext = "

translated for copy and paste

\n
$cleantext
"; - - return array( 'PASTEBIN' => $pastebin, - 'RESULTCLEAN' => $cleantext, - 'RESULTHTML' => $textwithlinks ); -} -$res['PASTEBIN']=""; /*initianlize vars for template*/ -$res['RESULTHTML']=""; -$res['RESULTCLEAN']=""; -$res['TEXTAREA']=getinfolog(); -$res['TRANSLATOR']="http://localhost:8000"; -$res['INFO']=""; - -if ($res['TEXTAREA']!=""){ - limit(); - $tmp=xmlrpcrequest($res['TRANSLATOR'],$res['TEXTAREA']); - $res=array_merge($res,parse_result($tmp['stacktrace'], $tmp['rev'], $tmp['branch'])); -} -$res['ACTION']=$_SERVER['SCRIPT_NAME']; -echo parse_template("index.tpl",$res); - -?> diff --git a/buildbot/stacktrace_translator/frontend/index.tpl b/buildbot/stacktrace_translator/frontend/index.tpl deleted file mode 100644 index 7bb7c7738c..0000000000 --- a/buildbot/stacktrace_translator/frontend/index.tpl +++ /dev/null @@ -1,31 +0,0 @@ - - - - Spring RTS - stacktrace translator frontend - - - - -

-This page is a simple frontend for %TRANSLATOR%
-Use a url or copy and paste to this Form to translate the infolog.txt of a crashed spring.
-At max 100.000 Bytes are downloaded!
-Note: only windows-versions can be translated. -

- -

Url of unformatted raw plaintext infolog.txt - -or copy and paste here: -
-
-Post to paste.springfiles.com - -

-
- %INFO% - %PASTEBIN% - %RESULTHTML% - %RESULTCLEAN% - - diff --git a/buildbot/stacktrace_translator/frontend/style.css b/buildbot/stacktrace_translator/frontend/style.css deleted file mode 100644 index ae35cb4c4b..0000000000 --- a/buildbot/stacktrace_translator/frontend/style.css +++ /dev/null @@ -1,7 +0,0 @@ -body, td { - font-family: arial; - font-size:12px; -} -h1 { - font-size: 14px; -} diff --git a/buildbot/stacktrace_translator/stacktrace_translator.py b/buildbot/stacktrace_translator/stacktrace_translator.py deleted file mode 100755 index 0fd1396eeb..0000000000 --- a/buildbot/stacktrace_translator/stacktrace_translator.py +++ /dev/null @@ -1,491 +0,0 @@ -#!/usr/bin/env python -# Author: Tobi Vollebregt -# Thanks to bibim for providing the perl source of his translator. -# requires mingw32-binutils and p7zip to work - -import os, re, sys -import logging -import traceback -from tempfile import NamedTemporaryFile -from subprocess import Popen, PIPE - - -# Paths to required helper programs. -ADDR2LINE = r'/usr/bin/i686-w64-mingw32-addr2line' -SEVENZIP = r'/usr/bin/7za' - -# Everything before the first occurence of this is stripped -# from paths returned by addr2line. -# First one is buildbot, second one is BuildServ. -PATH_STRIP_UNTIL = ['/build/', '}.mingw32.cmake/'] - -# Root of the directory tree with debugging symbols. -# Must contain paths of the form config/branch/rev/... -WWWROOT = os.path.expanduser('~/www') - -# Where to put the log & pid file when running as server. -#LOGFILE = os.path.expanduser('~/log/stacktrace_translator.log') # unused currently -PIDFILE = os.path.expanduser('~/run/stacktrace_translator.pid') - -# Object passed into the XMLRPC server object to listen on. -LISTEN_ADDR = ('127.0.0.1', 8000) - -# path to test file -TESTFILE = os.path.join(WWWROOT, "default/release/93.2.1-56-gdca244e/win32/{release}93.2.1-56-gdca244e_spring_dbg.7z") - -# Match common pre- and suffix on infolog lines. This also allows -# "empty" prefixes followed by any amount of trailing whitespace. -# the a-zA-Z class can be "Warning" or "Error" -RE_PREFIX = r'^(?:\[(?:f=)?\s*-?\d+\]\s*)?(?:[a-zA-Z]+:)\s*' -RE_SUFFIX = r'(?:[\r\n]+$)?' - -# Match stackframe lines, captures the module name and the address. -# Example: '[0] (0) C:\Program Files\Spring\spring.exe [0x0080F268]' -# -> ('C:\\Program Files\\Spring\\spring.exe', '0x0080F268') -# NOTE: does not match format of stackframe lines on Linux -RE_STACKFRAME = RE_PREFIX + r'\(\d+\)\s+(.*(?:\.exe|\.dll))(?:\([^)]*\))?\s+\[(0x[\dA-Fa-f]+)\]' + RE_SUFFIX - -## regex for RC12 versions: first two parts are -## mandatory, last two form one optional group -RE_VERSION_NAME_PREFIX = "(?:[sS]pring)" -RE_VERSION_STRING_RC12 = "([0-9]+\.[0-9]+[\.0-9]*(?:-[0-9]+-g[0-9a-f]+)?)" -RE_VERSION_BRANCH_NAME = "([a-zA-Z0-9\-]+)?" -RE_VERSION_BUILD_FLAGS = "?(?:\s*\((?:[a-zA-Z0-9\-]+\)))?" -RE_VERSION = \ - RE_VERSION_NAME_PREFIX + " ?" + \ - RE_VERSION_STRING_RC12 + " ?" + \ - RE_VERSION_BRANCH_NAME + " ?" + \ - RE_VERSION_BUILD_FLAGS - -# Match complete line containing version string. -# NOTE: -# these are highly sensitive to changes in format -# strings passed to LOG(), perhaps define them in -# a header and parse that? -RE_VERSION_LINES = [ - x % (RE_PREFIX, RE_VERSION, RE_SUFFIX) for x in [ - r'%sStacktrace for %s:%s', - r'%sStacktrace \([a-zA-Z0-9 ]+\) for %s:%s', - - ## legacy version patterns - r'%s%s has crashed\.%s', - r'%s\[Watchdog\] Hang detection triggered for %s\.%s', - r'%sSegmentation fault \(SIGSEGV\) in %s%s', - r'%sAborted \(SIGABRT\) in %s%s', - r'%sError handler invoked for %s\.%s', - ] -] - -# Capture config, branch, rev from `Additional' version string. -#RE_CONFIG = r'(?:\[(?P[^\]]+)\])?' -#RE_BRANCH = r'(?:\{(?P[^\}]+)\})?' -#RE_REV = r'(?P[0-9.]+(?:-[0-9]+-g[0-9A-Fa-f]+)?)' -#RE_VERSION_DETAILS = re.compile(RE_CONFIG + RE_BRANCH + RE_REV + r'\s') - -# Match filename of file with debugging symbols, capture module name. -RE_DEBUG_FILENAME = '.*_spring_dbg.7z$' - - - -def test_version(string): - ''' - >>> test_version('Spring 91.0 (OMP)') - ('91.0', None) - - >>> test_version('spring 93.2.1-82-g863e91e release (Debug OMP)') - ('93.2.1-82-g863e91e', 'release') - ''' - log.debug('test_version():'+string) - return re.search(RE_VERSION, string, re.MULTILINE).groups() - -# Set up application log. -log = logging.getLogger('stacktrace_translator') -log.setLevel(logging.DEBUG) - - -class FatalError(Exception): - '''The only exception that doesn't trigger a dump of a trace server-side.''' - def __init__(self, message): - Exception.__init__(self, message) - - -def fatal(message): - '''A fatal error happened, quit the translation process.''' - log.error(message) # for server - raise FatalError(message) # for client - - -def best_matching_module(needle, haystack): - '''\ - Choose the best matching module, based on longest common suffix. - - This way it ignores the install location of Spring: - - >>> modules = ['spring.exe', 'AI/Skirmish/NullAI/SkirmishAI.dll'] - >>> best_matching_module('c:/Program Files/Spring/spring.exe', modules) - 'spring.exe' - >>> best_matching_module('c:/Spring/NullAI/0.0.1/SkirmishAI.dll', modules) - 'AI/Skirmish/NullAI/SkirmishAI.dll' - - If the correct module isn't available nothing is returned: - - >>> best_matching_module('c:/Program Files/Spring/AI/Skirmish/UnknownAI/0.0.1/SkirmishAI.dll', modules) - ''' - parts = needle.replace('\\', '/').split('/') - if parts[-1] == 'SkirmishAI.dll': - needle = '%s/SkirmishAI.dll' % parts[-3] - else: - needle = parts[-1] - - log.debug('best_matching_module: looking for %s', needle) - for module in haystack: - if module.endswith(needle): - log.debug('best_matching_module: found %s', module) - return module - log.debug('best_matching_module: module not found') - return None - - -def detect_version_details(infolog): - '''\ - Detect config, branch, rev from version string(s) in infolog. - - These should be fine: - - >>> detect_version_details('Segmentation fault (SIGSEGV) in spring 91.0 (OMP)') - ('default', 'master', '91.0') - - >>> detect_version_details('Segmentation fault (SIGSEGV) in spring 93.2.1-82-g863e91e release (Debug OMP)') - ('default', 'release', '93.2.1-82-g863e91e') - - >>> detect_version_details('Spring 93.2.1-56-gdca244e release (OMP) has crashed.') - ('default', 'release', '93.2.1-56-gdca244e') - - This is an old-style (BuildServ) version string, it should be rejected: - - >>> detect_version_details('Spring 0.81.2.1 (0.81.2.1-0-g884a107{@}-cmake-mingw32) has crashed.') - Traceback (most recent call last): - ... - FatalError: Unable to find detailed version in infolog - ''' - version = None - branch = None - for re_version_line in RE_VERSION_LINES: - match = re.search(re_version_line, infolog, re.MULTILINE) - if match: - version = match.group(1) - branch = match.group(2) - break - else: - fatal('Unable to find detailed version in infolog') - if not branch: branch = 'master' - # FIXME: config support (how does a version string with config currently look like?!) - return 'default', branch, version - - -def collect_stackframes(infolog): - '''\ - Collect stackframes from infolog, grouped by module. - (because addr2line has a huge per-module overhead) - - >>> collect_stackframes('(0) C:/spring.exe [0x0080F268]') - ({'C:/spring.exe': [(0, '0x0080F268')]}, 1) - - >>> collect_stackframes('[f=0000000] Error: (7) C:/Spring93.2.1-56/spring.exe [0x0061276A]') - ({'C:/Spring93.2.1-56/spring.exe': [(0, '0x0061276A')]}, 1) - ''' - log.info('Collecting stackframes per module...') - - frames = {} - frame_count = 0 - for module, address in re.findall(RE_STACKFRAME, infolog, re.MULTILINE): - frames.setdefault(module, []).append((frame_count, address)) - frame_count += 1 - - log.debug('frames = %s, frame_count = %d', frames, frame_count) - log.info('\t[OK]') - return frames, frame_count - -def get_modules(dbgfile): - ''' - returns a list of all available files in a 7z archive - >>> get_modules(TESTFILE) - ['AI/Interfaces/C/0.1/AIInterface.dbg', 'AI/Interfaces/Java/0.1/AIInterface.dbg', 'AI/Skirmish/AAI/0.9/SkirmishAI.dbg', 'AI/Skirmish/CppTestAI/0.1/SkirmishAI.dbg', 'AI/Skirmish/E323AI/3.25.0/SkirmishAI.dbg', 'AI/Skirmish/KAIK/0.13/SkirmishAI.dbg', 'AI/Skirmish/NullAI/0.1/SkirmishAI.dbg', 'AI/Skirmish/RAI/0.601/SkirmishAI.dbg', 'AI/Skirmish/Shard/dev/SkirmishAI.dbg', 'spring.dbg', 'springserver.dbg', 'unitsync.dbg'] - ''' - sevenzip = Popen([SEVENZIP, 'l', dbgfile], stdout = PIPE, stderr = PIPE) - stdout, stderr = sevenzip.communicate() - if stderr: - log.debug('%s stderr: %s' % (SEVENZIP, stderr)) - if sevenzip.returncode != 0: - fatal('%s exited with status %s %s %s' % (SEVENZIP, sevenzip.returncode, stdout, stderr)) - - files = [] - for line in stdout.split('\n'): - match = re.match("^.* ([a-zA-Z\/0-9\.]+dbg)$", line) - if match: - files.append(match.group(1)) - return files - - -def collect_modules(config, branch, rev, platform, dbgsymdir = None): - '''\ - Collect modules for which debug data is available. - Return dict which maps (simplified) module name to debug symbol filename. - >>> collect_modules('default', 'release', '93.2.1-56-gdca244e', 'win32') - {'Java/AIInterface.dll': 'AI/Interfaces/Java/0.1/AIInterface.dbg', 'unitsync.dll': 'unitsync.dbg', 'spring.exe': 'spring.dbg', 'CppTestAI': 'AI/Skirmish/CppTestAI/0.1/SkirmishAI.dbg/SkirmishAI.dll', 'E323AI': 'AI/Skirmish/E323AI/3.25.0/SkirmishAI.dbg/SkirmishAI.dll', 'AAI': 'AI/Skirmish/AAI/0.9/SkirmishAI.dbg/SkirmishAI.dll', 'Shard': 'AI/Skirmish/Shard/dev/SkirmishAI.dbg/SkirmishAI.dll', 'RAI': 'AI/Skirmish/RAI/0.601/SkirmishAI.dbg/SkirmishAI.dll', 'C/AIInterface.dll': 'AI/Interfaces/C/0.1/AIInterface.dbg', 'KAIK': 'AI/Skirmish/KAIK/0.13/SkirmishAI.dbg/SkirmishAI.dll', 'NullAI': 'AI/Skirmish/NullAI/0.1/SkirmishAI.dbg/SkirmishAI.dll'} - ''' - log.info('Checking debug data availability...') - - if (dbgsymdir == None): - dbgsymdir = os.path.join(WWWROOT, config, branch, rev, platform) - - log.debug(dbgsymdir) - - if not os.path.isdir(dbgsymdir): - fatal('No debugging symbols available, \"%s\" not a directory' % dbgsymdir) - - dbgfile = None - - for filename in os.listdir(dbgsymdir): - match = re.match(RE_DEBUG_FILENAME, filename) - if match: - dbgfile = os.path.join(dbgsymdir, filename) - - if not dbgfile: - return None, None - - archivefiles = get_modules(dbgfile) - modules = {} - - for module in archivefiles: - if module == 'spring.dbg': - modules["spring.exe"] = module - elif module == 'unitsync.dbg': - modules["unitsync.dll"] = module - elif module.startswith('AI/Interfaces'): - name = module.split('/')[2] + '/AIInterface.dll' - modules[name] = module - elif module.startswith('AI/Skirmish'): - name = module.split('/')[2] - modules[module + '/SkirmishAI.dll'] = module - else: - log.error("no match found: "+module) - log.info('\t[OK]') - return dbgfile, modules - -def translate_module_addresses(module, debugarchive, addresses, debugfile): - '''\ - Translate addresses in a module to (module, address, filename, lineno) tuples - by invoking addr2line exactly once on the debugging symbols for that module. - >>> translate_module_addresses( 'spring.dbg', TESTFILE, ['0x0']) - [('spring.dbg', '0x0', '??', 0)] - ''' - with NamedTemporaryFile() as tempfile: - log.info('\tExtracting debug symbols for module %s from archive %s...' % (module, os.path.basename(debugfile))) - # e = extract without path, -so = write output to stdout, -y = yes to all questions - sevenzip = Popen([SEVENZIP, 'e', '-so', '-y', debugfile, debugarchive], stdout = tempfile, stderr = PIPE) - stdout, stderr = sevenzip.communicate() - if stderr: - log.debug('%s stderr: %s' % (SEVENZIP, stderr)) - if sevenzip.returncode != 0: - fatal('%s exited with status %s' % (SEVENZIP, sevenzip.returncode)) - log.info('\t\t[OK]') - - log.info('\tTranslating addresses for module %s...' % module) - if module.endswith('.dll'): - cmd = [ADDR2LINE, '-j', '.text', '-e', tempfile.name] - else: - cmd = [ADDR2LINE, '-e', tempfile.name] - log.debug('\tCommand line: ' + ' '.join(cmd)) - addr2line = Popen(cmd, stdin = PIPE, stdout = PIPE, stderr = PIPE) - if addr2line.poll() == None: - stdout, stderr = addr2line.communicate('\n'.join(addresses)) - else: - stdout, stderr = addr2line.communicate() - if stderr: - log.debug('%s stderr: %s' % (ADDR2LINE, stderr)) - if addr2line.returncode != 0: - fatal('%s exited with status %s' % (ADDR2LINE, addr2line.returncode)) - log.info('\t\t[OK]') - - def fixup(addr, file, line): - for psu in PATH_STRIP_UNTIL: - if psu in file: - file = file[file.index(psu)+len(psu):] - break - return module, addr, file, line - - return [fixup(addr, *line.split(':')) for addr, line in zip(addresses, stdout.splitlines())] - - -def translate_(module_frames, frame_count, modules, modulearchive): - '''\ - Translate the stacktrace given in (module_frames, frame_count) by repeatedly - invoking addr2line on the debugging data for the modules. - ''' - log.info('Translating stacktrace...') - - module_names = modules.keys() - translated_stacktrace = [None] * frame_count - for module, frames in module_frames.iteritems(): - module_name = best_matching_module(module, module_names) - indices, addrs = zip(*frames) # unzip - if module_name: - translated_frames = translate_module_addresses(module, modules[module_name], addrs, modulearchive) - for index, translated_frame in zip(indices, translated_frames): - translated_stacktrace[index] = translated_frame - else: - log.debug('unknown module: %s', module) - for i in range(len(indices)): - translated_stacktrace[indices[i]] = (module, addrs[i], '??', 0) # unknown - - log.debug('translated_stacktrace = %s', translated_stacktrace) - log.info('\t[OK]') - return translated_stacktrace - - -def translate_stacktrace(infolog, dbgsymdir = None): - r'''\ - Translate a complete stacktrace to (module, address, filename, lineno) tuples. - - The input string may be a complete infolog (i.e. infolog.txt). At the very - least it must contain the 'Spring XXX has crashed.' or 'Hang detection - triggered for Spring XXX.' line and at least one stack frame. - - The output is a list of (module, address, filename, lineno) tuples, - or (module, address, '??', 0) for each frame that could not be translated. - - Example of a remote call to the service in Python: - (Note that tuples have become lists) - - >>> from xmlrpclib import ServerProxy #doctest:+SKIP - ... proxy = ServerProxy('http://springrts.com:8000/') - ... proxy.translate_stacktrace(file('infolog.txt').read()) - [['C:\\Program Files\\Spring\\spring.exe', '0x0080F6F8', 'rts/Rendering/Env/GrassDrawer.cpp', 229], - ['C:\\Program Files\\Spring\\spring.exe', '0x008125DF', 'rts/Rendering/Env/GrassDrawer.cpp', 136], - ['C:\\Program Files\\Spring\\spring.exe', '0x00837E8C', 'rts/Rendering/Env/AdvTreeDrawer.cpp', 54], - ['C:\\Program Files\\Spring\\spring.exe', '0x0084189E', 'rts/Rendering/Env/BaseTreeDrawer.cpp', 57], - ['C:\\Program Files\\Spring\\spring.exe', '0x00402AA8', 'rts/Game/Game.cpp', 527], - ... - ['C:\\WINDOWS\\system32\\kernel32.dll(RegisterWaitForInputIdle+0x49)', '0x7C7E7077', '??', 0]] - - Example of a local call: - - >>> translate_stacktrace(file('infolog.txt').read()) #doctest:+SKIP - [('C:\\Program Files\\Spring\\spring.exe', '0x0080F6F8', 'rts/Rendering/Env/GrassDrawer.cpp', 229), - ('C:\\Program Files\\Spring\\spring.exe', '0x008125DF', 'rts/Rendering/Env/GrassDrawer.cpp', 136), - ('C:\\Program Files\\Spring\\spring.exe', '0x00837E8C', 'rts/Rendering/Env/AdvTreeDrawer.cpp', 54), - ('C:\\Program Files\\Spring\\spring.exe', '0x0084189E', 'rts/Rendering/Env/BaseTreeDrawer.cpp', 57), - ('C:\\Program Files\\Spring\\spring.exe', '0x00402AA8', 'rts/Game/Game.cpp', 527), - ... - ('C:\\WINDOWS\\system32\\kernel32.dll(RegisterWaitForInputIdle+0x49)', '0x7C7E7077', '??', 0)] - ''' - - log.info('----- Start of translation process -----') - - # TODO: add module checksum dump to spring, add code here to parse those. - - # With checksums, the idea is: - # 1) put module_names and module_checksums in a dict which maps name to checksum - # 2) use best_matching_module to find best matching item from module_names - # 3) get its checksum - # 4) download debugging symbols from ##/#############################, which - # shall be a symlink to the correct 7z file containing debugging symbols. - # 5) perform translation.. - - # Without checksums, the idea is: - # 1) look in config/branch/rev folder - # 2) build a list of modules based on *_dbg.7z files available in this folder - # (there's no guarantee of course that AI's, unitsync, etc. are of the - # same version as Spring.., but we'll have to live with that.) - # 3) download debugging symbols for a module directly from config/branch/rev/... - # 4) perform translation - - try: - config, branch, rev = detect_version_details(infolog) - module_frames, frame_count = collect_stackframes(infolog) - debugarchive, modules = collect_modules(config, branch, rev, 'win32', dbgsymdir) - - if (debugarchive == None): - fatal("No debug-archive(s) found for infolog.txt") - if frame_count == 0: - fatal("No stack-trace found in infolog.txt") - - translated_stacktrace = translate_(module_frames, frame_count, modules, debugarchive) - - except FatalError: - # FatalError is intended to reach the client => re-raise - raise - - except Exception: - # Log the real exception - log.critical(traceback.format_exc()) - # Throw a new exception without leaking too much information - raise FatalError('unhandled exception') - - log.info('----- End of translation process -----') - return { - "config": config, - "branch": branch, - "rev" : rev, - "stacktrace": translated_stacktrace, - } - - -def run_xmlrpc_server(): - '''Run an XMLRPC server that publishes the translate_stacktrace function.''' - from DocXMLRPCServer import DocXMLRPCServer as XMLRPCServer - - logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s') - - with open(PIDFILE, 'w') as pidfile: - pidfile.write('%s' % os.getpid()) - - try: - # Create server - server = XMLRPCServer(LISTEN_ADDR) - server.register_function(translate_stacktrace) - - # Run the server's main loop - try: - server.serve_forever() - except KeyboardInterrupt: - pass - - finally: - os.remove(PIDFILE) - - -def main(argc, argv): - if (argc > 1): - logging.basicConfig(format='%(message)s') - log.setLevel(logging.DEBUG) - - if (argv[1] == '--test'): - import doctest - doctest.testmod(optionflags = doctest.NORMALIZE_WHITESPACE + doctest.ELLIPSIS) - else: - try: - infolog = open(argv[1], 'r') - dbgsymdir = ((argc >= 3) and argv[2]) or None - - ## config, branch, githash = detect_version_details(infolog.read()) - stacktrace = translate_stacktrace(infolog.read(), dbgsymdir) - for address in stacktrace: - print(address) - - except FatalError: - ## redundant - ## print("FatalError:\n%s" % traceback.format_exc()) - return - except IOError: - print("IOError: file \"%s\" not readable" % argv[1]) - return - - else: - run_xmlrpc_server() - - -if (__name__ == '__main__'): - main(len(sys.argv), sys.argv) - diff --git a/buildbot/version_list/list.php b/buildbot/version_list/list.php deleted file mode 100644 index b342989bcc..0000000000 --- a/buildbot/version_list/list.php +++ /dev/null @@ -1,97 +0,0 @@ - exec("PRAGMA journal_mode = TRUNCATE"); -$db -> exec("CREATE TABLE IF NOT EXISTS files (filename STRING PRIMARY KEY, md5 STRING, filectime INT, filesize, INT)"); - -function getMD5($file){ - global $db; - $res = $db->querySingle("SELECT md5, filectime, filesize FROM files WHERE filename='$file'", TRUE); - if ($res==NULL) { - $res = array(); - $res['md5'] = md5_file($file); - $res['filectime'] = filectime($file); - $res['filesize'] = filesize($file); - $query = sprintf("INSERT INTO files (filename, md5, filectime, filesize) VALUES ('%s', '%s', %d, %d)", - $file, $res['md5'], $res['filectime'], $res['filesize']); - $db->exec($query); - } - return $res; -} - -function getFileInfo($os, $regex, $path){ - $ret = array(); - if (preg_match($regex, $path, $res)) { - $config = $res[1]; - $branch = $res[2]; - $version = $res[3]; - if($version=="testing") - return $ret; - $ret['config'] = $config; - $ret['branch'] = $branch; - $ret['version'] = $version; - $fileinfo = getMD5($path); - $ret['filectime'] = $fileinfo['filectime']; - $ret['filesize'] = $fileinfo['filesize']; - $ret['md5'] = $fileinfo['md5']; - $ret['path'] = $path; - $ret['os'] = $os; - } - return $ret; -} - -$res = array(); -$regex_path = "([^\/]+)"; -$regex_prefix = "$regex_path\/$regex_path\/$regex_path"; -$regexes = array( - "windows" => "/$regex_prefix\/win32\/spring_(.*)minimal-portable.7z$/", - "windows64" => "/$regex_prefix\/win64\/spring_(.*)minimal-portable.7z$/", - "macosx" => "/$regex_prefix\/osx64\/[sS]pring_(.*)[_-]MacOSX-.*.zip$/", - "linux" => "/$regex_prefix\/linux32\/spring_(.*)_minimal-portable-linux32-static.7z$/", - "linux64" => "/$regex_prefix\/linux64\/spring_(.*)_minimal-portable-linux64-static.7z$/" - ); -while(count($dirs)>0) { - $cur = array_pop($dirs); - $dh = opendir($cur); - while (false !== ($entry = readdir($dh))) { - if ($entry[0]=='.') - continue; - if ($cur == ".") - $next = $entry; - else - $next = $cur.'/'.$entry; - if (is_dir($next)){ - $dirs[] = $next; - } else { - reset($regexes); - while(list($os, $regex) = each($regexes)) { - $arr = getFileInfo($os, $regex, $next); - if (count($arr)>0) - $res[] = $arr; - } - } - } - closedir($dh); -} - -$db->close(); -echo json_encode($res); -