Bug 1532284 - Build wrench on Android. r=glandium
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 08 Mar 2019 00:37:46 +0000
changeset 463138 4efc7fb0eae794f4708a59eea3073182080e1889
parent 463137 b958c752bbe677243668c83c3e6604867f8091f8
child 463139 f2bd560573a4b7f684e0647d0031ce9e0b5c045a
push id35668
push userbtara@mozilla.com
push dateFri, 08 Mar 2019 21:50:53 +0000
treeherdermozilla-central@14778fd00dc5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1532284
milestone67.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 1532284 - Build wrench on Android. r=glandium Depends on D22377 Differential Revision: https://phabricator.services.mozilla.com/D22378
gfx/wr/ci-scripts/docker-image/setup.sh
taskcluster/ci/webrender/kind.yml
taskcluster/scripts/misc/wrench-deps-vendoring.sh
--- a/gfx/wr/ci-scripts/docker-image/setup.sh
+++ b/gfx/wr/ci-scripts/docker-image/setup.sh
@@ -18,16 +18,17 @@ apt-get install -y \
     cmake \
     curl \
     gcc \
     git \
     g++ \
     libfontconfig1-dev \
     libgl1-mesa-dev \
     libx11-dev \
+    openjdk-8-jdk \
     pkg-config \
     python \
     python-mako \
     python-pip \
     python-setuptools \
     python-voluptuous \
     python-yaml \
     software-properties-common
--- a/taskcluster/ci/webrender/kind.yml
+++ b/taskcluster/ci/webrender/kind.yml
@@ -230,8 +230,42 @@ jobs:
             symbol: WR(wrench)
         when:
             files-changed:
                 - 'build/win64/mozconfig.vs2017'
                 - 'browser/config/tooltool-manifests/win64/webrender.manifest'
                 - 'gfx/wr/**'
                 - 'taskcluster/scripts/misc/tooltool-download.sh'
                 - 'taskcluster/scripts/misc/wrench-windows-tests.sh'
+
+    wrench-android-build:
+        description: Build wrench for Android
+        worker-type: aws-provisioner-v1/gecko-{level}-b-android
+        worker:
+            max-run-time: 5400
+            docker-image: {in-tree: webrender}
+            artifacts:
+                - type: file
+                  name: public/build/wrench-debug.apk
+                  path: /builds/worker/checkouts/gecko/gfx/wr/target/android-artifacts/app/build/outputs/apk/app-debug.apk
+        run:
+            using: run-task
+            command: >-
+                cd $GECKO_PATH &&
+                ./mach artifact toolchain -v $MOZ_TOOLCHAINS &&
+                export PATH=$PATH:$PWD/rustc/bin:$PWD/android-gradle-dependencies/gradle-dist/bin &&
+                export ANDROID_HOME=$PWD/android-sdk-linux &&
+                export NDK_HOME=$PWD/android-ndk &&
+                mv wrench-deps/{vendor,.cargo,cargo-apk} gfx/wr &&
+                cd gfx/wr/wrench &&
+                ../cargo-apk/bin/cargo-apk build --frozen --verbose
+        toolchains:
+            - android-gradle-dependencies
+            - android-ndk-linux
+            - android-sdk-linux
+            - linux64-rust-android
+            - wrench-deps
+        treeherder:
+            platform: android-4-0-armv7-api16/debug
+            symbol: WR(B)
+        when:
+            files-changed:
+                - 'gfx/wr/**'
--- a/taskcluster/scripts/misc/wrench-deps-vendoring.sh
+++ b/taskcluster/scripts/misc/wrench-deps-vendoring.sh
@@ -14,12 +14,19 @@ cd $WORKSPACE
 . $SRCDIR/taskcluster/scripts/misc/tooltool-download.sh
 export PATH=$PATH:$SRCDIR/rustc/bin
 cargo install --version 0.1.21 cargo-vendor
 cd $SRCDIR/gfx/wr/
 mkdir .cargo
 cargo vendor --relative-path --sync ./Cargo.lock > .cargo/config
 mkdir wrench-deps
 mv vendor .cargo wrench-deps/
+mkdir wrench-deps/cargo-apk
+# Until there's a version of cargo-apk published on crates.io that has
+# https://github.com/tomaka/android-rs-glue/pull/205 and
+# https://github.com/tomaka/android-rs-glue/pull/171 (see also
+# https://github.com/tomaka/android-rs-glue/issues/204), we need to use
+# an unpublished version.
+cargo install --git https://github.com/staktrace/android-rs-glue --rev 6b2be25bd536a453e233cd7aea9d22974db63a49 --root wrench-deps/cargo-apk cargo-apk
 tar caf wrench-deps.tar.bz2 wrench-deps
 
 mkdir -p $UPLOAD_DIR
 mv wrench-deps.tar.bz2 $UPLOAD_DIR/