Beispiel #1
0
    def test_mode_incremental_clobberOnFailure(self):
        self.setupStep(
                git.Git(repourl='http://github.com/buildbot/buildbot.git',
                        mode='incremental', clobberOnFailure=True))

        self.expectCommands(
            ExpectLogged('stat', dict(file='wkdir/.git'))
            + 0,
            ExpectShell(workdir='wkdir',
                        command=['git', 'fetch', '-t',
                                 'http://github.com/buildbot/buildbot.git',
                                 'master'])
            + 0,
            ExpectShell(workdir='wkdir',
                        command=['git', 'reset', '--hard', 'FETCH_HEAD'])
            + 1,
            ExpectLogged('rmdir', dict(dir='wkdir'))
            + 0,
            ExpectShell(workdir='wkdir',
                        command=['git', 'clone',
                                 'http://github.com/buildbot/buildbot.git',
                                 '.'])
            + 0,
            ExpectShell(workdir='wkdir',
                        command=['git', 'rev-parse', 'HEAD'])
            + ExpectShell.log('stdio',
                stdout='f6ad368298bd941e934a41f3babc827b2aa95a1d')
            + 0,
        )
        self.expectOutcome(result=SUCCESS, status_text=["update"])
        return self.runStep()
Beispiel #2
0
 def test_mode_full_fresh_submodule(self):
     self.setupStep(
             git.Git(repourl='http://github.com/buildbot/buildbot.git',
                                 mode='full', method='fresh', submodule=True))
     self.expectCommands(
         ExpectLogged('stat', dict(file='wkdir/.git'))
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'clean', '-f', '-d', '-x'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'fetch', '-t',
                              'http://github.com/buildbot/buildbot.git',
                              'master'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'reset', '--hard', 'FETCH_HEAD'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'submodule', 'update', '--recursive'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'submodule', 'foreach', 'git', 'clean',
                              '-f', '-d', '-x'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'rev-parse', 'HEAD'])
         + ExpectShell.log('stdio',
             stdout='f6ad368298bd941e934a41f3babc827b2aa95a1d')
         + 0,
     )
     self.expectOutcome(result=SUCCESS, status_text=["update"])
     return self.runStep()
Beispiel #3
0
def MakeAndroidRemoteBuilder():
    f = factory.BuildFactory()
    f.addStep(git.Git(**GitArgs("Android-Remote")))

    env = {
        "ANDROID_HOME": "/android-sdk-linux",
    }

    # Change path to properties file here
    sed_cmd = [
        "sed", "-i", "-e",
        "s:key.properties:/config/android-remote-properties.txt:g",
        "app/build.gradle"
    ]

    f.addStep(
        shell.ShellCommand(name="sed",
                           command=sed_cmd,
                           haltOnFailure=True,
                           workdir="source"))
    f.addStep(
        shell.ShellCommand(name="compile",
                           haltOnFailure=True,
                           workdir="source",
                           env=env,
                           command=["./gradlew", "assembleRelease"]))
    f.addStep(
        OutputFinder(
            pattern="app/build/outputs/apk/ClementineRemote-release-*.apk"))
    f.addStep(UploadPackage("android"))
    return f
Beispiel #4
0
def MakeDebBuilder(distro, version, is_64_bit):
    arch = "amd64" if is_64_bit else "i386"

    env = {
        "DEB_BUILD_OPTIONS": "parallel=4",
    }

    cmake_cmd = [
        "cmake",
        "..",
        "-DWITH_DEBIAN=ON",
        "-DDEB_ARCH=" + arch,
        "-DDEB_DIST=" + version,
        "-DFORCE_GIT_REVISION=",
        "-DENABLE_SPOTIFY_BLOB=OFF",
    ]
    make_cmd = ["make", "deb"]

    f = factory.BuildFactory()
    f.addStep(git.Git(**GitArgs("Clementine")))
    f.addStep(
        shell.ShellCommand(name="cmake",
                           command=cmake_cmd,
                           haltOnFailure=True,
                           workdir="source/bin"))
    f.addStep(
        shell.Compile(command=make_cmd,
                      haltOnFailure=True,
                      workdir="source/bin",
                      env=env))
    f.addStep(OutputFinder(pattern="bin/clementine_*.deb"))
    f.addStep(UploadPackage("%s-%s" % (distro, version)))
    return f
