gecko-dev/taskcluster/scripts/misc/wr-cargotest-macos-build.sh
Kartikaya Gupta 56bd94dd33 Bug 1516568 - Add jobs to cross-compile cargo test binaries and run them on macOS. r=glandium
Similar to the previous patch, this adds two jobs. One that
cross-compiles the binaries produced by `cargo test` and publishes them
as an artifact. The other job downloads the artifact and runs the
resulting binaries.

Differential Revision: https://phabricator.services.mozilla.com/D19370

--HG--
extra : source : 79120d13e713114032263c0851455ec5f981d72c
2019-02-15 01:32:21 +00:00

24 lines
721 B
Bash
Executable file

#!/bin/bash
set -x -e -v
source ${GECKO_PATH}/taskcluster/scripts/misc/wr-macos-cross-build-setup.sh
export UPLOAD_DIR="${HOME}/artifacts"
mkdir -p "${UPLOAD_DIR}"
# Do a cross-build for cargo test run
pushd "${GECKO_PATH}/gfx/wr"
CARGOFLAGS="-vv --frozen --target=${TARGET_TRIPLE}" \
CARGOTESTFLAGS="--no-run" \
ci-scripts/macos-debug-tests.sh
# Package up the test binaries
cd "target/${TARGET_TRIPLE}"
mkdir cargo-test-binaries
mv debug cargo-test-binaries/
find cargo-test-binaries -type f -maxdepth 2 -executable -print0 > binaries.lst
tar cjf cargo-test-binaries.tar.bz2 -T binaries.lst --null
mv cargo-test-binaries.tar.bz2 "${UPLOAD_DIR}"
# Clean the build
cd "${GECKO_PATH}/gfx/wr"
rm -rf target
popd