diff options
author | Tim Taubert <ttaubert@mozilla.com> | 2016-05-25 19:04:08 +0200 |
---|---|---|
committer | Tim Taubert <ttaubert@mozilla.com> | 2016-05-25 19:04:08 +0200 |
commit | 0019504fca6d3d9fc88d8ef045e4a56f2363f15e (patch) | |
tree | ea73f1678c8bc8ce30206d3a767da9a4be9bc2c8 | |
parent | c7f58a5c227864d296c1bbe000b79b93623ea3b2 (diff) | |
download | nss-hg-0019504fca6d3d9fc88d8ef045e4a56f2363f15e.tar.gz |
Bug 1274350 - Update docker image, add GCC 4 and GCC 6 builds r=me
-rw-r--r-- | .taskcluster.yml | 4 | ||||
-rw-r--r-- | automation/taskcluster/docker/setup.sh | 17 | ||||
-rw-r--r-- | automation/taskcluster/graph/graph.yml | 157 | ||||
-rwxr-xr-x | automation/taskcluster/scripts/build.sh | 7 |
4 files changed, 144 insertions, 41 deletions
diff --git a/.taskcluster.yml b/.taskcluster.yml index 89a4a2b33..fb98f16d9 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -64,14 +64,14 @@ tasks: - "tc-treeherder.nss.{{revision_hash}}" payload: - image: "ttaubert/nss-ci:0.0.14" + image: "ttaubert/nss-ci:0.0.15" env: TC_OWNER: {{owner}} TC_SOURCE: {{{source}}} TC_REVISION: '{{revision}}' TC_REVISION_HASH: '{{revision_hash}}' - TC_DOCKER_IMAGE: "ttaubert/nss-ci:0.0.14" + TC_DOCKER_IMAGE: "ttaubert/nss-ci:0.0.15" TC_PROVISIONER_ID: "aws-provisioner-v1" TC_WORKER_TYPE: "hg-worker" NSS_HEAD_REPOSITORY: '{{{url}}}' diff --git a/automation/taskcluster/docker/setup.sh b/automation/taskcluster/docker/setup.sh index a0f818fe6..f3b413027 100644 --- a/automation/taskcluster/docker/setup.sh +++ b/automation/taskcluster/docker/setup.sh @@ -27,19 +27,34 @@ 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++-6-multilib') +apt_packages+=('g++-4.6-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 all other packages. +# 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/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 diff --git a/automation/taskcluster/graph/graph.yml b/automation/taskcluster/graph/graph.yml index e3be38570..8bfed96bf 100644 --- a/automation/taskcluster/graph/graph.yml +++ b/automation/taskcluster/graph/graph.yml @@ -9,8 +9,29 @@ 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_gcc4: + extends: builder + env: + GCC_VERSION: gcc-4.6 + GXX_VERSION: g++-4.6 + treeherder: + symbol: gcc4 + + builder_gcc6: + extends: builder + env: + GCC_VERSION: gcc-6 + GXX_VERSION: g++-6 + treeherder: + symbol: gcc6 + + builder_with_tests: + extends: builder subtasks: cert: true chains: true @@ -254,10 +275,12 @@ templates: treeherder: symbol: Tools +## Task Graph ################################################################# + graph: build-32-debug: name: "Linux 32 (debug)" - extends: builder + extends: builder_with_tests treeherder: build: platform: linux32 @@ -266,7 +289,7 @@ graph: build-32-opt: name: "Linux 32 (opt)" - extends: builder + extends: builder_with_tests env: BUILD_OPT: 1 treeherder: @@ -277,7 +300,7 @@ graph: build-64-debug: name: "Linux 64 (debug)" - extends: builder + extends: builder_with_tests env: USE_64: 1 treeherder: @@ -293,7 +316,7 @@ graph: build-64-asan: name: "Linux 64 (ASan)" - extends: builder + extends: builder_with_tests env: USE_ASAN: 1 USE_64: 1 @@ -305,7 +328,97 @@ graph: build-64-opt: name: "Linux 64 (opt)" - extends: builder + extends: builder_with_tests + env: + BUILD_OPT: 1 + USE_64: 1 + treeherder: + build: + platform: linux64 + collection: + opt: true + + ## GCC 4 #################################################################### + + build-32-debug-gcc4: + name: "Linux 32 (debug, gcc4)" + extends: builder_gcc4 + treeherder: + build: + platform: linux32 + collection: + debug: true + + build-32-opt-gcc4: + name: "Linux 32 (opt, gcc4)" + extends: builder_gcc4 + env: + BUILD_OPT: 1 + treeherder: + build: + platform: linux32 + collection: + opt: true + + build-64-debug-gcc4: + name: "Linux 64 (debug, gcc4)" + extends: builder_gcc4 + env: + USE_64: 1 + treeherder: + build: + platform: linux64 + collection: + debug: true + + build-64-opt-gcc4: + name: "Linux 64 (opt, gcc4)" + extends: builder_gcc4 + env: + BUILD_OPT: 1 + USE_64: 1 + treeherder: + build: + platform: linux64 + collection: + opt: true + + ## GCC 6 #################################################################### + + build-32-debug-gcc6: + name: "Linux 32 (debug, gcc6)" + extends: builder_gcc6 + treeherder: + build: + platform: linux32 + collection: + debug: true + + build-32-opt-gcc6: + name: "Linux 32 (opt, gcc6)" + extends: builder_gcc6 + env: + BUILD_OPT: 1 + treeherder: + build: + platform: linux32 + collection: + opt: true + + build-64-debug-gcc6: + name: "Linux 64 (debug, gcc6)" + extends: builder_gcc6 + env: + USE_64: 1 + treeherder: + build: + platform: linux64 + collection: + debug: true + + build-64-opt-gcc6: + name: "Linux 64 (opt, gcc6)" + extends: builder_gcc6 env: BUILD_OPT: 1 USE_64: 1 @@ -315,39 +428,7 @@ graph: collection: opt: true -# build-32-debug-asan-gcc6: -# name: "Linux 32 (gcc6, debug, ASan)" -# extends: builder -# env: -# USE_ASAN: 1 -# CCC: g++-6 -# CC: gcc-6 - -# build-32-opt-gcc6: -# name: "Linux 32 (gcc6, opt)" -# extends: builder -# env: -# BUILD_OPT: 1 -# CCC: g++-6 -# CC: gcc-6 - -# build-64-debug-asan-gcc6: -# name: "Linux 64 (gcc6, debug, ASan)" -# extends: builder -# env: -# USE_ASAN: 1 -# USE_64: 1 -# CCC: g++-6 -# CC: gcc-6 - -# build-64-opt-gcc6: -# name: "Linux 64 (gcc6, opt)" -# extends: builder -# env: -# BUILD_OPT: 1 -# USE_64: 1 -# CCC: g++-6 -# CC: gcc-6 + ## Tools #################################################################### clang-format: name: "clang-format-3.8" diff --git a/automation/taskcluster/scripts/build.sh b/automation/taskcluster/scripts/build.sh index 54032c1da..abf1c3798 100755 --- a/automation/taskcluster/scripts/build.sh +++ b/automation/taskcluster/scripts/build.sh @@ -3,6 +3,13 @@ set -v -e -x if [ $(id -u) = 0 ]; then + # Switch compilers. + GCC=${GCC_VERSION:-gcc-5} + GXX=${GXX_VERSION:-g++-5} + + update-alternatives --set gcc "/usr/bin/$GCC" + update-alternatives --set g++ "/usr/bin/$GXX" + # Drop privileges by re-running this script. exec su worker $0 fi |