Beispiel #5
0
 def test_mode_incremental_given_revision(self):
     self.setupStep(
             git.Git(repourl='http://github.com/buildbot/buildbot.git',
                                 mode='incremental'), dict(
             revision='abcdef01',
             ))
     self.expectCommands(
         ExpectShell(workdir='wkdir',
                     command=['git', '--version'])
         + 0,
         Expect('stat', dict(file='wkdir/.git',
                             logEnviron=True))
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'cat-file', '-e', 'abcdef01'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'reset', '--hard', 'abcdef01'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'rev-parse', 'HEAD'])
         + ExpectShell.log('stdio',
             stdout='f6ad368298bd941e934a41f3babc827b2aa95a1d')
         + 0,
     )
     self.expectOutcome(result=SUCCESS, status_text=["update"])
     return self.runStep()
Beispiel #6
0
 def test_mode_full_clean_parsefail(self):
     self.setupStep(
             git.Git(repourl='http://github.com/buildbot/buildbot.git',
                                 mode='full', method='clean'))
     self.expectCommands(
         ExpectShell(workdir='wkdir',
                     command=['git', '--version'])
         + 0,
         Expect('stat', dict(file='wkdir/.git',
                             logEnviron=True))
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'clean', '-f', '-d'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'fetch', '-t',
                              'http://github.com/buildbot/buildbot.git',
                              'HEAD'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'reset', '--hard', 'FETCH_HEAD'])
         + ExpectShell.log('stdio',
             stderr="fatal: Could not parse object " 
                 "'b08076bc71c7813038f2cefedff9c5b678d225a8'.\n")
         + 128,
     )
     self.expectOutcome(result=FAILURE, status_text=["updating"])
     return self.runStep()
Beispiel #7
0
 def test_mode_full_clobber_given_revision(self):
     self.setupStep(
             git.Git(repourl='http://github.com/buildbot/buildbot.git',
                     mode='full', method='clobber', progress=True), dict(
             revision='abcdef01',
             ))
     self.expectCommands(
         ExpectShell(workdir='wkdir',
                     command=['git', '--version'])
         + 0,
         Expect('rmdir', dict(dir='wkdir',
                              logEnviron=True))
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'clone',
                              '--branch', 'HEAD',
                              'http://github.com/buildbot/buildbot.git',
                              '.', '--progress'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'reset', '--hard', 'abcdef01'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'rev-parse', 'HEAD'])
         + ExpectShell.log('stdio',
             stdout='f6ad368298bd941e934a41f3babc827b2aa95a1d')
         + 0,
     )
     self.expectOutcome(result=SUCCESS, status_text=["update"])
     return self.runStep()
Beispiel #8
0
    def test_mode_full_copy(self):
        self.setupStep(
                git.Git(repourl='http://github.com/buildbot/buildbot.git',
                        mode='full', method='copy', shallow=True))

        self.expectCommands(
            ExpectShell(workdir='wkdir',
                        command=['git', '--version'])
            + 0,
            Expect('rmdir', dict(dir='wkdir',
                                 logEnviron=True)),
            Expect('stat', dict(file='source/.git',
                                logEnviron=True))
            + 0,
            ExpectShell(workdir='source',
                        command=['git', 'fetch', '-t',
                                 'http://github.com/buildbot/buildbot.git',
                                 'HEAD'])
            + 0,
            ExpectShell(workdir='source',
                        command=['git', 'reset', '--hard', 'FETCH_HEAD'])
            + 0,
            Expect('cpdir', {'fromdir': 'source', 'todir': 'build',
                             'logEnviron': True})
            + 0,
            ExpectShell(workdir='build',
                        command=['git', 'rev-parse', 'HEAD'])
            + ExpectShell.log('stdio',
                stdout='f6ad368298bd941e934a41f3babc827b2aa95a1d')
            + 0,
        )
        self.expectOutcome(result=SUCCESS, status_text=["update"])
        return self.runStep()
