fune/taskcluster/scripts/misc/build-rust-size.sh
Mike Hommey 9ef9a07ff2 Bug 1729406 - Use .tar.zst for most toolchain artifacts. r=firefox-build-system-reviewers,andi
We leave the following ones unchanged:
- geckodriver because the results are used to releases on github.
- sixgill because the script that creates it is not in-tree.
- *-dist-toolchain because sccache is not expecting a .tar.zst.

We use native tar support in most cases, except for toolchain scripts also
used on Windows, for which we use our zstdpy script.

Differential Revision: https://phabricator.services.mozilla.com/D124733
2021-09-08 23:46:51 +00:00

38 lines
756 B
Bash
Executable file

#!/bin/bash
set -x -e -v
PROJECT=rust-size
COMPRESS_EXT=zst
# This script is for building rust-size
case "$(uname -s)" in
Linux)
;;
MINGW*)
UPLOAD_DIR=$PWD/public/build
. $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
;;
esac
cd $GECKO_PATH
if [ -n "$TOOLTOOL_MANIFEST" ]; then
. taskcluster/scripts/misc/tooltool-download.sh
fi
PATH="$(cd $MOZ_FETCHES_DIR && pwd)/rustc/bin:$PATH"
cd $MOZ_FETCHES_DIR/$PROJECT
cargo build --verbose --release
mkdir $PROJECT
cp target/release/${PROJECT}* ${PROJECT}/
tar -c $PROJECT | python3 $GECKO_PATH/taskcluster/scripts/misc/zstdpy > ${PROJECT}.tar.$COMPRESS_EXT
mkdir -p $UPLOAD_DIR
cp ${PROJECT}.tar.$COMPRESS_EXT $UPLOAD_DIR
cd ..
. $GECKO_PATH/taskcluster/scripts/misc/vs-cleanup.sh