summaryrefslogtreecommitdiffstats
path: root/taskcluster/scripts/misc/wgpu-deps-vendoring.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/wgpu-deps-vendoring.sh
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.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/wgpu-deps-vendoring.sh')
-rwxr-xr-xtaskcluster/scripts/misc/wgpu-deps-vendoring.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/taskcluster/scripts/misc/wgpu-deps-vendoring.sh b/taskcluster/scripts/misc/wgpu-deps-vendoring.sh
new file mode 100755
index 0000000000..1b814b7e95
--- /dev/null
+++ b/taskcluster/scripts/misc/wgpu-deps-vendoring.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+set -x -e -v
+
+# This scripts uses `cargo-vendor` to download all the dependencies needed
+# to test `wgpu`, and exports those dependencies as a tarball.
+# This avoids having to download these dependencies on every test job
+# that tests `wgpu`.
+
+UPLOAD_DIR=$HOME/artifacts
+
+cd $GECKO_PATH
+export PATH=$PATH:$MOZ_FETCHES_DIR/rustc/bin:$HOME/.cargo/bin
+cd gfx/wgpu/
+mkdir .cargo
+cargo vendor --sync ./Cargo.toml > .cargo/config
+mkdir wgpu-deps
+mv vendor .cargo wgpu-deps/
+mkdir wgpu-deps/cargo-apk
+# Until there's a version of cargo-apk published on crates.io that has
+# https://github.com/rust-windowing/android-rs-glue/pull/223, we need to use
+# an unpublished version.
+cargo install --path $MOZ_FETCHES_DIR/android-rs-glue/cargo-apk --root wgpu-deps/cargo-apk cargo-apk
+tar caf wgpu-deps.tar.bz2 wgpu-deps
+
+mkdir -p $UPLOAD_DIR
+mv wgpu-deps.tar.bz2 $UPLOAD_DIR/