summaryrefslogtreecommitdiffstats
path: root/taskcluster/scripts/misc/wrench-android-build.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /taskcluster/scripts/misc/wrench-android-build.sh
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'taskcluster/scripts/misc/wrench-android-build.sh')
-rwxr-xr-xtaskcluster/scripts/misc/wrench-android-build.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/taskcluster/scripts/misc/wrench-android-build.sh b/taskcluster/scripts/misc/wrench-android-build.sh
new file mode 100755
index 0000000000..87dc55eadb
--- /dev/null
+++ b/taskcluster/scripts/misc/wrench-android-build.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+set -x -e -v
+
+MODE=${1?"First argument must be debug|release"}
+
+pushd "${MOZ_FETCHES_DIR}"
+mv wrench-deps/{vendor,.cargo,cargo-apk} ${GECKO_PATH}/gfx/wr
+popd
+
+pushd "${GECKO_PATH}/gfx/wr/wrench"
+# These things come from the toolchain dependencies of the job that invokes
+# this script (webrender-wrench-android-build).
+export PATH="${PATH}:${MOZ_FETCHES_DIR}/rustc/bin"
+export ANDROID_HOME="${MOZ_FETCHES_DIR}/android-sdk-linux"
+export NDK_HOME="${MOZ_FETCHES_DIR}/android-ndk"
+
+# `cargo apk build` fails whilst attempting to sign the output apk,
+# unless the `.android` directory exists.
+# See https://github.com/rust-windowing/android-rs-glue/issues/252
+mkdir /builds/worker/.android
+if [ "$MODE" == "debug" ]; then
+ ../cargo-apk/bin/cargo-apk build --frozen --verbose
+elif [ "$MODE" == "release" ]; then
+ ../cargo-apk/bin/cargo-apk build --frozen --verbose --release
+else
+ echo "Unknown mode '${MODE}'; must be 'debug' or 'release'"
+ exit 1
+fi
+popd