Beispiel #9
0
    def test_mode_full_fresh_clobberOnFailure(self):
        self.setupStep(
                git.Git(repourl='http://github.com/buildbot/buildbot.git',
                        mode='full', method='fresh', clobberOnFailure=True))

        self.expectCommands(
            ExpectShell(workdir='wkdir',
                        command=['git', '--version'])
            + 0,
            Expect('stat', dict(file='wkdir/.git',
                                logEnviron=True))
            + 1,
            ExpectShell(workdir='wkdir',
                        command=['git', 'clone',
                                 '--branch', 'HEAD',
                                 'http://github.com/buildbot/buildbot.git', '.'])
            + 1,
            Expect('rmdir', dict(dir='wkdir',
                                 logEnviron=True))
            + 0,
            ExpectShell(workdir='wkdir',
                        command=['git', 'clone', 
                                 '--branch', 'HEAD',
                                 'http://github.com/buildbot/buildbot.git',
                                 '.'])
            + 0,
            ExpectShell(workdir='wkdir',
                        command=['git', 'rev-parse', 'HEAD'])
            + ExpectShell.log('stdio',
                stdout='f6ad368298bd941e934a41f3babc827b2aa95a1d')
            + 0,
        )
        self.expectOutcome(result=SUCCESS, status_text=["update"])
        return self.runStep()
Beispiel #10
0
 def test_revparse_failure(self):
     self.setupStep(
             git.Git(repourl='http://github.com/buildbot/buildbot.git',
                     mode='full', method='clobber', progress=True), dict(
             revision='abcdef01',
             ))
     self.expectCommands(
         ExpectShell(workdir='wkdir',
                     command=['git', '--version'])
         + 0,
         Expect('rmdir', dict(dir='wkdir',
                              logEnviron=True))
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'clone',
                              '--branch', 'HEAD',
                              'http://github.com/buildbot/buildbot.git',
                              '.', '--progress'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'reset', '--hard', 'abcdef01'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'rev-parse', 'HEAD'])
         + ExpectShell.log('stdio',
             stdout='f6ada95a1d') # too short
         + 0,
     )
     self.expectOutcome(result=FAILURE, status_text=["updating"])
     return self.runStep()
Beispiel #11
0
def MakeFedoraBuilder(distro, unused_is_64_bit):
    f = factory.BuildFactory()
    f.addStep(git.Git(**GitArgs("Clementine")))
    f.addStep(
        shell.ShellCommand(name="clean",
                           workdir="source/bin",
                           command="find ~/rpmbuild/ -type f -delete"))
    f.addStep(
        shell.ShellCommand(name="cmake",
                           workdir="source/bin",
                           haltOnFailure=True,
                           command=["cmake", ".."]))
    f.addStep(
        shell.ShellCommand(name="maketarball",
                           workdir="source/bin",
                           haltOnFailure=True,
                           command=["../dist/maketarball.sh"]))
    f.addStep(
        shell.ShellCommand(
            name="movetarball",
            workdir="source/bin",
            haltOnFailure=True,
            command="mv clementine-*.tar.xz ~/rpmbuild/SOURCES"))
    f.addStep(
        shell.Compile(name="rpmbuild",
                      workdir="source/bin",
                      haltOnFailure=True,
                      command=["rpmbuild", "-ba", "../dist/clementine.spec"]))
    f.addStep(OutputFinder(pattern="~/rpmbuild/RPMS/*/clementine-*.rpm"))
    f.addStep(UploadPackage("fedora-" + distro))
    return f
