Bug 1391427 - Use toolchain rust builds for windows tasks. draft
authorRalph Giles <giles@mozilla.com>
Wed, 13 Sep 2017 09:34:10 -0700
changeset 664378 e30181175ae0cabe8cb3f16b560abea72de0f226
parent 664377 fdcd8aa7d05099afe66f5fb218b853ade40a9847
child 664379 93b9eec78fe86747df60d9d94a227fe862f3e364
push id79693
push userbmo:giles@thaumas.net
push dateWed, 13 Sep 2017 22:56:25 +0000
bugs1391427
milestone57.0a1
Bug 1391427 - Use toolchain rust builds for windows tasks. Add a toolchain task to package upstream rust builds as a taskcluster artifact for windows builds. Add the new toolchain to taskcluster builds for windows and remove the corresponding tooltool entry in releng.manifest. The win64-hosted rust can't find the correct linker, despite being executable on the builders, so we have separate packages for win32 builds. This might get better in later rust releases. MozReview-Commit-ID: HTH21NsfVb8
browser/config/tooltool-manifests/win32/releng.manifest
browser/config/tooltool-manifests/win64/releng.manifest
taskcluster/ci/build/windows.yml
taskcluster/ci/static-analysis/kind.yml
taskcluster/ci/toolchain/windows.yml
--- a/browser/config/tooltool-manifests/win32/releng.manifest
+++ b/browser/config/tooltool-manifests/win32/releng.manifest
@@ -1,24 +1,16 @@
 [
   {
     "size": 266240,
     "digest": "bb345b0e700ffab4d09436981f14b5de84da55a3f18a7f09ebc4364a4488acdeab8d46f447b12ac70f2da1444a68b8ce8b8675f0dae2ccf845e966d1df0f0869",
     "algorithm": "sha512",
     "filename": "mozmake.exe"
   },
   {
-    "version": "rustc 1.19.0 (0ade33941 2017-07-17) repack",
-    "size": 97017057,
-    "digest": "b726645f9d26c5a3048720b3839166021c1cf91a02d2ff2f10c49adced7455c7352e18b5052084d80bf9d1c40ec1bf72d0397921b8cd23262f89fdbd10def58f",
-    "algorithm": "sha512",
-    "filename": "rustc.tar.bz2",
-    "unpack": true
-  },
-  {
     "version": "Visual Studio 2015 Update 3 14.0.25425.01 / SDK 10.0.14393.0",
     "size": 326656969,
     "digest": "babc414ffc0457d27f5a1ed24a8e4873afbe2f1c1a4075469a27c005e1babc3b2a788f643f825efedff95b79686664c67ec4340ed535487168a3482e68559bc7",
     "algorithm": "sha512",
     "filename": "vs2015u3.zip",
     "unpack": true
   },
   {
--- a/browser/config/tooltool-manifests/win64/releng.manifest
+++ b/browser/config/tooltool-manifests/win64/releng.manifest
@@ -1,25 +1,16 @@
 [
   {
     "size": 266240,
     "digest": "bb345b0e700ffab4d09436981f14b5de84da55a3f18a7f09ebc4364a4488acdeab8d46f447b12ac70f2da1444a68b8ce8b8675f0dae2ccf845e966d1df0f0869",
     "algorithm": "sha512",
     "filename": "mozmake.exe"
   },
   {
-    "version": "rustc 1.19.0 (0ade33941 2017-07-17) repack",
-    "size": 103602526,
-    "digest": "558d2d18991ad8b250a5d6b46a55e1ffdffc50d6bdd9cb4b3a945dd3d1143836b32e47f1df612bfea97ca2c02333ed43055b6c3030ecb1632385fb6940c1d246",
-    "algorithm": "sha512",
-    "visibility": "public",
-    "filename": "rustc.tar.bz2",
-    "unpack": true
-  },
-  {
     "version": "Visual Studio 2015 Update 3 14.0.25425.01 / SDK 10.0.14393.0",
     "size": 326656969,
     "digest": "babc414ffc0457d27f5a1ed24a8e4873afbe2f1c1a4075469a27c005e1babc3b2a788f643f825efedff95b79686664c67ec4340ed535487168a3482e68559bc7",
     "algorithm": "sha512",
     "filename": "vs2015u3.zip",
     "unpack": true
   },
   {
--- a/taskcluster/ci/build/windows.yml
+++ b/taskcluster/ci/build/windows.yml
@@ -14,16 +14,17 @@ win32/debug:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/releng.manifest"
     run:
         using: mozharness
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_windows_32_debug.py
     toolchains:
         - win32-clang-cl
+        - win32-rust
         - win64-sccache
 
 win32/opt:
     description: "Win32 Opt"
     index:
         product: firefox
         job-name: win32-opt
     treeherder:
@@ -37,16 +38,17 @@ win32/opt:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/releng.manifest"
     run:
         using: mozharness
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_windows_32_opt.py
     toolchains:
         - win32-clang-cl
+        - win32-rust
         - win64-sccache
 
 win32-dmd/opt:
     description: "Win32 DMD Opt"
     index:
         product: firefox
         job-name: win32-dmd-opt
     treeherder:
@@ -62,16 +64,17 @@ win32-dmd/opt:
         using: mozharness
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_windows_32_opt.py
         custom-build-variant-cfg: dmd
     run-on-projects: [ ]
     toolchains:
         - win32-clang-cl
+        - win32-rust
         - win64-sccache
 
 win32/pgo:
     description: "Win32 Opt PGO"
     index:
         product: firefox
         job-name: win32-pgo
     treeherder:
@@ -86,16 +89,17 @@ win32/pgo:
     run:
         using: mozharness
         options: [enable-pgo]
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_windows_32_opt.py
     toolchains:
         - win32-clang-cl
+        - win32-rust
         - win64-sccache
 
 win64/debug:
     description: "Win64 Debug"
     index:
         product: firefox
         job-name: win64-debug
     treeherder:
@@ -109,16 +113,17 @@ win64/debug:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
     run:
         using: mozharness
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_windows_64_debug.py
     toolchains:
         - win64-clang-cl
+        - win64-rust
         - win64-sccache
 
 win64/opt:
     description: "Win64 Opt"
     index:
         product: firefox
         job-name: win64-opt
     treeherder:
@@ -132,16 +137,17 @@ win64/opt:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
     run:
         using: mozharness
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_windows_64_opt.py
     toolchains:
         - win64-clang-cl
+        - win64-rust
         - win64-sccache
 
 win64-dmd/opt:
     description: "Win64 DMD Opt"
     index:
         product: firefox
         job-name: win64-dmd-opt
     treeherder:
@@ -157,16 +163,17 @@ win64-dmd/opt:
         using: mozharness
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_windows_64_opt.py
         custom-build-variant-cfg: dmd
     run-on-projects: [ ]
     toolchains:
         - win64-clang-cl
+        - win64-rust
         - win64-sccache
 
 win32-nightly/opt:
     description: "Win32 Nightly"
     index:
         product: firefox
         job-name: win32-opt
         type: nightly
@@ -186,16 +193,17 @@ win32-nightly/opt:
         actions: [clone-tools, build, check-test, update]
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_windows_32_opt.py
             - disable_signing.py
             - taskcluster_nightly.py
     toolchains:
         - win32-clang-cl
+        - win32-rust
         - win64-sccache
 
 win64-nightly/opt:
     description: "Win64 Nightly"
     index:
         product: firefox
         job-name: win64-opt
         type: nightly
@@ -215,16 +223,17 @@ win64-nightly/opt:
         actions: [clone-tools, build, check-test, update]
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_windows_64_opt.py
             - disable_signing.py
             - taskcluster_nightly.py
     toolchains:
         - win64-clang-cl
+        - win64-rust
         - win64-sccache
 
 win64/pgo:
     description: "Win64 Opt PGO"
     index:
         product: firefox
         job-name: win64-pgo
     treeherder:
@@ -239,16 +248,17 @@ win64/pgo:
     run:
         using: mozharness
         options: [enable-pgo]
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_windows_64_opt.py
     toolchains:
         - win64-clang-cl
+        - win64-rust
         - win64-sccache
 
 win32-add-on-devel/opt:
     description: "Windows32 add-on-devel"
     index:
         product: firefox
         job-name: win32-add-on-devel
     treeherder:
@@ -264,16 +274,17 @@ win32-add-on-devel/opt:
         using: mozharness
         script: "mozharness/scripts/fx_desktop_build.py"
         config:
             - builds/taskcluster_firefox_windows_32_addondevel.py
             - balrog/production.py
     run-on-projects: [ 'mozilla-beta', 'mozilla-release', 'mozilla-esr45' ]
     toolchains:
         - win32-clang-cl
+        - win32-rust
         - win64-sccache
 
 win64-add-on-devel/opt:
     description: "Windows64 add-on-devel"
     index:
         product: firefox
         job-name: win64-add-on-devel
     treeherder:
@@ -289,16 +300,17 @@ win64-add-on-devel/opt:
         using: mozharness
         script: "mozharness/scripts/fx_desktop_build.py"
         config:
             - builds/taskcluster_firefox_windows_64_addondevel.py
             - balrog/production.py
     run-on-projects: [ 'mozilla-beta', 'mozilla-release', 'mozilla-esr45' ]
     toolchains:
         - win64-clang-cl
+        - win64-rust
         - win64-sccache
 
 win64-noopt/debug:
     description: "Win64 No-optimize Debug"
     index:
         product: firefox
         job-name: win64-noopt-debug
     treeherder:
@@ -313,16 +325,17 @@ win64-noopt/debug:
     run:
         using: mozharness
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_win64_noopt_debug.py
     run-on-projects: [ 'trunk', 'try' ]
     toolchains:
         - win64-clang-cl
+        - win64-rust
         - win64-sccache
 
 win32-noopt/debug:
     description: "Win32 No-optimize Debug"
     index:
         product: firefox
         job-name: win32-noopt-debug
     treeherder:
@@ -337,16 +350,17 @@ win32-noopt/debug:
     run:
         using: mozharness
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_win32_noopt_debug.py
     run-on-projects: [ 'trunk', 'try' ]
     toolchains:
         - win32-clang-cl
+        - win32-rust
         - win64-sccache
 
 win64-asan/debug:
     description: "Win64 Debug ASAN"
     index:
         product: firefox
         job-name: win64-asan-debug
     treeherder:
@@ -361,16 +375,17 @@ win64-asan/debug:
     run:
         using: mozharness
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_win64_asan_debug.py
     run-on-projects: []
     toolchains:
         - win64-clang-cl
+        - win64-rust
         - win64-sccache
 
 win64-asan/opt:
     description: "Win64 Opt ASAN"
     index:
         product: firefox
         job-name: win64-asan-opt
     treeherder:
@@ -385,16 +400,17 @@ win64-asan/opt:
     run:
         using: mozharness
         script: mozharness/scripts/fx_desktop_build.py
         config:
             - builds/taskcluster_firefox_win64_asan_opt.py
     run-on-projects: []
     toolchains:
         - win64-clang-cl
+        - win64-rust
         - win64-sccache
 
 win32-devedition-nightly/opt:
     description: "Win32 Dev Edition Nightly"
     index:
         product: devedition
         job-name: win32-opt
         type: nightly
@@ -415,16 +431,17 @@ win32-devedition-nightly/opt:
         config:
             - builds/taskcluster_firefox_windows_32_opt.py
             - disable_signing.py
             - taskcluster_nightly.py
         custom-build-variant-cfg: devedition
     run-on-projects: [ 'mozilla-beta', ]
     toolchains:
         - win32-clang-cl
+        - win32-rust
         - win64-sccache
 
 win64-devedition-nightly/opt:
     description: "Win64 Dev Edition Nightly"
     index:
         product: devedition
         job-name: win64-opt
         type: nightly
@@ -445,9 +462,10 @@ win64-devedition-nightly/opt:
         config:
             - builds/taskcluster_firefox_windows_64_opt.py
             - disable_signing.py
             - taskcluster_nightly.py
         custom-build-variant-cfg: devedition
     run-on-projects: [ 'mozilla-beta', ]
     toolchains:
         - win64-clang-cl
+        - win64-rust
         - win64-sccache
--- a/taskcluster/ci/static-analysis/kind.yml
+++ b/taskcluster/ci/static-analysis/kind.yml
@@ -90,16 +90,17 @@ jobs:
                 TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/releng.manifest"
         run:
             using: mozharness
             script: mozharness/scripts/fx_desktop_build.py
             config:
                 - builds/taskcluster_firefox_win32_clang_debug.py
         toolchains:
             - win32-clang-cl
+            - win32-rust
             - win64-sccache
 
     win32-st-an/opt:
         description: "Win32 Static Analysis Opt (clang-cl)"
         index:
             product: firefox
             job-name: win32-st-an-opt
         treeherder:
@@ -113,16 +114,17 @@ jobs:
                 TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/releng.manifest"
         run:
             using: mozharness
             script: mozharness/scripts/fx_desktop_build.py
             config:
                 - builds/taskcluster_firefox_win32_clang.py
         toolchains:
             - win32-clang-cl
+            - win32-rust
             - win64-sccache
 
     win64-st-an/debug:
         description: "Win64 Static Analysis Debug (clang-cl)"
         index:
             product: firefox
             job-name: win64-st-an-debug
         treeherder:
@@ -136,16 +138,17 @@ jobs:
                 TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
         run:
             using: mozharness
             script: mozharness/scripts/fx_desktop_build.py
             config:
                 - builds/taskcluster_firefox_win64_clang_debug.py
         toolchains:
             - win64-clang-cl
+            - win64-rust
             - win64-sccache
 
     win64-st-an/opt:
         description: "Win64 Static Analysis Opt (clang-cl)"
         index:
             product: firefox
             job-name: win64-st-an-opt
         treeherder:
@@ -159,9 +162,10 @@ jobs:
                 TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
         run:
             using: mozharness
             script: mozharness/scripts/fx_desktop_build.py
             config:
                 - builds/taskcluster_firefox_win64_clang.py
         toolchains:
             - win64-clang-cl
+            - win64-rust
             - win64-sccache
--- a/taskcluster/ci/toolchain/windows.yml
+++ b/taskcluster/ci/toolchain/windows.yml
@@ -89,16 +89,60 @@ win64-clang-tidy:
         script: build-clang-tidy64-windows.sh
         resources:
             - 'build/clang-plugin/**'
             - 'build/build-clang/build-clang.py'
             - 'build/build-clang/clang-tidy-win32.json'
             - 'taskcluster/scripts/misc/build-clang-windows-helper64.sh'
         toolchain-artifact: public/build/clang-tidy.tar.bz2
 
+win64-rust:
+    description: "rust repack"
+    treeherder:
+        kind: build
+        platform: toolchains/opt
+        symbol: TW64(rust)
+        tier: 1
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        docker-image: {in-tree: desktop-build}
+        max-run-time: 7200
+        env:
+          UPLOAD_DIR: artifacts
+    run:
+        using: toolchain-script
+        script: repack_rust.py
+        arguments: >
+          --channel 1.19.0
+          --host win64
+          --target win64
+        toolchain-artifact: public/build/rustc-x86_64-pc-windows-msvc-repack.tar.bz2
+
+win32-rust:
+    description: "rust repack"
+    treeherder:
+        kind: build
+        platform: toolchains/opt
+        symbol: TW32(rust)
+        tier: 1
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        docker-image: {in-tree: desktop-build}
+        max-run-time: 7200
+        env:
+          UPLOAD_DIR: artifacts
+    run:
+        using: toolchain-script
+        script: repack_rust.py
+        arguments: >
+          --channel 1.19.0
+          --host win32
+          --target win32
+        toolchain-artifact: public/build/rustc-i686-pc-windows-msvc-repack.tar.bz2
+
 win64-sccache:
     description: "sccache toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TW64(sccache)
         tier: 1
     worker-type: aws-provisioner-v1/gecko-{level}-b-win2012