Bug 1262729 - Allow to more conveniently build toolchains. r=dustin
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 27 Jan 2016 17:56:16 +0900
changeset 331188 bba8a0264e24d8c5231d12ecfd518a2ede9d255b
parent 331187 993766c094cfa8d3d8b8f34617bdf321d5fc4737
child 331189 e02a840a52f6df6a2a046b11c5a89caa444829be
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1262729
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1262729 - Allow to more conveniently build toolchains. r=dustin Currently, we have in-tree scripts that allow to build our toolchains. We also have a taskcluster script for clang that can be used in with manually created taskcluster tasks. I wrote a similar script for gcc a while ago, for the same usage. This change hooks all these up such that one can do a try push with `-j linux64-clang` or `-j linux64-gcc` and get a toolchain built as a result. It also hooks things up such that changes to the toolchain build scripts trigger those jobs as well, so as to ensure they are not broken by the changes.
testing/taskcluster/scripts/misc/build-gcc-linux.sh
testing/taskcluster/tasks/branches/base_jobs.yml
testing/taskcluster/tasks/builds/linux64_clang.yml
testing/taskcluster/tasks/builds/linux64_gcc.yml
new file mode 100755
--- /dev/null
+++ b/testing/taskcluster/scripts/misc/build-gcc-linux.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+set -e
+
+# This script is for building GCC for Linux.
+
+WORKSPACE=$HOME/workspace
+HOME_DIR=$WORKSPACE/build
+UPLOAD_DIR=$WORKSPACE/artifacts
+
+cd $HOME_DIR/src
+
+build/unix/build-gcc/build-gcc.sh $HOME_DIR
+
+# Put a tarball in the artifacts dir
+mkdir -p $UPLOAD_DIR
+cp $HOME_DIR/gcc.tar.* $UPLOAD_DIR
--- a/testing/taskcluster/tasks/branches/base_jobs.yml
+++ b/testing/taskcluster/tasks/branches/base_jobs.yml
@@ -327,8 +327,22 @@ tasks:
       file_patterns:
         - 'testing/mozharness/**'
   marionette-harness:
     task: tasks/tests/harness_marionette.yml
     root: true
     when:
         file_patterns:
           - 'testing/marionette/harness/**'
+  linux64-gcc:
+    task: tasks/builds/linux64_gcc.yml
+    root: true
+    when:
+        file_patterns:
+          - 'build/unix/build-gcc/**'
+          - 'testing/taskcluster/scripts/misc/build-gcc-linux.sh'
+  linux64-clang:
+    task: tasks/builds/linux64_clang.yml
+    root: true
+    when:
+        file_patterns:
+          - 'build/build-clang/**'
+          - 'testing/taskcluster/scripts/misc/build-clang-linux.sh'
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/linux64_clang.yml
@@ -0,0 +1,51 @@
+$inherits:
+  from: 'tasks/builds/firefox_base.yml'
+  variables:
+    build_name: 'linux64-clang'
+    build_type: 'opt'
+task:
+  metadata:
+    name: '[TC] Clang'
+    description: 'Clang'
+
+  workerType: opt-linux64
+
+  routes:
+    - 'index.buildbot.branches.{{project}}.clang'
+    - 'index.buildbot.revisions.{{head_rev}}.{{project}}.clang'
+
+  scopes:
+    - 'docker-worker:cache:tooltool-cache'
+
+  payload:
+    cache:
+      tooltool-cache: '/home/worker/tooltool-cache'
+
+    env:
+      MOZHARNESS_DISABLE: 'true'
+      TOOLS_DISABLE: 'true'
+      TOOLTOOL_CACHE: '/home/worker/tooltool-cache'
+
+    maxRunTime: 36000
+
+    command: ["/bin/bash", "-c", "cd /home/worker/ && ./bin/checkout-sources.sh && ./workspace/build/src/testing/taskcluster/scripts/misc/build-clang-linux.sh" ]
+
+    artifacts:
+      'public/clang.tar.xz':
+        type: file
+        path: '/home/worker/workspace/artifacts/clang.tar.xz'
+        expires: '{{#from_now}}1 year{{/from_now}}'
+
+  extra:
+    treeherderEnv:
+      - staging
+      - production
+    treeherder:
+      groupSymbol: Cc
+      groupName: Compilers, submitted by taskcluster
+      symbol: Clang
+      machine:
+        platform: linux64
+    locations:
+        build: null
+        tests: null
new file mode 100644
--- /dev/null
+++ b/testing/taskcluster/tasks/builds/linux64_gcc.yml
@@ -0,0 +1,44 @@
+$inherits:
+  from: 'tasks/builds/firefox_base.yml'
+  variables:
+    build_name: 'linux64-gcc'
+    build_type: 'opt'
+task:
+  metadata:
+    name: '[TC] GCC'
+    description: 'GCC'
+
+  workerType: opt-linux64
+
+  routes:
+    - 'index.buildbot.branches.{{project}}.gcc'
+    - 'index.buildbot.revisions.{{head_rev}}.{{project}}.gcc'
+
+  payload:
+    env:
+      MOZHARNESS_DISABLE: 'true'
+      TOOLS_DISABLE: 'true'
+
+    maxRunTime: 36000
+
+    command: ["/bin/bash", "-c", "cd /home/worker/ && ./bin/checkout-sources.sh && ./workspace/build/src/testing/taskcluster/scripts/misc/build-gcc-linux.sh" ]
+
+    artifacts:
+      'public/gcc.tar.xz':
+        type: file
+        path: '/home/worker/workspace/artifacts/gcc.tar.xz'
+        expires: '{{#from_now}}1 year{{/from_now}}'
+
+  extra:
+    treeherderEnv:
+      - staging
+      - production
+    treeherder:
+      groupSymbol: Cc
+      groupName: Compilers, submitted by taskcluster
+      symbol: GCC
+      machine:
+        platform: linux64
+    locations:
+        build: null
+        tests: null