Beispiel #12
0
 def test_mode_full_logEnviron(self):
     self.setupStep(
             git.Git(repourl='http://github.com/buildbot/buildbot.git',
                     mode='full', logEnviron=False))
     self.expectCommands(
         ExpectShell(workdir='wkdir',
                     command=['git', '--version'],
                     logEnviron=False)
         + 0,
         Expect('stat', dict(file='wkdir/.git',
                             logEnviron=False))
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'clean', '-f', '-d', '-x'],
                     logEnviron=False)
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'fetch', '-t',
                              'http://github.com/buildbot/buildbot.git',
                              'HEAD'],
                     logEnviron=False)
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'reset', '--hard', 'FETCH_HEAD'],
                     logEnviron=False)
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'rev-parse', 'HEAD'],
                     logEnviron=False)
         + ExpectShell.log('stdio',
             stdout='f6ad368298bd941e934a41f3babc827b2aa95a1d')
         + 0,
     )
     self.expectOutcome(result=SUCCESS, status_text=["update"])
     return self.runStep()
Beispiel #13
0
 def test_mode_full_clean_patch_fail(self):
     self.setupStep(
             git.Git(repourl='http://github.com/buildbot/buildbot.git',
                                 mode='full', method='clean'),
             patch=(1, 'patch'))
     self.expectCommands(
         ExpectShell(workdir='wkdir',
                     command=['git', '--version'])
         + 0,
         Expect('stat', dict(file='wkdir/.git',
                                   logEnviron=True))
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'clean', '-f', '-d'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'fetch', '-t',
                              'http://github.com/buildbot/buildbot.git',
                              'HEAD'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'reset', '--hard', 'FETCH_HEAD'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'apply', '--index', '-p', '1'],
                     initialStdin='patch')
         + 1,
     )
     self.expectOutcome(result=FAILURE, status_text=["updating"])
     return self.runStep()
Beispiel #14
0
    def test_mode_full_clobber_submodule(self):
        self.setupStep(
                git.Git(repourl='http://github.com/buildbot/buildbot.git',
                        mode='full', method='clobber', submodules=True))

        self.expectCommands(
            ExpectShell(workdir='wkdir',
                        command=['git', '--version'])
            + 0,
            ExpectLogged('rmdir', dict(dir='wkdir',
                                       logEnviron=True))
            + 0,
            ExpectShell(workdir='wkdir',
                        command=['git', 'clone',
                                 'http://github.com/buildbot/buildbot.git', '.'])
            + 0,
            ExpectShell(workdir='wkdir',
                        command=['git', 'submodule', 'update',
                                 '--init', '--recursive'])
            + 0,
            ExpectShell(workdir='wkdir',
                        command=['git', 'rev-parse', 'HEAD'])
            + ExpectShell.log('stdio',
                stdout='f6ad368298bd941e934a41f3babc827b2aa95a1d')
            + 0,
        )
        self.expectOutcome(result=SUCCESS, status_text=["update"])
        return self.runStep()
    def test_mode_incremental_retryFetch_branch(self):
        self.setupStep(
            git.Git(repourl='http://github.com/buildbot/buildbot.git',
                    mode='incremental',
                    retryFetch=True,
                    branch='test-branch'))

        self.expectCommands(
            ExpectShell(workdir='wkdir', command=['git', '--version']) + 0,
            Expect('stat', dict(file='wkdir/.git', logEnviron=True)) + 0,
            ExpectShell(
                workdir='wkdir',
                command=[
                    'git', 'fetch', '-t',
                    'http://github.com/buildbot/buildbot.git', 'test-branch'
                ]) + 0,
            ExpectShell(workdir='wkdir',
                        command=['git', 'reset', '--hard', 'FETCH_HEAD']) + 1,
            ExpectShell(
                workdir='wkdir',
                command=[
                    'git', 'fetch', '-t',
                    'http://github.com/buildbot/buildbot.git', 'test-branch'
                ]) + 0,
            ExpectShell(workdir='wkdir',
                        command=['git', 'reset', '--hard', 'FETCH_HEAD']) + 0,
            ExpectShell(workdir='wkdir',
                        command=['git', 'branch', '-M', 'test-branch']) + 0,
            ExpectShell(workdir='wkdir', command=['git', 'rev-parse', 'HEAD'])
            + ExpectShell.log(
                'stdio', stdout='f6ad368298bd941e934a41f3babc827b2aa95a1d') +
            0,
        )
        self.expectOutcome(result=SUCCESS, status_text=["update"])
        return self.runStep()
