Bug 1391427 - Use toolchain rust builds for android tasks. draft
authorRalph Giles <giles@mozilla.com>
Wed, 13 Sep 2017 11:23:18 -0700
changeset 664379 93b9eec78fe86747df60d9d94a227fe862f3e364
parent 664378 e30181175ae0cabe8cb3f16b560abea72de0f226
child 664380 5da817257fab464103c4fe9c6493ca14238c869f
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 android tasks. Add a toolchain task to package upstream rust builds as a taskcluster artifact for linux-hosted android builds. Add the new toolchain to taskcluster builds for linux with the requisite target suport and remove the corresponding tooltool entry in releng.manifest. MozReview-Commit-ID: JxxTSNjJXzW
mobile/android/config/tooltool-manifests/android-x86/releng.manifest
mobile/android/config/tooltool-manifests/android/releng.manifest
taskcluster/ci/build/android.yml
taskcluster/ci/toolchain/linux.yml
--- a/mobile/android/config/tooltool-manifests/android-x86/releng.manifest
+++ b/mobile/android/config/tooltool-manifests/android-x86/releng.manifest
@@ -19,24 +19,16 @@
   {
     "size": 4906080,
     "digest": "d735544e039da89382c53b2302b7408d4610247b4f8b5cdc5a4d5a8ec5470947b19e8ea7f7a37e78222e661347e394e0030d81f41534138b527b14e9c4e55634",
     "algorithm": "sha512",
     "filename": "jsshell.tar.xz",
     "unpack": true
   },
   {
-    "version": "rustc 1.19.0 (0ade33941 2017-07-17) repack",
-    "size": 151322128,
-    "digest": "1d6d6e8bbf7535a4f1c8f1292562e30c868bfd3ac323992fc287be09f7fa3167c2f9e01dc98143967983e30488fe3ecaebff530ba4ec9113033d60af936c4f4d",
-    "algorithm": "sha512",
-    "filename": "rustc.tar.xz",
-    "unpack": true
-  },
-  {
     "size": 7797928,
     "visibility": "public",
     "digest": "7bb5c7b3586179a7805ae60b025b7856cb8dbed66da1b7962bc446d94ea6fa45ed55ebfe065d2d82690c68bf71bdab613e97f53da79b85e3185955461f751256",
     "algorithm": "sha512",
     "filename": "google.tar.xz",
     "unpack": true
   },
   {
--- a/mobile/android/config/tooltool-manifests/android/releng.manifest
+++ b/mobile/android/config/tooltool-manifests/android/releng.manifest
@@ -52,24 +52,16 @@
     "algorithm": "sha512",
     "visibility": "public",
     "filename": "gradle-dist.tar.xz",
     "unpack": true,
     "digest": "e3cfe7f8259ad97722243d4e873d5a05c014bfc24d637427f89d804bf5073290229c778ea303142cf06c2dc79e0492f23521f57d3a73825f55b8db587317646f",
     "size": 51753660
   },
   {
-    "version": "rustc 1.19.0 (0ade33941 2017-07-17) repack",
-    "size": 151322128,
-    "digest": "1d6d6e8bbf7535a4f1c8f1292562e30c868bfd3ac323992fc287be09f7fa3167c2f9e01dc98143967983e30488fe3ecaebff530ba4ec9113033d60af936c4f4d",
-    "algorithm": "sha512",
-    "filename": "rustc.tar.xz",
-    "unpack": true
-  },
-  {
     "algorithm": "sha512",
     "visibility": "public",
     "filename": "dotgradle.tar.xz",
     "unpack": true,
     "digest": "9f082ccd71ad18991eb71fcad355c6990f50a72a09ab9b79696521485656083a72faf5a8d4714de9c4b901ee2319b6786a51964846bb7075061642a8505501c2",
     "size": 512
   }
 ]
--- a/taskcluster/ci/build/android.yml
+++ b/taskcluster/ci/build/android.yml
@@ -19,16 +19,17 @@ android-api-16/debug:
             - disable_signing.py
             - platform_supports_post_upload_to_latest.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         custom-build-variant-cfg: api-16-debug
         tooltool-downloads: internal
     toolchains:
         - linux64-gcc
+        - linux64-rust-android
         - linux64-sccache
 
 android-x86/opt:
     description: "Android 4.2 x86 Opt"
     index:
         product: mobile
         job-name: android-x86-opt
     treeherder:
@@ -47,16 +48,17 @@ android-x86/opt:
             - disable_signing.py
             - platform_supports_post_upload_to_latest.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         custom-build-variant-cfg: x86
         tooltool-downloads: internal
     toolchains:
         - linux64-gcc
+        - linux64-rust-android
         - linux64-sccache
 
 android-x86-nightly/opt:
     description: "Android 4.2 x86 Nightly"
     attributes:
         nightly: true
     index:
         product: mobile
@@ -79,16 +81,17 @@ android-x86-nightly/opt:
             - platform_supports_post_upload_to_latest.py
             - taskcluster_nightly.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         custom-build-variant-cfg: x86
         tooltool-downloads: internal
     toolchains:
         - linux64-gcc
+        - linux64-rust-android
         - linux64-sccache
 
 android-api-16/opt:
     description: "Android 4.0 api-16+ Opt"
     index:
         product: mobile
         job-name: android-api-16-opt
     treeherder:
@@ -107,16 +110,17 @@ android-api-16/opt:
             - disable_signing.py
             - platform_supports_post_upload_to_latest.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         custom-build-variant-cfg: api-16
         tooltool-downloads: internal
     toolchains:
         - linux64-gcc
+        - linux64-rust-android
         - linux64-sccache
 
 android-api-16-nightly/opt:
     description: "Android 4.0 api-16+ Nightly"
     attributes:
         nightly: true
     index:
         product: mobile
@@ -139,16 +143,17 @@ android-api-16-nightly/opt:
             - platform_supports_post_upload_to_latest.py
             - taskcluster_nightly.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         custom-build-variant-cfg: api-16
         tooltool-downloads: internal
     toolchains:
         - linux64-gcc
+        - linux64-rust-android
         - linux64-sccache
 
 android-x86-old-id/opt:
     description: "Android 4.2 x86 Opt OldId"
     index:
         product: mobile
         job-name: android-x86-old-id-opt
     treeherder:
@@ -168,16 +173,17 @@ android-x86-old-id/opt:
             - platform_supports_post_upload_to_latest.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         custom-build-variant-cfg: x86-old-id
         tooltool-downloads: internal
     run-on-projects: [ 'mozilla-central' ]
     toolchains:
         - linux64-gcc
+        - linux64-rust-android
         - linux64-sccache
 
 android-x86-old-id-nightly/opt:
     description: "Android 4.2 x86 OldId Nightly"
     attributes:
         nightly: true
     index:
         product: mobile
@@ -201,16 +207,17 @@ android-x86-old-id-nightly/opt:
             - taskcluster_nightly.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         custom-build-variant-cfg: x86-old-id
         tooltool-downloads: internal
     run-on-projects: [ 'mozilla-central' ]
     toolchains:
         - linux64-gcc
+        - linux64-rust-android
         - linux64-sccache
 
 android-api-16-old-id/opt:
     description: "Android 4.0 api-16+ Opt OldId"
     index:
         product: mobile
         job-name: android-api-16-old-id-opt
     treeherder:
@@ -230,16 +237,17 @@ android-api-16-old-id/opt:
             - platform_supports_post_upload_to_latest.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         custom-build-variant-cfg: api-16-old-id
         tooltool-downloads: internal
     run-on-projects: [ 'mozilla-central' ]
     toolchains:
         - linux64-gcc
+        - linux64-rust-android
         - linux64-sccache
 
 android-api-16-old-id-nightly/opt:
     description: "Android 4.0 api-16+ OldId Nightly"
     attributes:
         nightly: true
     index:
         product: mobile
@@ -263,16 +271,17 @@ android-api-16-old-id-nightly/opt:
             - taskcluster_nightly.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         custom-build-variant-cfg: api-16-old-id
         tooltool-downloads: internal
     run-on-projects: [ 'mozilla-central' ]
     toolchains:
         - linux64-gcc
+        - linux64-rust-android
         - linux64-sccache
 
 android-api-16-gradle/opt:
     description: "Android 4.0 api-16+ (Gradle) Opt"
     index:
         product: mobile
         job-name: android-api-16-gradle-opt
     treeherder:
@@ -304,16 +313,17 @@ android-api-16-gradle/opt:
             - disable_signing.py
             - platform_supports_post_upload_to_latest.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         custom-build-variant-cfg: api-16-gradle
         tooltool-downloads: internal
     toolchains:
         - linux64-gcc
+        - linux64-rust-android
         - linux64-sccache
 
 android-aarch64/opt:
     description: "Android 5.0 AArch64 Opt"
     index:
         product: mobile
         job-name: android-aarch64-opt
     treeherder:
@@ -332,16 +342,17 @@ android-aarch64/opt:
             - disable_signing.py
             - platform_supports_post_upload_to_latest.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         custom-build-variant-cfg: aarch64
         tooltool-downloads: internal
     toolchains:
         - linux64-gcc
+        - linux64-rust-android
         - linux64-sccache
 
 android-aarch64-nightly/opt:
     description: "Android 5.0 AArch64 Nightly"
     attributes:
         nightly: true
     index:
         product: mobile
@@ -364,9 +375,10 @@ android-aarch64-nightly/opt:
             - platform_supports_post_upload_to_latest.py
             - taskcluster_nightly.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         custom-build-variant-cfg: aarch64
         tooltool-downloads: internal
     toolchains:
         - linux64-gcc
+        - linux64-rust-android
         - linux64-sccache
--- a/taskcluster/ci/toolchain/linux.yml
+++ b/taskcluster/ci/toolchain/linux.yml
@@ -203,16 +203,42 @@ linux64-rust:
         script: repack_rust.py
         arguments: >
           --channel 1.19.0
           --host linux64
           --target linux64 --target linux32
           --target x86_64-apple-darwin
         toolchain-artifact: public/build/rustc-x86_64-unknown-linux-gnu-repack.tar.xz
 
+linux64-rust-android:
+    description: "rust minimum supported version repack"
+    treeherder:
+        kind: build
+        platform: toolchains/opt
+        symbol: TL(rust-android)
+        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
+          --suffix android-cross
+          --host linux64
+          --target linux64
+          --target armv7-linux-androideabi
+          --target aarch64-linux-android
+          --target i686-linux-android
+        toolchain-artifact: public/build/rustc-x86_64-unknown-linux-gnu-android-cross-repack.tar.xz
+
 linux64-sccache:
     description: "sccache toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TL(sccache)
         tier: 1
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux