Bug 1328617 - Switch Linux jobs for building clang to use the releng API proxy for accessing tooltool; r=dustin
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 03 Jan 2017 23:40:00 -0500
changeset 373079 6e1826274b846ecacd4b5f142cad5cf110c3bec3
parent 373078 b4faf5602cc780291ff418e0bd830776e5b83439
child 373080 563468e72885ab31fbb3ece5efa338ad98a4f7cb
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1328617
milestone53.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 1328617 - Switch Linux jobs for building clang to use the releng API proxy for accessing tooltool; r=dustin
taskcluster/ci/toolchain/linux.yml
taskcluster/scripts/misc/build-clang-linux.sh
taskcluster/scripts/misc/build-clang-tidy-linux.sh
taskcluster/scripts/misc/build-clang-tidy-macosx.sh
taskcluster/scripts/misc/tooltool-download.sh
--- a/taskcluster/ci/toolchain/linux.yml
+++ b/taskcluster/ci/toolchain/linux.yml
@@ -7,16 +7,17 @@ linux64-clang/opt:
     treeherder:
         kind: build
         platform: linux64/opt
         symbol: Cc(Clang)
         tier: 1
     run:
         using: toolchain-script
         script: build-clang-linux.sh
+        tooltool-downloads: public
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         implementation: docker-worker
         docker-image: {in-tree: desktop-build}
         max-run-time: 36000
     when:
         files-changed:
             - 'build/build-clang/**'
@@ -31,16 +32,17 @@ linux64-clang-tidy/opt:
     treeherder:
         kind: build
         platform: linux64/opt
         symbol: Cc(Clang-Tidy)
         tier: 1
     run:
         using: toolchain-script
         script: build-clang-tidy-linux.sh
+        tooltool-downloads: public
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         implementation: docker-worker
         docker-image: {in-tree: desktop-build}
         max-run-time: 36000
     when:
         files-changed:
             - 'build/clang-plugin/**'
--- a/taskcluster/scripts/misc/build-clang-linux.sh
+++ b/taskcluster/scripts/misc/build-clang-linux.sh
@@ -2,24 +2,20 @@
 set -x -e -v
 
 # This script is for building clang for Linux.
 
 WORKSPACE=$HOME/workspace
 HOME_DIR=$WORKSPACE/build
 UPLOAD_DIR=$WORKSPACE/artifacts
 
-# Fetch our toolchain from tooltool
-cd $HOME_DIR
-wget -O tooltool.py https://raw.githubusercontent.com/mozilla/build-tooltool/master/tooltool.py
-chmod +x tooltool.py
-: TOOLTOOL_CACHE                ${TOOLTOOL_CACHE:=/home/worker/tooltool-cache}
-export TOOLTOOL_CACHE
-cd src
-$HOME_DIR/tooltool.py -m browser/config/tooltool-manifests/linux64/releng.manifest fetch
+cd $HOME_DIR/src
+
+TOOLTOOL_MANIFEST=browser/config/tooltool-manifests/linux64/releng.manifest
+. taskcluster/scripts/misc/tooltool-download.sh
 
 # gets a bit too verbose here
 set +x
 
 cd build/build-clang
 # |mach python| sets up a virtualenv for us!
 ../../mach python ./build-clang.py -c clang-static-analysis-linux64.json
 
--- a/taskcluster/scripts/misc/build-clang-tidy-linux.sh
+++ b/taskcluster/scripts/misc/build-clang-tidy-linux.sh
@@ -2,24 +2,20 @@
 set -x -e -v
 
 # This script is for building clang for Linux.
 
 WORKSPACE=$HOME/workspace
 HOME_DIR=$WORKSPACE/build
 UPLOAD_DIR=$WORKSPACE/artifacts
 
-# Fetch our toolchain from tooltool
-cd $HOME_DIR
-wget -O tooltool.py https://raw.githubusercontent.com/mozilla/build-tooltool/master/tooltool.py
-chmod +x tooltool.py
-: TOOLTOOL_CACHE                ${TOOLTOOL_CACHE:=/home/worker/tooltool-cache}
-export TOOLTOOL_CACHE
-cd src
-$HOME_DIR/tooltool.py -m browser/config/tooltool-manifests/linux64/releng.manifest fetch
+cd $HOME_DIR/src
+
+TOOLTOOL_MANIFEST=browser/config/tooltool-manifests/linux64/releng.manifest
+. taskcluster/scripts/misc/tooltool-download.sh
 
 # gets a bit too verbose here
 set +x
 
 cd build/build-clang
 # |mach python| sets up a virtualenv for us!
 ../../mach python ./build-clang.py -c clang-tidy-linux64.json
 
--- a/taskcluster/scripts/misc/build-clang-tidy-macosx.sh
+++ b/taskcluster/scripts/misc/build-clang-tidy-macosx.sh
@@ -4,23 +4,18 @@ set -x -e -v
 # This script is for building clang for Mac OS X on Linux.
 
 WORKSPACE=$HOME/workspace
 HOME_DIR=$WORKSPACE/build
 UPLOAD_DIR=$WORKSPACE/artifacts
 
 cd $HOME_DIR/src
 
-chmod +x taskcluster/docker/recipes/tooltool.py
-: TOOLTOOL_CACHE                ${TOOLTOOL_CACHE:=/home/worker/tooltool-cache}
-export TOOLTOOL_CACHE
-
-
 TOOLTOOL_MANIFEST=browser/config/tooltool-manifests/macosx64/cross-clang.manifest
-./taskcluster/docker/recipes/tooltool.py --url=http://relengapi/tooltool/ -m "${TOOLTOOL_MANIFEST}" fetch
+. taskcluster/scripts/misc/tooltool-download.sh
 
 # ld needs libLTO.so from llvm
 export LD_LIBRARY_PATH=$HOME_DIR/src/clang/lib
 # these variables are used in build-clang.py
 export CROSS_CCTOOLS_PATH=$HOME_DIR/src/cctools
 export CROSS_SYSROOT=$HOME_DIR/src/MacOSX10.10.sdk
 export LIBCXX_INCLUDE_PATH=$HOME_DIR/src/clang/include/c++/v1
 # cmake doesn't allow us to specify a path to lipo on the command line.
new file mode 100644
--- /dev/null
+++ b/taskcluster/scripts/misc/tooltool-download.sh
@@ -0,0 +1,11 @@
+# Fetch a tooltool manifest.
+
+cd $HOME/workspace/build/src
+
+chmod +x taskcluster/docker/recipes/tooltool.py
+: TOOLTOOL_CACHE                ${TOOLTOOL_CACHE:=/home/worker/tooltool-cache}
+export TOOLTOOL_CACHE
+
+./taskcluster/docker/recipes/tooltool.py --url=http://relengapi/tooltool/ -m "${TOOLTOOL_MANIFEST}" fetch
+
+cd $OLDPWD