mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
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 : moz-landing-system : lando
This commit is contained in:
parent
dc62fcc29a
commit
ad84b74ed1
@ -153,6 +153,64 @@ jobs:
|
||||
files-changed:
|
||||
- 'gfx/wr/**'
|
||||
|
||||
cargotest-macos-build:
|
||||
description: Cross compilation of cargo tests for macOS on Linux
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
|
||||
worker:
|
||||
docker-image: {in-tree: webrender}
|
||||
env:
|
||||
TOOLTOOL_MANIFEST: "/builds/worker/checkouts/gecko/browser/config/tooltool-manifests/macosx64/cross-releng.manifest"
|
||||
chain-of-trust: true
|
||||
artifacts:
|
||||
- type: file
|
||||
name: public/build/cargo-test-binaries.tar.bz2
|
||||
path: /builds/worker/artifacts/cargo-test-binaries.tar.bz2
|
||||
toolchains:
|
||||
- linux64-rust-macos
|
||||
- linux64-cctools-port
|
||||
- linux64-clang
|
||||
- linux64-llvm-dsymutil
|
||||
- wrench-deps
|
||||
run:
|
||||
using: run-task
|
||||
tooltool-downloads: internal
|
||||
command: '$HOME/checkouts/gecko/taskcluster/scripts/misc/wr-cargotest-macos-build.sh'
|
||||
treeherder:
|
||||
platform: macosx64-qr/debug
|
||||
symbol: WR(B)
|
||||
when:
|
||||
files-changed:
|
||||
- 'gfx/wr/**'
|
||||
- 'taskcluster/scripts/misc/tooltool-download.sh'
|
||||
- 'taskcluster/scripts/misc/wr-cargotest-macos-build.sh'
|
||||
- 'taskcluster/scripts/misc/wr-macos-cross-build-setup.sh'
|
||||
|
||||
macos-debug:
|
||||
description: Runs debug-mode WebRender CI tests on a macOS worker
|
||||
worker-type: releng-hardware/gecko-t-osx-1010
|
||||
worker:
|
||||
max-run-time: 3600
|
||||
env:
|
||||
MOZ_FETCHES_DIR: 'checkouts/gecko/gfx/wr'
|
||||
dependencies:
|
||||
webrender-cargotest-macos-build: webrender-cargotest-macos-build
|
||||
fetches:
|
||||
webrender-cargotest-macos-build:
|
||||
- 'cargo-test-binaries.tar.bz2'
|
||||
run:
|
||||
using: run-task
|
||||
command: >-
|
||||
cd $GECKO_PATH/gfx/wr &&
|
||||
mv cargo-test-binaries target &&
|
||||
cd target &&
|
||||
for i in debug/*; do $i; done
|
||||
treeherder:
|
||||
platform: macosx64-qr/debug
|
||||
symbol: WR(cargotest)
|
||||
when:
|
||||
files-changed:
|
||||
- 'gfx/wr/**'
|
||||
|
||||
windows:
|
||||
description: Runs WebRender CI tests on a Windows worker
|
||||
worker-type: aws-provisioner-v1/gecko-t-win10-64
|
||||
|
24
taskcluster/scripts/misc/wr-cargotest-macos-build.sh
Executable file
24
taskcluster/scripts/misc/wr-cargotest-macos-build.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/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
|
Loading…
Reference in New Issue
Block a user