Beispiel #16
0
 def clone_benchmarker(self, benchmarker_branch=BENCHMARKER_BRANCH):
     step = git.Git(repourl='https://github.com/xamarin/benchmarker/',
                    workdir='benchmarker',
                    branch=benchmarker_branch,
                    mode='full',
                    method='fresh',
                    codebase='benchmarker',
                    haltOnFailure=True)
     self.addStep(step)
Beispiel #17
0
def MakeDebBuilder(distro, version):

  f = factory.BuildFactory()
  f.addStep(git.Git(**GitArgs("strawberry", "master")))

  f.addStep(
    shell.ShellCommand(
      name="run cmake",
      workdir="source/build",
      command=["cmake", ".."],
      haltOnFailure=True
    )
  )

  f.addStep(
    shell.Compile(
      name="run dpkg-buildpackage",
      workdir="source",
      command=["dpkg-buildpackage", "-b", "-d", "-uc", "-us", "-nc", "-tc"],
      haltOnFailure=True
    )
  )

  f.addStep(
    steps.SetPropertyFromCommand(
      name="get output filename for deb",
      workdir="source",
      command=["sh", "-c", "ls -dt ../strawberry_*.deb | head -n 1"],
      property="output-filepath",
      haltOnFailure=True
    )
  )
  f.addStep(steps.SetProperties(properties=get_base_filename))
  f.addStep(UploadPackage("%s/%s" % (distro, version)))

  f.addStep(
    steps.SetPropertyFromCommand(
      name="get output filename for deb dbgsym",
      workdir="source",
      command=["sh", "-c", "ls -dt ../strawberry-dbgsym_*.*deb | head -n 1"],
      property="output-filepath",
      haltOnFailure=True
    )
  )
  f.addStep(steps.SetProperties(properties=get_base_filename))
  f.addStep(UploadPackage("%s/%s" % (distro, version)))

  f.addStep(
    shell.ShellCommand(
      name="delete file",
      workdir=".",
      command="rm -f *.deb *.ddeb *.buildinfo *.changes",
      haltOnFailure=True
    )
  )

  return f
Beispiel #18
0
def MakePPABuilder(distro, ppa):
    git_args = GitArgs("Clementine")
    git_args["mode"] = "full"

    cmake_cmd = [
        "cmake",
        "..",
        "-DWITH_DEBIAN=ON",
        "-DDEB_DIST=" + distro,
    ]
    clean_cmd = "rm -rvf *.diff.*z *.tar.*z *.dsc *_source.changes source/bin/*"
    buildpackage_cmd = ["dpkg-buildpackage", "-S", "-kF6ABD82E"]
    movetarball_cmd = "mv -v source/dist/*.orig.tar.xz ."
    cleanuptarball_cmd = "rm -rfv source/dist/*.tar.*z source/.git"
    keys_cmd = "gpg --import /config/ppa-keys || true"
    dput_cmd = "dput %s *_source.changes" % ppa

    f = factory.BuildFactory()
    f.addStep(git.Git(**git_args))
    f.addStep(
        shell.ShellCommand(name="cmake",
                           command=cmake_cmd,
                           haltOnFailure=True,
                           workdir="source/bin"))
    f.addStep(
        shell.ShellCommand(name="clean",
                           command=clean_cmd,
                           haltOnFailure=True,
                           workdir="."))
    f.addStep(
        shell.ShellCommand(name="maketarball",
                           command=["./maketarball.sh"],
                           haltOnFailure=True,
                           workdir="source/dist"))
    f.addStep(
        shell.ShellCommand(name="movetarball",
                           command=movetarball_cmd,
                           haltOnFailure=True,
                           workdir="."))
    f.addStep(
        shell.ShellCommand(name="cleanuptarball",
                           command=cleanuptarball_cmd,
                           haltOnFailure=True,
                           workdir="."))
    f.addStep(shell.ShellCommand(name="keys", command=keys_cmd, workdir="."))
    f.addStep(
        shell.ShellCommand(name="buildpackage",
                           command=buildpackage_cmd,
                           haltOnFailure=True,
                           workdir="source"))
    f.addStep(
        shell.ShellCommand(name="dput",
                           command=dput_cmd,
                           haltOnFailure=True,
                           workdir="."))
    return f
