Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/buildbot-config
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6b585f3ce9a9
Choose a base ref
...
head repository: m-labs/buildbot-config
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 62b56f746e14
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Mar 26, 2018

  1. Copy the full SHA
    a58df13 View commit details
  2. Remove outdated info about conda workarounds.

    whitequark committed Mar 26, 2018
    Copy the full SHA
    62b56f7 View commit details
Showing with 32 additions and 43 deletions.
  1. +32 −43 master.cfg
75 changes: 32 additions & 43 deletions master.cfg
Original file line number Diff line number Diff line change
@@ -23,33 +23,13 @@ def merge(dicta, dictb):
result.update(dictb)
return result

lin_properties = { 'dirsep': '/', 'condabindir': 'bin' }
win_properties = { 'dirsep': '\\', 'condabindir': 'Scripts' }

# without max_builds=1, conda build --output breaks horribly.
c['slaves'] = [
BuildSlave('debian-stretch-amd64-1', secrets['slave_password'],
properties=lin_properties, max_builds=1),
BuildSlave('debian-stretch-amd64-2', secrets['slave_password'],
properties=lin_properties, max_builds=1),
# BuildSlave('debian-stretch-amd64-3', secrets['slave_password'],
# properties=lin_properties),
BuildSlave('windows-7-x64-1', secrets['slave_password'],
properties=win_properties, max_builds=1),
BuildSlave('windows-7-x32-1', secrets['slave_password'],
properties=win_properties, max_builds=1),
BuildSlave('ubuntu-trusty-amd64-1', secrets['slave_password'],
properties=lin_properties, max_builds=1),
]

buildslaves = {
# To provision a Linux buildslave:
# * buildslave create-slave [name] localhost [name] [password]
# * install conda in .../miniconda/
# * source .../miniconda/bin/activate root
# * conda install -y conda-build anaconda-client
# * mkdir -p .../miniconda/conda-bld/linux-64
# * conda-index .../miniconda/conda-bld/linux-64
'debian-stretch-amd64':
['debian-stretch-amd64-1', 'debian-stretch-amd64-2'],
'ubuntu-trusty-amd64': ['ubuntu-trusty-amd64-1'],
@@ -59,11 +39,15 @@ buildslaves = {
# * set PATH=.../miniconda/Scripts;%PATH%
# * conda install -y conda-build anaconda-client
# * mkdir .../miniconda/conda-bld/win-64
# * conda-index .../miniconda/conda-bld/win-64
'windows-7-x64': ['windows-7-x64-1'],
'windows-7-x32': ['windows-7-x32-1'],
}

c['slaves'] = []
for name in sum(buildslaves.values(), []):
# without max_builds=1, conda build --output breaks horribly.
c['slaves'].append(BuildSlave(name, secrets['slave_password'], max_builds=1))

# 'slavePortnum' defines the TCP port to listen on for connections from slaves.
# This must match the value configured into the buildslaves (with their
# --master option)
@@ -81,14 +65,14 @@ from buildbot import locks
from buildbot.process.properties import WithProperties
from buildbot.process.factory import BuildFactory
from buildbot.process.buildstep import BuildStep
from buildbot.process.properties import renderer
from buildbot.status.builder import SUCCESS, FAILURE, SKIPPED
from buildbot.status.github import GitHubStatus
from buildbot.steps.source.git import Git
from buildbot.steps.shell import Configure, SetPropertyFromCommand, ShellCommand
from buildbot.steps.master import MasterShellCommand
from buildbot.steps.transfer import DirectoryUpload, StringDownload
from buildbot.steps.trigger import Trigger
from buildbot.process.properties import renderer
from steps import LitTestCommand, XilinxCommand
from steps import SleepStep, FlockStep, FunlockStep

@@ -107,30 +91,35 @@ def nextSlave(builder, slave_builders):
return min(slave_builders, key=busyRatio)

conda_env_name = 'buildbot-%(buildername)s-%(buildnumber)s'

def condaEnv(use_local=False, extra_vars={}):
if use_local:
bin_path = '%(dirsep)s'.join([
'%(builddir)s', '..', 'miniconda', 'envs', conda_env_name, '%(condabindir)s'
])
root_path = '%(dirsep)s'.join([
'%(builddir)s', '..', 'miniconda', 'envs', conda_env_name
])
else:
bin_path = '%(dirsep)s'.join([
'%(builddir)s', '..', 'miniconda', '%(condabindir)s'
])
root_path = '%(dirsep)s'.join([
'%(builddir)s', '..', 'miniconda',
])

path_entries = [
WithProperties(bin_path),
WithProperties(root_path),
'${PATH}'
]
@renderer
def extendPath(props):
if 'windows' in props.getProperty('slavename'):
if use_local:
env_root = '%(builddir)s\\..\\miniconda\\envs\\' + conda_env_name
else:
env_root = '%(builddir)s\\..\\miniconda'

return [
WithProperties(env_root),
WithProperties(env_root + '\\Scripts'),
WithProperties(env_root + '\\Library\\bin'),
'${PATH}'
]
else: # *nix
if use_local:
env_root = '%(builddir)s/../miniconda/envs/' + conda_env_name
else:
env_root = '%(builddir)s/../miniconda'

return [
WithProperties(env_root + '/bin'),
'${PATH}'
]

env = {
'PATH': path_entries,
'PATH': extendPath,
'BUILDNUMBER': WithProperties('%(buildnumber)s'),
# otherwise, conda's stdout and tests' stderr output interleaves badly.
'PYTHONUNBUFFERED': '1'