Bug 1274350 - Switch to GCC 4.8, Add clang-3.8 builds r=me
authorTim Taubert <ttaubert@mozilla.com>
Wed, 25 May 2016 19:28:57 +0200
changeset 12203 d6d4a4d1e7536283d01fd633a18960b3462bb868
parent 12202 11d17d39610a826f76a566dcfdca24f1bd675a6e
child 12204 f253f46bdbc25e4040d0ff28379cdbf13d013da9
push id1254
push userttaubert@mozilla.com
push dateWed, 25 May 2016 17:31:01 +0000
reviewersme
bugs1274350
Bug 1274350 - Switch to GCC 4.8, Add clang-3.8 builds r=me
.taskcluster.yml
automation/taskcluster/docker/setup.sh
automation/taskcluster/graph/graph.yml
--- a/.taskcluster.yml
+++ b/.taskcluster.yml
@@ -59,24 +59,24 @@ tasks:
         # mozilla-taskcluster will append the appropriate assume:repo:<repo>
         # scope here.
 
       routes:
         - "tc-treeherder-stage.nss.{{revision_hash}}"
         - "tc-treeherder.nss.{{revision_hash}}"
 
       payload:
-        image: "ttaubert/nss-ci:0.0.15"
+        image: "ttaubert/nss-ci:0.0.16"
 
         env:
           TC_OWNER: {{owner}}
           TC_SOURCE: {{{source}}}
           TC_REVISION: '{{revision}}'
           TC_REVISION_HASH: '{{revision_hash}}'
-          TC_DOCKER_IMAGE: "ttaubert/nss-ci:0.0.15"
+          TC_DOCKER_IMAGE: "ttaubert/nss-ci:0.0.16"
           TC_PROVISIONER_ID: "aws-provisioner-v1"
           TC_WORKER_TYPE: "hg-worker"
           NSS_HEAD_REPOSITORY: '{{{url}}}'
           NSS_HEAD_REVISION: '{{revision}}'
 
         features:
           taskclusterProxy: true
 
--- a/automation/taskcluster/docker/setup.sh
+++ b/automation/taskcluster/docker/setup.sh
@@ -17,44 +17,47 @@ apt_packages+=('lib32z1-dev')
 apt_packages+=('gcc-multilib')
 apt_packages+=('g++-multilib')
 
 # Install prerequisites.
 apt-get -y update
 export DEBIAN_FRONTEND=noninteractive
 apt-get install -y --no-install-recommends curl apt-utils
 
-# clang-format-3.8
+# clang(-format)-3.8
+apt_packages+=('clang-3.8')
 apt_packages+=('clang-format-3.8')
 curl http://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add -
 echo "deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.8 main" > /etc/apt/sources.list.d/docker.list
 
 # Install the first round of packages.
 apt-get -y update
 apt-get install -y --no-install-recommends ${apt_packages[@]}
 
 # gcc 6
 apt_packages=()
 apt_packages+=('g++-6')
-apt_packages+=('g++-4.6')
+apt_packages+=('g++-4.8')
 apt_packages+=('g++-6-multilib')
-apt_packages+=('g++-4.6-multilib')
+apt_packages+=('g++-4.8-multilib')
 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 60C317803A41BA51845E371A1E9377A2BA9EF27F
 echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main" > /etc/apt/sources.list.d/toolchain.list
 
 # Install the second round of packages.
 apt-get -y update
 apt-get install -y --no-install-recommends ${apt_packages[@]}
 
 # 32-bit builds
 ln -s /usr/include/x86_64-linux-gnu/zconf.h /usr/include
 
 # Compiler options.
-update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 10
-update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 10
+update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-3.8 5
+update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-3.8 5
+update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
+update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 10
 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 20
 update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 20
 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 30
 update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 30
 
 locale-gen en_US.UTF-8
 dpkg-reconfigure locales
 
--- a/automation/taskcluster/graph/graph.yml
+++ b/automation/taskcluster/graph/graph.yml
@@ -9,32 +9,46 @@ templates:
       - "bin/checkout.sh && nss/automation/taskcluster/scripts/build.sh"
     env:
       NSS_ENABLE_TLS_1_3: 1
       GCC_VERSION: gcc-5
       GXX_VERSION: g++-5
     treeherder:
       symbol: B
 
+  builder_no_tests:
+    extends: builder
+    treeherder:
+      groupSymbol: Compilers
+      groupName: Various compilers
+
   builder_gcc4:
-    extends: builder
+    extends: builder_no_tests
     env:
-      GCC_VERSION: gcc-4.6
-      GXX_VERSION: g++-4.6
+      GCC_VERSION: gcc-4.8
+      GXX_VERSION: g++-4.8
     treeherder:
       symbol: gcc4
 
   builder_gcc6:
-    extends: builder
+    extends: builder_no_tests
     env:
       GCC_VERSION: gcc-6
       GXX_VERSION: g++-6
     treeherder:
       symbol: gcc6
 
+  builder_clang:
+    extends: builder_no_tests
+    env:
+      GCC_VERSION: clang-3.8
+      GXX_VERSION: clang++-3.8
+    treeherder:
+      symbol: clang
+
   builder_with_tests:
     extends: builder
     subtasks:
       cert: true
       chains: true
       cipher: true
       crmf: true
       dbtests: true
@@ -57,17 +71,17 @@ templates:
       - "-c"
       - "bin/checkout.sh && nss/automation/taskcluster/scripts/run_tests.sh"
 
   memleak:
     extends: test_runner
     env:
       NSS_TESTS: "memleak"
     treeherder:
-      groupSymbol: ML
+      groupSymbol: MemLeak
       groupName: MemLeak tests
 
   ## Test Definitions #########################################################
 
   cert:
     name: "Cert tests"
     extends: test_runner
     env:
@@ -423,16 +437,61 @@ graph:
       BUILD_OPT: 1
       USE_64: 1
     treeherder:
       build:
         platform: linux64
       collection:
         opt: true
 
+  ## Clang 3.8 ################################################################
+
+  build-32-debug-clang:
+    name: "Linux 32 (debug, clang)"
+    extends: builder_clang
+    treeherder:
+      build:
+        platform: linux32
+      collection:
+        debug: true
+
+  build-32-opt-clang:
+    name: "Linux 32 (opt, clang)"
+    extends: builder_clang
+    env:
+      BUILD_OPT: 1
+    treeherder:
+      build:
+        platform: linux32
+      collection:
+        opt: true
+
+  build-64-debug-clang:
+    name: "Linux 64 (debug, clang)"
+    extends: builder_clang
+    env:
+      USE_64: 1
+    treeherder:
+      build:
+        platform: linux64
+      collection:
+        debug: true
+
+  build-64-opt-clang:
+    name: "Linux 64 (opt, clang)"
+    extends: builder_clang
+    env:
+      BUILD_OPT: 1
+      USE_64: 1
+    treeherder:
+      build:
+        platform: linux64
+      collection:
+        opt: true
+
   ## Tools ####################################################################
 
   clang-format:
     name: "clang-format-3.8"
     command:
       - "/bin/bash"
       - "-c"
       - "bin/checkout.sh && nss/automation/taskcluster/scripts/run_clang_format.sh nss/lib/ssl"