Beispiel #19
0
def MakeWebsiteTransifexPotPushBuilder():
    f = factory.BuildFactory()
    f.addStep(git.Git(**GitArgs("Website")))
    _AddTxSetupForRepo(f, "Website")
    f.addStep(
        shell.ShellCommand(name="tx_push",
                           workdir="source",
                           haltOnFailure=True,
                           command=["tx", "push", "-s"]))
    return f
Beispiel #20
0
 def clone_benchmarker(self):
     step = git.Git(
         repourl='https://github.com/xamarin/benchmarker/',
         workdir='benchmarker',
         branch='master',
         mode='incremental',
         # shallow=True,
         codebase='benchmarker',
         haltOnFailure=True)
     self.addStep(step)
Beispiel #21
0
 def clone_mono(self, guard):
     step = git.Git(
         repourl='https://github.com/mono/mono/',
         workdir='mono',
         branch='master',
         mode='incremental',
         # shallow=True,
         codebase='mono',
         doStepIf=guard,
         haltOnFailure=True)
     self.addStep(step)
Beispiel #22
0
def MakeWindowsDepsBuilder():
    f = factory.BuildFactory()
    f.addStep(git.Git(**GitArgs("Dependencies")))
    f.addStep(
        shell.ShellCommand(name="clean",
                           workdir="source/windows",
                           command=["make", "clean"]))
    f.addStep(
        shell.ShellCommand(name="compile",
                           workdir="source/windows",
                           command=["make"]))
    return f
Beispiel #23
0
def MakeMacDepsBuilder():
    f = factory.BuildFactory()
    f.addStep(git.Git(**GitArgs("Dependencies")))
    f.addStep(
        shell.ShellCommand(name="clean",
                           workdir="/src/macosx",
                           command=["make", "clean"]))
    f.addStep(
        shell.ShellCommand(name="compile",
                           workdir="/src/macosx",
                           command=["make"]))
    return f
Beispiel #24
0
def MakeSourceBuilder():

  git_args = GitArgs("strawberry", "master")
  git_args["mode"] = "full"
  git_args["method"] = "fresh"

  f = factory.BuildFactory()
  f.addStep(git.Git(**git_args))

  f.addStep(
    shell.ShellCommand(
      name="run cmake",
      workdir="source/build",
      command=["cmake", ".." ],
      haltOnFailure=True
    )
  )

  f.addStep(
    shell.ShellCommand(
      name="run maketarball",
      workdir="source/dist/scripts",
      command=["./maketarball.sh"],
      haltOnFailure=True
    )
  )

  f.addStep(
    steps.SetPropertyFromCommand(
      name="get output filename",
      workdir="source",
      command=[
        "sh", "-c",
        "ls -dt " + "dist/scripts/strawberry-*.tar.xz" + " | head -n 1"
      ],
      property="output-filepath",
      haltOnFailure=True
    )
  )
  f.addStep(steps.SetProperties(properties=get_base_filename))
  f.addStep(UploadPackage("source"))

  f.addStep(
    shell.ShellCommand(
      name="delete file",
      workdir="source/dist/scripts",
      command="rm -f *.bz2 *.xz",
      haltOnFailure=True
    )
  )

  return f
