Navigation Menu

Skip to content

Commit

Permalink
Bug 1274350 - Update docker image, add GCC 4 and GCC 6 builds r=me
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Taubert committed May 25, 2016
1 parent fbf69eb commit a5adc5a
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .taskcluster.yml
Expand Up @@ -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}}}'
Expand Down
17 changes: 16 additions & 1 deletion automation/taskcluster/docker/setup.sh
Expand Up @@ -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

Expand Down
157 changes: 119 additions & 38 deletions automation/taskcluster/graph/graph.yml
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -266,7 +289,7 @@ graph:

build-32-opt:
name: "Linux 32 (opt)"
extends: builder
extends: builder_with_tests
env:
BUILD_OPT: 1
treeherder:
Expand All @@ -277,7 +300,7 @@ graph:

build-64-debug:
name: "Linux 64 (debug)"
extends: builder
extends: builder_with_tests
env:
USE_64: 1
treeherder:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions automation/taskcluster/scripts/build.sh
Expand Up @@ -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
Expand Down

0 comments on commit a5adc5a

Please sign in to comment.