From 084782f23f2ba6728a5f43f5ff70da0b31ec838b Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Fri, 19 Jun 2015 21:07:48 -0600 Subject: [PATCH] Fix buildbot config. This applies a few fixes to the work done in #74. These have been tested now and appear to work well. Also, this adds io-surface-rs to homu, which isn't getting build by Travis currently. --- buildbot-master.sls | 3 +- buildbot-slave.sls | 5 +- buildbot/master/master.cfg | 312 ++++++++++++++++++------------------- homu/cfg.toml | 36 ++++- 4 files changed, 187 insertions(+), 169 deletions(-) diff --git a/buildbot-master.sls b/buildbot-master.sls index c7cdbecc..f0a67509 100644 --- a/buildbot-master.sls +++ b/buildbot-master.sls @@ -1,5 +1,6 @@ buildbot: - pip.installed + pip.installed: + - name: buildbot == 0.8.12 txgithub: pip.installed diff --git a/buildbot-slave.sls b/buildbot-slave.sls index 7dce0e20..34344bbc 100644 --- a/buildbot-slave.sls +++ b/buildbot-slave.sls @@ -5,9 +5,8 @@ {% endif %} buildbot-slave.pip: - pip: - - name: buildbot-slave - - installed + pip.installed: + - name: buildbot-slave == 0.8.12 {{ users_path }}/servo/buildbot/slave: file.recurse: diff --git a/buildbot/master/master.cfg b/buildbot/master/master.cfg index 77951f36..5fb7c09a 100644 --- a/buildbot/master/master.cfg +++ b/buildbot/master/master.cfg @@ -1,6 +1,8 @@ # -*- python -*- # ex: set syntax=python: +from buildbot.plugins import * + from passwords import HTTP_USERNAME, HTTP_PASSWORD, SLAVE_PASSWORD, CHANGE_PASSWORD from passwords import GITHUB_DOC_TOKEN, GITHUB_STATUS_TOKEN, HOMU_BUILDBOT_SECRET @@ -26,26 +28,17 @@ c['caches'] = { ####### BUILDSLAVES -from buildbot.buildslave import BuildSlave - c['slaves'] = [] for s in LINUX_SLAVES + MAC_SLAVES + ANDROID_SLAVES + HEAD_SLAVES: - c['slaves'].append(BuildSlave(s, SLAVE_PASSWORD, max_builds=1)) + c['slaves'].append(buildslave.BuildSlave(s, SLAVE_PASSWORD, max_builds=1)) ####### CHANGESOURCES -from buildbot.changes.pb import PBChangeSource - c['change_source'] = [] -c['change_source'].append(PBChangeSource(passwd=CHANGE_PASSWORD)) +c['change_source'].append(changes.PBChangeSource(passwd=CHANGE_PASSWORD)) ####### SCHEDULERS -from buildbot.schedulers.basic import AnyBranchScheduler, SingleBranchScheduler -from buildbot.schedulers.forcesched import ForceScheduler -from buildbot.schedulers.timed import Nightly -from buildbot.changes.filter import ChangeFilter - def servo_auto_try_filter(c): if c.project == 'servo/servo' and c.who.startswith('bors-servo') and c.branch in ["auto", "try"]: return True @@ -75,58 +68,51 @@ def cargo_android_filter(c): return False c['schedulers'] = [] -c['schedulers'].append(AnyBranchScheduler( +c['schedulers'].append(schedulers.AnyBranchScheduler( name="servo_auto", treeStableTimer=None, builderNames=["linux1", "linux2", "linux3", "mac1", "mac2", "mac3", "android", "gonk"], - change_filter=ChangeFilter(filter_fn=bors_auto_try_filter), + change_filter=util.ChangeFilter(filter_fn=servo_auto_try_filter), )) -c['schedulers'].append(SingleBranchScheduler( +c['schedulers'].append(schedulers.SingleBranchScheduler( name="doc-push", treeStableTimer=None, builderNames=["doc"], - change_filter=ChangeFilter(filter_fn=bors_master_filter), + change_filter=util.ChangeFilter(filter_fn=servo_master_filter), )) -c['schedulers'].append(ForceScheduler( +c['schedulers'].append(schedulers.ForceScheduler( name="force", builderNames=["linux1", "linux2", "linux3", "mac1", "mac2", "mac3", "android", "gonk", "linux1-rel", "linux2-rel", "mac1-rel", "mac2-rel","android-nightly"] )) -c['schedulers'].append(Nightly( +c['schedulers'].append(schedulers.Nightly( name="Nightly", branch="master", builderNames=["android-nightly"], hour=1, minute=0 )) -c['schedulers'].append(SingleBranchScheduler( +c['schedulers'].append(schedulers.SingleBranchScheduler( name="cargo_linux_auto", treeStableTimer=None, - builderNames=["cargo_linux"], - change_filter=ChangeFilter(filter_fn=cargo_linux_filter) -)] -c['schedulers'].append(SingleBranchScheduler( + builderNames=["cargo-linux"], + change_filter=util.ChangeFilter(filter_fn=cargo_linux_filter) +)) +c['schedulers'].append(schedulers.SingleBranchScheduler( name="cargo_mac_auto", treeStableTimer=None, - builderNames=["cargo_mac"], - change_filter=ChangeFilter(filter_fn=cargo_mac_filter) -)] + builderNames=["cargo-mac"], + change_filter=util.ChangeFilter(filter_fn=cargo_mac_filter) +)) # TODO: -# c['schedulers'].append(SingleBranchScheduler( +# c['schedulers'].append(schedulers.SingleBranchScheduler( # name="cargo_android_auto", # treeStableTimer=None, -# builderNames=["cargo_android"], -# change_filter=ChangeFilter(filter_fn=cargo_android_filter) +# builderNames=["cargo-android"], +# change_filter=util.ChangeFilter(filter_fn=cargo_android_filter) # )] ####### BUILDERS -from buildbot.process.factory import BuildFactory -from buildbot.steps.source.git import Git -from buildbot.steps.shell import Compile, ShellCommand -from buildbot.steps.slave import RemoveDirectory -from buildbot.status.builder import SUCCESS -from buildbot.util import Property - common_test_env = { 'RUST_BACKTRACE': '1' } @@ -144,60 +130,60 @@ mac_test_env = dict({ 'SERVO_CACHE_DIR': '/Users/servo/.servo' }, **common_test_env) -linux1_factory = BuildFactory() -linux1_factory.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -linux1_factory.addStep(ShellCommand(command=["./mach", "test-tidy"], env=linux_headless_env)) -linux1_factory.addStep(Compile(command=["./mach", "build", "--dev"], env=linux_headless_env)) -linux1_factory.addStep(ShellCommand(command=["./mach", "test-unit"], env=linux_headless_env)) -linux1_factory.addStep(ShellCommand(command=["./mach", "test-ref", "--kind", "cpu"], - env=linux_headless_env)) - - -linux2_factory = BuildFactory() -linux2_factory.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -linux2_factory.addStep(Compile(command=["./mach", "build", "--dev"], env=linux_headless_env)) -linux2_factory.addStep(ShellCommand(command=["./mach", "test-wpt-failure"], - env=linux_headless_env)) -linux2_factory.addStep(ShellCommand(command=["./mach", "test-wpt", "--processes", "4", - "--log-raw", "wpt_raw.log"], - env=linux_headless_env, - logfiles={"wpt_raw.log": "wpt_raw.log"})) -linux2_factory.addStep(Compile(command=["./mach", "build-cef"], env=linux_headless_env)) - -linux3_factory = BuildFactory() -linux3_factory.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -linux3_factory.addStep(Compile(command=["./mach", "build", "--release"], env=linux_headless_env)) -linux3_factory.addStep(ShellCommand(command=["./mach", "test-css", "--release", "--processes", "4", - "--log-raw", "wpt_raw.log"], - env=linux_headless_env, - logfiles={"wpt_raw.log": "wpt_raw.log"})) +linux1_factory = util.BuildFactory() +linux1_factory.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +linux1_factory.addStep(steps.ShellCommand(command=["./mach", "test-tidy"], env=linux_headless_env)) +linux1_factory.addStep(steps.Compile(command=["./mach", "build", "--dev"], env=linux_headless_env)) +linux1_factory.addStep(steps.ShellCommand(command=["./mach", "test-unit"], env=linux_headless_env)) +linux1_factory.addStep(steps.ShellCommand(command=["./mach", "test-ref", "--kind", "cpu"], + env=linux_headless_env)) + + +linux2_factory = util.BuildFactory() +linux2_factory.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +linux2_factory.addStep(steps.Compile(command=["./mach", "build", "--dev"], env=linux_headless_env)) +linux2_factory.addStep(steps.ShellCommand(command=["./mach", "test-wpt-failure"], + env=linux_headless_env)) +linux2_factory.addStep(steps.ShellCommand(command=["./mach", "test-wpt", "--processes", "4", + "--log-raw", "wpt_raw.log"], + env=linux_headless_env, + logfiles={"wpt_raw.log": "wpt_raw.log"})) +linux2_factory.addStep(steps.Compile(command=["./mach", "build-cef"], env=linux_headless_env)) + +linux3_factory = util.BuildFactory() +linux3_factory.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +linux3_factory.addStep(steps.Compile(command=["./mach", "build", "--release"], env=linux_headless_env)) +linux3_factory.addStep(steps.ShellCommand(command=["./mach", "test-css", "--release", "--processes", "4", + "--log-raw", "wpt_raw.log"], + env=linux_headless_env, + logfiles={"wpt_raw.log": "wpt_raw.log"})) task_limited_test_env = dict({'RUST_TEST_TASKS': '1'}, **mac_test_env) -mac1_factory = BuildFactory() -mac1_factory.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -mac1_factory.addStep(ShellCommand(command=["./mach", "test-tidy"])) -mac1_factory.addStep(Compile(command=["./mach", "build", "--dev"], env=mac_test_env)) -mac1_factory.addStep(ShellCommand(command=["./mach", "test-wpt-failure"], +mac1_factory = util.BuildFactory() +mac1_factory.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +mac1_factory.addStep(steps.ShellCommand(command=["./mach", "test-tidy"])) +mac1_factory.addStep(steps.Compile(command=["./mach", "build", "--dev"], env=mac_test_env)) +mac1_factory.addStep(steps.ShellCommand(command=["./mach", "test-wpt-failure"], env=mac_test_env)) -mac1_factory.addStep(ShellCommand(command=["./mach", "test-wpt", "--processes", "4", +mac1_factory.addStep(steps.ShellCommand(command=["./mach", "test-wpt", "--processes", "4", "--log-raw", "wpt_raw.log"], env=mac_test_env, logfiles={"wpt_raw.log": "wpt_raw.log"})) -mac1_factory.addStep(ShellCommand(command=["./mach", "test-unit"], env=mac_test_env)) +mac1_factory.addStep(steps.ShellCommand(command=["./mach", "test-unit"], env=mac_test_env)) -mac2_factory = BuildFactory() -mac2_factory.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -mac2_factory.addStep(Compile(command=["./mach", "build", "--dev"], env=mac_test_env)) -mac2_factory.addStep(ShellCommand(command=["./mach", "test-ref", "--kind", "cpu"], +mac2_factory = util.BuildFactory() +mac2_factory.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +mac2_factory.addStep(steps.Compile(command=["./mach", "build", "--dev"], env=mac_test_env)) +mac2_factory.addStep(steps.ShellCommand(command=["./mach", "test-ref", "--kind", "cpu"], env=task_limited_test_env)) -mac2_factory.addStep(Compile(command=["./mach", "build-cef"], env=mac_test_env)) +mac2_factory.addStep(steps.Compile(command=["./mach", "build-cef"], env=mac_test_env)) -mac3_factory = BuildFactory() -mac3_factory.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -mac3_factory.addStep(Compile(command=["./mach", "build", "--release"], env=mac_test_env)) -mac3_factory.addStep(ShellCommand(command=["./mach", "test-css", "--release", "--processes", "4", +mac3_factory = util.BuildFactory() +mac3_factory.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +mac3_factory.addStep(steps.Compile(command=["./mach", "build", "--release"], env=mac_test_env)) +mac3_factory.addStep(steps.ShellCommand(command=["./mach", "test-css", "--release", "--processes", "4", "--log-raw", "wpt_raw.log"], env=mac_test_env, logfiles={"wpt_raw.log": "wpt_raw.log"})) @@ -207,14 +193,14 @@ android_compile_env = dict({'ANDROID_SDK': '/home/servo/android-sdk-linux/', 'ANDROID_TOOLCHAIN': '/home/servo/ndk-toolchain/', 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin:/home/servo/android-sdk-linux/platform-tools:/home/servo/ndk-toolchain/bin'}, **linux_test_env) -android_factory = BuildFactory() -android_factory.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -android_factory.addStep(Compile(command=["./mach", "build", "--android", "--dev"], env=android_compile_env)) +android_factory = util.BuildFactory() +android_factory.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +android_factory.addStep(steps.Compile(command=["./mach", "build", "--android", "--dev"], env=android_compile_env)) -android_nightly_factory = BuildFactory() -android_nightly_factory.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -android_nightly_factory.addStep(Compile(command=["./mach", "build", "--android", "--release"], env=android_compile_env)) -android_nightly_factory.addStep(ShellCommand(command=["s3cmd", "put", "/home/servo/buildbot/slave/android-nightly/build/components/servo/target/arm-linux-androideabi/release/servo", "s3://servo-rust/nightly/servo.apk"])) +android_nightly_factory = util.BuildFactory() +android_nightly_factory.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +android_nightly_factory.addStep(steps.Compile(command=["./mach", "build", "--android", "--release"], env=android_compile_env)) +android_nightly_factory.addStep(steps.ShellCommand(command=["s3cmd", "put", "/home/servo/buildbot/slave/android-nightly/build/components/servo/target/arm-linux-androideabi/release/servo", "s3://servo-rust/nightly/servo.apk"])) gonk_compile_env = dict({'ANDROID_SDK': '/home/servo/android-sdk-linux/', 'ANDROID_NDK': '/home/servo/android-ndk-r10c/', @@ -223,64 +209,66 @@ gonk_compile_env = dict({'ANDROID_SDK': '/home/servo/android-sdk-linux/', 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin:/home/servo/B2G/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin'}, **linux_test_env) -gonk_factory = BuildFactory() -gonk_factory.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -gonk_factory.addStep(Compile(command=["./mach", "build-gonk"], env=gonk_compile_env)) +gonk_factory = util.BuildFactory() +gonk_factory.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +gonk_factory.addStep(steps.Compile(command=["./mach", "build-gonk"], env=gonk_compile_env)) -doc_factory = BuildFactory() -doc_factory.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -doc_factory.addStep(ShellCommand(command=["etc/ci/upload_docs.sh"], - env={'TOKEN': GITHUB_DOC_TOKEN, 'CARGO_HOME': '/home/servo/.cargo', - 'SERVO_CACHE_DIR': '/home/servo/.servo'}, - logEnviron=False)) # important not to leak token +doc_factory = util.BuildFactory() +doc_factory.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +doc_factory.addStep(steps.ShellCommand(command=["etc/ci/upload_docs.sh"], + env={'TOKEN': GITHUB_DOC_TOKEN, + 'CARGO_HOME': '/home/servo/.cargo', + 'SERVO_CACHE_DIR': '/home/servo/.servo', + 'SHELL': '/bin/bash'}, + logEnviron=False)) # important not to leak token # Release builds -linux1_factory_rel = BuildFactory() -linux1_factory_rel.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -linux1_factory_rel.addStep(ShellCommand(command=["./mach", "test-tidy"], env=linux_headless_env)) -linux1_factory_rel.addStep(Compile(command=["./mach", "build", "--release"], env=linux_headless_env)) +linux1_factory_rel = util.BuildFactory() +linux1_factory_rel.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +linux1_factory_rel.addStep(steps.ShellCommand(command=["./mach", "test-tidy"], env=linux_headless_env)) +linux1_factory_rel.addStep(steps.Compile(command=["./mach", "build", "--release"], env=linux_headless_env)) # https://github.com/rust-lang/cargo/issues/691 -# linux1_factory_rel.addStep(ShellCommand(command=["./mach", "test-unit"], env=linux_headless_env)) -linux1_factory_rel.addStep(ShellCommand(command=["./mach", "test-content"], env=linux_headless_env)) -linux1_factory_rel.addStep(ShellCommand(command=["./mach", "test-ref", "--kind", "cpu"], +# linux1_factory_rel.addStep(steps.ShellCommand(command=["./mach", "test-unit"], env=linux_headless_env)) +linux1_factory_rel.addStep(steps.ShellCommand(command=["./mach", "test-content"], env=linux_headless_env)) +linux1_factory_rel.addStep(steps.ShellCommand(command=["./mach", "test-ref", "--kind", "cpu"], env=linux_headless_env)) -linux2_factory_rel = BuildFactory() -linux2_factory_rel.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -linux2_factory_rel.addStep(Compile(command=["./mach", "build", "--release"], env=linux_test_env)) -linux2_factory_rel.addStep(ShellCommand(command=["./mach", "test-wpt-failure"], +linux2_factory_rel = util.BuildFactory() +linux2_factory_rel.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +linux2_factory_rel.addStep(steps.Compile(command=["./mach", "build", "--release"], env=linux_test_env)) +linux2_factory_rel.addStep(steps.ShellCommand(command=["./mach", "test-wpt-failure"], env=linux_test_env)) -linux2_factory_rel.addStep(ShellCommand(command=["./mach", "test-wpt", "--release", +linux2_factory_rel.addStep(steps.ShellCommand(command=["./mach", "test-wpt", "--release", "--processes", "4", "--log-raw", "wpt_raw.log"], env=linux_test_env, logfiles={"wpt_raw.log": "wpt_raw.log"})) -linux2_factory_rel.addStep(Compile(command=["./mach", "build-cef", "--release"])) +linux2_factory_rel.addStep(steps.Compile(command=["./mach", "build-cef", "--release"])) -mac1_factory_rel = BuildFactory() -mac1_factory_rel.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -mac1_factory_rel.addStep(ShellCommand(command=["./mach", "test-tidy"])) -mac1_factory_rel.addStep(Compile(command=["./mach", "build", "--release"])) -mac1_factory_rel.addStep(ShellCommand(command=["./mach", "test-wpt-failure"], +mac1_factory_rel = util.BuildFactory() +mac1_factory_rel.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +mac1_factory_rel.addStep(steps.ShellCommand(command=["./mach", "test-tidy"])) +mac1_factory_rel.addStep(steps.Compile(command=["./mach", "build", "--release"])) +mac1_factory_rel.addStep(steps.ShellCommand(command=["./mach", "test-wpt-failure"], env=common_test_env)) -mac1_factory_rel.addStep(ShellCommand(command=["./mach", "test-wpt", "--release", "--processes", "4", "--total-chunks", "2", "--this-chunk", "1", "--log-raw", "wpt_raw.log"], +mac1_factory_rel.addStep(steps.ShellCommand(command=["./mach", "test-wpt", "--release", "--processes", "4", "--total-chunks", "2", "--this-chunk", "1", "--log-raw", "wpt_raw.log"], env=common_test_env, logfiles={"wpt_raw.log": "wpt_raw.log"})) # https://github.com/rust-lang/cargo/issues/691 -# mac1_factory_rel.addStep(ShellCommand(command=["./mach", "test-unit"], env=common_test_env)) -mac1_factory_rel.addStep(Compile(command=["./mach", "build-cef"])) - -mac2_factory_rel = BuildFactory() -mac2_factory_rel.addStep(Git(repourl=SERVO_REPO, mode="full", method="clobber")) -mac2_factory_rel.addStep(Compile(command=["./mach", "build", "--release"])) -mac2_factory_rel.addStep(ShellCommand(command=["./mach", "test-content"], env=common_test_env)) -mac2_factory_rel.addStep(ShellCommand(command=["./mach", "test-ref", "--kind", "cpu"], +# mac1_factory_rel.addStep(steps.ShellCommand(command=["./mach", "test-unit"], env=common_test_env)) +mac1_factory_rel.addStep(steps.Compile(command=["./mach", "build-cef"])) + +mac2_factory_rel = util.BuildFactory() +mac2_factory_rel.addStep(steps.Git(repourl=SERVO_REPO, mode="full", method="clobber")) +mac2_factory_rel.addStep(steps.Compile(command=["./mach", "build", "--release"])) +mac2_factory_rel.addStep(steps.ShellCommand(command=["./mach", "test-content"], env=common_test_env)) +mac2_factory_rel.addStep(steps.ShellCommand(command=["./mach", "test-ref", "--kind", "cpu"], env=task_limited_test_env)) -mac2_factory_rel.addStep(ShellCommand(command=["./mach", "test-wpt", "--processes", "4", "--total-chunks", "2", "--this-chunk", "2", "--log-raw", "wpt_raw.log"], +mac2_factory_rel.addStep(steps.ShellCommand(command=["./mach", "test-wpt", "--processes", "4", "--total-chunks", "2", "--this-chunk", "2", "--log-raw", "wpt_raw.log"], env=common_test_env, logfiles={"wpt_raw.log": "wpt_raw.log"})) @@ -288,65 +276,73 @@ mac2_factory_rel.addStep(ShellCommand(command=["./mach", "test-wpt", "--processe # NOTE: We use this instead of Travis CI for some projects, either for platform reasons or because # Travis CI can't handle them. -cargo_linux_env = {'PATH': ['${HOME}/.rust/bin', '${PATH}'], +cargo_linux_env = {'SHELL': '/bin/bash', + 'PATH': ['${HOME}/.rust/bin', '${PATH}'], 'LD_LIBRARY_PATH': '${HOME}/.rust/lib'} cargo_mac_env = {'PATH': ['${HOME}/.rust/bin', '${PATH}'], - 'DYLIB_LIBRARY_PATH': '${HOME}/.rust/lib'} + 'DYLD_LIBRARY_PATH': '${HOME}/.rust/lib'} -cargo_linux_factory = BuildFactory() -cargo_linux_factory.addStep(Git(repourl=Property('repository'), mode="full", method="clobber")) -cargo_linux_factory.addStep(ShellCommand( +cargo_linux_factory = util.BuildFactory() +cargo_linux_factory.addStep(steps.Git(repourl=util.Property('repository'), mode="full", method="clobber")) +cargo_linux_factory.addStep(steps.ShellCommand( name="download rustup", command=["curl","-sL","https://static.rust-lang.org/rustup.sh","-o","/tmp/rustup.sh"] )) -cargo_linux_factory.addStep(ShellCommand( +cargo_linux_factory.addStep(steps.ShellCommand( name="install rust", - command=["sh", "/tmp/rustup.sh", "--prefix=~/buildbot/rust", "--channel=nightly", "-y", "--disable-sudo", "--save"], + command=["sh", "/tmp/rustup.sh", "--prefix=~/.rust", "--channel=nightly", "-y", "--disable-sudo", "--save"], + env={'SHELL': '/bin/bash'}, want_stderr=False )) -cargo_linux_factory.addStep(ShellCommand( +cargo_linux_factory.addStep(steps.Compile( name="cargo build", + description="cargo building", + descriptionDone="cargo build", command=["cargo","build","--verbose"], env=cargo_linux_env )) -cargo_linux_factory.addStep(ShellCommand( +cargo_linux_factory.addStep(steps.ShellCommand( name="cargo test", + description="cargo testing", + descriptionDone="cargo test", command=["cargo","test","--verbose"], env=cargo_linux_env )) -cargo_linux_factory.addStep(RemoveDirectory( +cargo_linux_factory.addStep(steps.RemoveDirectory( name="cleanup", dir="~/buildbot/rust" )) -cargo_mac_factory = BuildFactory() -cargo_mac_factory.addStep(Git(repourl=Property('repository'), mode="full", method="clobber")) -cargo_mac_factory.addStep(ShellCommand( +cargo_mac_factory = util.BuildFactory() +cargo_mac_factory.addStep(steps.Git(repourl=util.Property('repository'), mode="full", method="clobber")) +cargo_mac_factory.addStep(steps.ShellCommand( name="download rustup", command=["curl","-sL","https://static.rust-lang.org/rustup.sh","-o","/tmp/rustup.sh"] )) -cargo_mac_factory.addStep(ShellCommand( +cargo_mac_factory.addStep(steps.ShellCommand( name="install rust", - command=["sh", "/tmp/rustup.sh", "--prefix=~/buildbot/rust", "--channel=nightly", "-y", "--disable-sudo", "--save"], + command=["sh", "/tmp/rustup.sh", "--prefix=~/.rust", "--channel=nightly", "-y", "--disable-sudo", "--save"], want_stderr=False )) -cargo_mac_factory.addStep(ShellCommand( +cargo_mac_factory.addStep(steps.Compile( name="cargo build", + description="cargo building", + descriptionDone="cargo build", command=["cargo","build","--verbose"], env=cargo_mac_env )) -cargo_mac_factory.addStep(ShellCommand( +cargo_mac_factory.addStep(steps.ShellCommand( name="cargo test", + description="cargo testing", + descriptionDone="cargo test", command=["cargo","test","--verbose"], env=cargo_mac_env )) -cargo_mac_factory.addStep(RemoveDirectory( +cargo_mac_factory.addStep(steps.RemoveDirectory( name="cleanup", dir="~/buildbot/rust" )) -from buildbot.config import BuilderConfig - def branch_priority(builder, requests): for r in requests: if r.source.branch != "try": @@ -354,28 +350,28 @@ def branch_priority(builder, requests): return requests[0] c['builders'] = [] -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="linux1", slavenames=LINUX_SLAVES, factory=linux1_factory, nextBuild=branch_priority, category="auto", )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="linux2", slavenames=LINUX_SLAVES, factory=linux2_factory, nextBuild=branch_priority, category="auto", )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="linux3", slavenames=LINUX_SLAVES, factory=linux3_factory, nextBuild=branch_priority, category="auto", )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="android", slavenames=ANDROID_SLAVES, factory=android_factory, @@ -383,83 +379,83 @@ c['builders'].append(BuilderConfig( category="auto", )) # NOTE: gonk currently shares the android builder. -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="gonk", slavenames=ANDROID_SLAVES, factory=gonk_factory, nextBuild=branch_priority, category="auto", )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="mac1", slavenames=MAC_SLAVES, factory=mac1_factory, nextBuild=branch_priority, category="auto", )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="mac2", slavenames=MAC_SLAVES, factory=mac2_factory, nextBuild=branch_priority, category="auto", )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="mac3", slavenames=MAC_SLAVES, factory=mac3_factory, nextBuild=branch_priority, category="auto", )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="doc", slavenames=HEAD_SLAVES, factory=doc_factory, category="auto", )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="linux1-rel", slavenames=LINUX_SLAVES, factory=linux1_factory_rel, nextBuild=branch_priority, category="release", )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="linux2-rel", slavenames=LINUX_SLAVES, factory=linux2_factory_rel, nextBuild=branch_priority, category="release", )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="mac1-rel", slavenames=MAC_SLAVES, factory=mac1_factory_rel, nextBuild=branch_priority, category="release", )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="mac2-rel", slavenames=MAC_SLAVES, factory=mac2_factory_rel, nextBuild=branch_priority, category="release", )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="android-nightly", slavenames=HEAD_SLAVES, factory=android_nightly_factory, nextBuild=branch_priority, category="auto", )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="cargo-linux", slavenames=LINUX_SLAVES, factory=cargo_linux_factory, nextBuild=branch_priority, category="cargo_auto" )) -c['builders'].append(BuilderConfig( +c['builders'].append(util.BuilderConfig( name="cargo-mac", slavenames=MAC_SLAVES, factory=cargo_mac_factory, diff --git a/homu/cfg.toml b/homu/cfg.toml index 55c6ae8c..33508645 100644 --- a/homu/cfg.toml +++ b/homu/cfg.toml @@ -13,12 +13,13 @@ app_client_secret = "{{ pillar["homu"]["app-client-secret"] }}" [web] port = 54856 -{% set repos = [('servo', 'html5ever'), ('servo', 'euclid'), ('servo', 'rust-layers'), - ('servo', 'saltfs'), ('servo', 'gleam'), ('servo', 'string-cache'), - ('servo', 'rust-selectors'), ('servo', 'rust-azure'), ('servo', 'tendril'), - ('servo', 'futf'), ('servo', 'glutin'), ('servo', 'rust-png'), - ('servo', 'rust-stb-image'), ('servo', 'libfreetype2'), ('servo', 'mozjs'), - ('servo', 'rust-mozjs'), ('servo', 'libfontconfig'), ('servo', 'skia')] %} +{% set travis_repos = [('servo', 'html5ever'), ('servo', 'euclid'), ('servo', 'rust-layers'), + ('servo', 'saltfs'), ('servo', 'gleam'), ('servo', 'string-cache'), + ('servo', 'rust-selectors'), ('servo', 'rust-azure'), ('servo', 'tendril'), + ('servo', 'futf'), ('servo', 'glutin'), ('servo', 'rust-png'), + ('servo', 'rust-stb-image'), ('servo', 'libfreetype2'), + ('servo', 'libfontconfig'), ('servo', 'skia')] %} +{% set buildbot_repos = [('servo', 'mozjs'), ('servo', 'rust-mozjs'), ('servo', 'io-surface-rs')] %} {% set reviewers = ["glennw","jdm","kmcallister","larsbergstrom","Manishearth","metajack","mbrubeck","Ms2ger","pcwalton","SimonSapin","mrobinson","brunoabinader","saneyuki","nox"] %} [repo.servo] @@ -39,7 +40,8 @@ password = "{{ pillar["homu"]["buildbot-http-pass"] }}" # Standard per-repo configs (generated) -{% for repo in repos %} +{% for repo in travis_repos %} + [repo.{{ repo[1] }}] owner = "{{ repo[0] }}" name = "{{ repo[1] }}" @@ -53,6 +55,26 @@ token = "{{ pillar["homu"]["travis-ci-token"] }}" {% endfor %} +{% for repo in buildbot_repos %} + +[repo.{{ repo[1] }}] +owner = "{{ repo[0] }}" +name = "{{ repo[1] }}" +reviewers = {{ reviewers }} + +[repo.{{ repo[1] }}.github] +secret = "{{ pillar["homu"]["gh-webhook-secret"] }}" + +[repo.{{ repo[1] }}.buildbot] +url = "http://build.servo.org" +secret = "{{ pillar["homu"]["buildbot-secret"] }}" +builders = ["cargo-linux", "cargo-mac"] +try_builders = ["cargo-linux", "cargo-mac"] +username = "{{ pillar["homu"]["buildbot-http-user"] }}" +password = "{{ pillar["homu"]["buildbot-http-pass"] }}" + +{% endfor %} + # Specialized per-repo configs [repo.glutin.branch]