mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-29 02:17:45 -10:00
This adds a new SpiderMonkey taskcluster test task that builds and tests the js/rust crate.
55 lines
1.3 KiB
Bash
Executable File
55 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -xe
|
|
|
|
: ${TOOLTOOL_SERVER:=https://tooltool.mozilla-releng.net/}
|
|
: ${SPIDERMONKEY_VARIANT:=plain}
|
|
: ${UPLOAD_DIR:=$HOME/artifacts/}
|
|
: ${WORK:=$HOME/workspace}
|
|
: ${SRCDIR:=$WORK/build/src}
|
|
|
|
mkdir -p $WORK
|
|
cd $WORK
|
|
|
|
# Need to install things from tooltool. Figure out what platform to use.
|
|
|
|
case $(uname -m) in
|
|
i686 | arm )
|
|
BITS=32
|
|
;;
|
|
*)
|
|
BITS=64
|
|
;;
|
|
esac
|
|
|
|
case "$OSTYPE" in
|
|
darwin*)
|
|
PLATFORM_OS=macosx
|
|
;;
|
|
linux-gnu)
|
|
PLATFORM_OS=linux
|
|
;;
|
|
msys)
|
|
PLATFORM_OS=win
|
|
;;
|
|
*)
|
|
echo "Unrecognized OSTYPE '$OSTYPE'" >&2
|
|
PLATFORM_OS=linux
|
|
;;
|
|
esac
|
|
|
|
# Install everything needed for the browser on this platform. Not all of it is
|
|
# necessary for the JS shell, but it's less duplication to share tooltool
|
|
# manifests.
|
|
BROWSER_PLATFORM=$PLATFORM_OS$BITS
|
|
|
|
: ${TOOLTOOL_CHECKOUT:=$WORK}
|
|
export TOOLTOOL_CHECKOUT
|
|
|
|
(cd $TOOLTOOL_CHECKOUT && ${SRCDIR}/mach artifact toolchain -v --tooltool-url $TOOLTOOL_SERVER --tooltool-manifest $SRCDIR/$TOOLTOOL_MANIFEST ${TOOLTOOL_CACHE:+ --cache-dir $TOOLTOOL_CACHE}${MOZ_TOOLCHAINS:+ ${MOZ_TOOLCHAINS}})
|
|
|
|
# Add all the tooltool binaries to our $PATH.
|
|
for bin in ls $TOOLTOOL_CHECKOUT/*/bin; do
|
|
export PATH="$bin:$PATH"
|
|
done
|