Beispiel #25
0
def MakeMacBuilder():
    f = factory.BuildFactory()
    f.addStep(git.Git(**GitArgs("Clementine")))
    f.addStep(
        shell.ShellCommand(
            name="cmake",
            workdir="source/bin",
            env={"PKG_CONFIG_PATH": "/target/lib/pkgconfig"},
            command=[
                "cmake",
                "..",
                "-DCMAKE_BUILD_TYPE=Release",
                "-DCMAKE_OSX_ARCHITECTURES=x86_64",
                "-DBOOST_ROOT=/target",
                "-DPROTOBUF_LIBRARY=/target/lib/libprotobuf.dylib",
                "-DPROTOBUF_INCLUDE_DIR=/target/include/",
                "-DPROTOBUF_PROTOC_EXECUTABLE=/target/bin/protoc",
                "-DQT_QMAKE_EXECUTABLE=/target/bin/qmake",
                "-DSPOTIFY=/target/libspotify.framework",
                "-DGLEW_INCLUDE_DIRS=/target/include",
                "-DGLEW_LIBRARIES=/target/lib/libGLEW.dylib",
                "-DLASTFM_INCLUDE_DIRS=/target/include/",
                "-DLASTFM_LIBRARIES=/target/lib/liblastfm.dylib",
                "-DFFTW3_DIR=/target",
                "-DCMAKE_INCLUDE_PATH=/target/include",
                "-DCMAKE_LIBRARY_PATH=/target/lib",
                "-DAPPLE_DEVELOPER_ID='Developer ID Application: John Maguire (CZ8XD8GTGZ)'",
            ],
            haltOnFailure=True,
        ))
    f.addStep(
        shell.Compile(command=["make"],
                      workdir="source/bin",
                      haltOnFailure=True))
    f.addStep(
        shell.ShellCommand(name="install",
                           command=["make", "install"],
                           haltOnFailure=True,
                           workdir="source/bin"))
    f.addStep(
        shell.ShellCommand(name="sign",
                           command=["make", "sign"],
                           haltOnFailure=True,
                           workdir="source/bin"))
    f.addStep(
        shell.ShellCommand(name="dmg",
                           command=["make", "dmg"],
                           haltOnFailure=True,
                           workdir="source/bin"))
    f.addStep(OutputFinder(pattern="bin/clementine-*.dmg"))
    f.addStep(UploadPackage("mac"))
    return f
Beispiel #26
0
def _MakeTransifexPoPullBuilder(repo, po_glob):
    f = factory.BuildFactory()
    f.addStep(git.Git(**GitArgs(repo)))
    _AddTxSetupForRepo(f, repo, pot=False)
    _AddGithubSetup(f)
    f.addStep(
        shell.ShellCommand(name="tx_pull",
                           workdir="source",
                           haltOnFailure=True,
                           command=["tx", "pull", "-a", "--force"]))

    # Dialects must have a '-r' prepended instead of '_'
    if repo == "Android-Remote":
        f.addStep(
            shell.ShellCommand(name="remove_res",
                               workdir="source",
                               haltOnFailure=True,
                               command="rm -rf app/src/main/res/values-??-r*"))
        f.addStep(
            shell.ShellCommand(
                name="rename_res",
                workdir="source",
                haltOnFailure=True,
                command="rename 's/_/-r/g' app/src/main/res/values-*"))

    f.addStep(
        shell.ShellCommand(name="git_add",
                           workdir="source",
                           haltOnFailure=True,
                           command="git add --verbose " + po_glob))
    f.addStep(
        shell.ShellCommand(
            name="git_commit",
            workdir="source",
            haltOnFailure=True,
            command=[
                "git", "commit",
                "--author=Clementine Buildbot <*****@*****.**>",
                "--message=Automatic merge of translations from Transifex "
                "(https://www.transifex.com/projects/p/clementine/resource/clementineplayer)"
            ]))
    f.addStep(
        shell.ShellCommand(name="git_push",
                           workdir="source",
                           haltOnFailure=True,
                           command=[
                               "git", "push",
                               "git@github-%s:clementine-player/%s.git" %
                               (repo, repo), "master", "--verbose"
                           ]))
    return f
Beispiel #27
0
def MakeMXEBuilder():

  f = factory.BuildFactory()
  f.addStep(git.Git(**GitArgs("strawberry-mxe", "master")))

  f.addStep(
    shell.Compile(
      name="compile",
      workdir="source",
      command=["make", "-j", MAKE_JOBS],
      timeout=108000,
      haltOnFailure=True,
    )
  )

  return f
Beispiel #28
0
def MakeMacCrossBuilder():
    f = factory.BuildFactory()
    f.addStep(git.Git(**GitArgs("Clementine")))
    f.addStep(
        shell.ShellCommand(
            name="cmake",
            workdir="source/bin",
            env={
                "PKG_CONFIG_PATH": "/target/lib/pkgconfig",
                "PATH": "/usr/bin:/bin:/target/bin",
            },
            command=[
                "cmake",
                "..",
                "-DCMAKE_TOOLCHAIN_FILE=/src/macosx/Toolchain-Darwin.cmake",
                "-DCMAKE_OSX_ARCHITECTURES=x86_64",
                "-DQT_HEADERS_DIR=/target/include",
                "-DQT_LIBRARY_DIR=/target/lib",
                "-DQT_BINARY_DIR=/target/bin",
                "-DQT_USE_FRAMEWORKS=ON",
                "-DQT_MKSPECS_DIR=/target/mkspecs",
                "-DQT_QMAKE_EXECUTABLE=/target/bin/qmake",
                "-DCMAKE_CFLAGS='-m64 -I/target/include --stdlib=libc++ -Qunused-arguments -isysroot /Developer/SDKs/MacOSX10.10.sdk'",
                "-DCMAKE_CXXFLAGS='-m64 -I/target/include --stdlib=libc++ -Qunused-arguments -isysroot /Developer/SDKs/MacOSX10.10.sdk'",
                "-DCMAKE_EXE_LINKER_FLAGS='-Wl,-syslibroot,/Developer/SDKs/MacOSX10.10.sdk -m64 -L/target/lib -lc++'",
                "-DSPOTIFY=/target/libspotify.framework",
            ],
            haltOnFailure=True,
        ))
    f.addStep(
        shell.Compile(command=["make"],
                      workdir="source/bin",
                      haltOnFailure=True))
    f.addStep(
        shell.ShellCommand(name="install",
                           command=["make", "install"],
                           haltOnFailure=True,
                           workdir="source/bin"))
    f.addStep(
        shell.ShellCommand(name="dmg",
                           command=["make", "dmg"],
                           haltOnFailure=True,
                           workdir="source/bin"))
    f.addStep(OutputFinder(pattern="bin/clementine-*.dmg"))
    f.addStep(UploadPackage("mac"))
    return f
Beispiel #29
0
def MakeTransifexPotPushBuilder():
    f = factory.BuildFactory()
    f.addStep(git.Git(**GitArgs("Clementine")))
    f.addStep(
        shell.ShellCommand(name="cmake",
                           haltOnFailure=True,
                           workdir="source/bin",
                           command=["cmake", ".."]))
    f.addStep(
        shell.Compile(haltOnFailure=True,
                      workdir="source/bin",
                      command=["make", "-j4"]))
    _AddTxSetupForRepo(f, "Clementine")
    f.addStep(
        shell.ShellCommand(name="tx_push",
                           workdir="source",
                           haltOnFailure=True,
                           command=["tx", "push", "-s"]))
    return f
Beispiel #30
0
 def test_mode_full_clean_no_existing_repo(self):
     self.setupStep(
             git.Git(repourl='http://github.com/buildbot/buildbot.git',
                                 mode='full', method='clean'))
     self.expectCommands(
         ExpectLogged('stat', dict(file='wkdir/.git'))
         + 1,
         ExpectShell(workdir='wkdir',
                     command=['git', 'clone',
                              'http://github.com/buildbot/buildbot.git', '.'])
         + 0,
         ExpectShell(workdir='wkdir',
                     command=['git', 'rev-parse', 'HEAD'])
         + ExpectShell.log('stdio',
             stdout='f6ad368298bd941e934a41f3babc827b2aa95a1d')
         + 0,
     )
     self.expectOutcome(result=SUCCESS, status_text=["update"])
     return self.runStep()