mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 11:58:55 +00:00
Bug 1273917 - Create the SM(pkg) build for taskcluster; r=sfink
--HG-- rename : testing/taskcluster/scripts/builder/build-sm.sh => testing/taskcluster/scripts/builder/sm-tooltool-config.sh
This commit is contained in:
parent
708b1db5db
commit
64dc3b503f
@ -248,7 +248,6 @@ ifneq (,$(TAR))
|
||||
source-package:
|
||||
SRCDIR=$(srcdir) \
|
||||
DIST=$(DIST) \
|
||||
MAKE=$(MAKE) \
|
||||
MKDIR=$(MKDIR) \
|
||||
TAR=$(TAR) \
|
||||
MOZJS_MAJOR_VERSION=$(MOZJS_MAJOR_VERSION) \
|
||||
|
@ -182,7 +182,8 @@ fi
|
||||
RUN_JSTESTS=true
|
||||
RUN_JITTEST=true
|
||||
RUN_JSAPITESTS=true
|
||||
RUN_CHECK_STYLE_ONLY=false
|
||||
: ${RUN_CHECK_STYLE_ONLY:=false}
|
||||
: ${RUN_MAKE_CHECKS:=true}
|
||||
|
||||
PARENT=$$
|
||||
|
||||
@ -233,10 +234,12 @@ elif [[ "$VARIANT" = arm64* ]]; then
|
||||
export JITTEST_EXTRA_ARGS="--jitflags=none --args=--baseline-eager -x ion/ -x asm.js/"
|
||||
fi
|
||||
|
||||
if $RUN_CHECK_STYLE_ONLY; then
|
||||
$COMMAND_PREFIX $MAKE check-style || exit 1
|
||||
else
|
||||
$COMMAND_PREFIX $MAKE check || exit 1
|
||||
if $RUN_MAKE_CHECKS; then
|
||||
if $RUN_CHECK_STYLE_ONLY; then
|
||||
$COMMAND_PREFIX $MAKE check-style || exit 1
|
||||
else
|
||||
$COMMAND_PREFIX $MAKE check || exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
RESULT=0
|
||||
|
@ -5,12 +5,14 @@
|
||||
# broken.
|
||||
set -e
|
||||
|
||||
: ${MAKE:=make}
|
||||
: ${MKDIR:=mkdir}
|
||||
: ${TAR:=tar}
|
||||
: ${SRCDIR:=$(cd $(dirname $0); pwd 2>/dev/null)}
|
||||
: ${MOZJS_NAME:=mozjs}
|
||||
: ${DIST:=/tmp/mozjs-src-pkg}
|
||||
# The place to gather files to be added to the tarball.
|
||||
: ${STAGING:=/tmp/mozjs-src-pkg}
|
||||
# The place to put the resulting tarball.
|
||||
: ${DIST:=/tmp}
|
||||
|
||||
if [[ -f "$SRCDIR/../../config/milestone.txt" ]]; then
|
||||
MILESTONE="$(tail -1 $SRCDIR/../../config/milestone.txt)"
|
||||
@ -21,9 +23,10 @@ if [[ -f "$SRCDIR/../../config/milestone.txt" ]]; then
|
||||
fi
|
||||
|
||||
cmd=${1:-build}
|
||||
pkg="${MOZJS_NAME}-${MOZJS_MAJOR_VERSION}.${MOZJS_MINOR_VERSION}.${MOZJS_PATCH_VERSION:-${MOZJS_ALPHA:-0}}.tar.bz2"
|
||||
pkgpath=${pkg%.tar*}
|
||||
tgtpath=${DIST}/${pkgpath}
|
||||
version="${MOZJS_NAME}-${MOZJS_MAJOR_VERSION}.${MOZJS_MINOR_VERSION}.${MOZJS_PATCH_VERSION:-${MOZJS_ALPHA:-0}}"
|
||||
tgtpath=${STAGING}/${version}
|
||||
pkg="${version}.tar.bz2"
|
||||
pkgpath="${DIST}/${pkg}"
|
||||
taropts="-jcf"
|
||||
|
||||
# need these environment vars:
|
||||
@ -31,6 +34,7 @@ echo "Environment:"
|
||||
echo " MAKE = $MAKE"
|
||||
echo " MKDIR = $MKDIR"
|
||||
echo " TAR = $TAR"
|
||||
echo " STAGING = $STAGING"
|
||||
echo " DIST = $DIST"
|
||||
echo " SRCDIR = $SRCDIR"
|
||||
echo " MOZJS_NAME = $MOZJS_NAME"
|
||||
@ -44,25 +48,34 @@ TOPSRCDIR=${SRCDIR}/../..
|
||||
|
||||
case $cmd in
|
||||
"clean")
|
||||
echo "Cleaning ${pkg} and ${tgtpath} ..."
|
||||
rm -rf ${pkg} ${tgtpath}
|
||||
echo "Cleaning ${pkgpath} and ${tgtpath} ..."
|
||||
rm -rf ${pkgpath} ${tgtpath}
|
||||
;;
|
||||
"build")
|
||||
echo -n "Press enter to build $pkg> "
|
||||
read
|
||||
# Make sure that everything copied here is kept in sync with
|
||||
# `testing/taskcluster/tasks/branches/base_jobs.yml`!
|
||||
|
||||
# Ensure that the configure script is newer than the configure.in script.
|
||||
if [ ${SRCDIR}/configure.in -nt ${SRCDIR}/configure ]; then
|
||||
echo "error: js/src/configure is out of date. Please regenerate before packaging." >&2
|
||||
if [ -e ${tgtpath}/js/src/Makefile ]; then
|
||||
echo "error: found js/src/Makefile. Please clean before packaging." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Packaging source tarball ${pkg}..."
|
||||
echo "Staging source tarball in ${tgtpath}..."
|
||||
if [ -d ${tgtpath} ]; then
|
||||
echo "WARNING - dist tree ${tgtpath} already exists!"
|
||||
fi
|
||||
${MKDIR} -p ${tgtpath}/js/src
|
||||
|
||||
cp -pPR ${TOPSRCDIR}/configure.py \
|
||||
${TOPSRCDIR}/moz.configure \
|
||||
${TOPSRCDIR}/test.mozbuild \
|
||||
${tgtpath}
|
||||
|
||||
cp -pPR ${TOPSRCDIR}/js/moz.configure ${tgtpath}/js
|
||||
|
||||
mkdir -p ${tgtpath}/taskcluster
|
||||
cp -pPR ${TOPSRCDIR}/taskcluster/moz.build ${tgtpath}/taskcluster/
|
||||
|
||||
# copy the embedded icu
|
||||
${MKDIR} -p ${tgtpath}/intl
|
||||
cp -pPR ${TOPSRCDIR}/intl/icu ${tgtpath}/intl
|
||||
@ -80,14 +93,9 @@ case $cmd in
|
||||
cp -pPR ${TOPSRCDIR}/mfbt ${tgtpath}
|
||||
cp -pPR ${SRCDIR}/../public ${tgtpath}/js
|
||||
cp -pPR ${SRCDIR}/../examples ${tgtpath}/js
|
||||
find ${SRCDIR} -mindepth 1 -maxdepth 1 -not -path ${DIST} -a -not -name ${pkg} \
|
||||
find ${SRCDIR} -mindepth 1 -maxdepth 1 -not -path ${STAGING} -a -not -name ${pkg} \
|
||||
-exec cp -pPR {} ${tgtpath}/js/src \;
|
||||
|
||||
# distclean if necessary
|
||||
if [ -e ${tgtpath}/js/src/Makefile ]; then
|
||||
${MAKE} -C ${tgtpath}/js/src distclean
|
||||
fi
|
||||
|
||||
cp -pPR \
|
||||
${TOPSRCDIR}/python \
|
||||
${tgtpath}
|
||||
@ -104,6 +112,9 @@ case $cmd in
|
||||
${TOPSRCDIR}/testing/mozbase \
|
||||
${tgtpath}/testing
|
||||
${MKDIR} -p ${tgtpath}/modules
|
||||
cp -pPR \
|
||||
${TOPSRCDIR}/modules/fdlibm \
|
||||
${tgtpath}/modules/fdlibm
|
||||
cp -pPR \
|
||||
${TOPSRCDIR}/modules/zlib/src/ \
|
||||
${tgtpath}/modules/zlib
|
||||
@ -137,8 +148,8 @@ case $cmd in
|
||||
find ${tgtpath} -type f -name "*.pyc" -o -name "*.pyo" |xargs rm -f
|
||||
|
||||
# copy or create INSTALL
|
||||
if [ -e ${DIST}/INSTALL ]; then
|
||||
cp ${DIST}/INSTALL ${tgtpath}
|
||||
if [ -e ${STAGING}/INSTALL ]; then
|
||||
cp ${STAGING}/INSTALL ${tgtpath}
|
||||
else
|
||||
cat <<INSTALL_EOF >${tgtpath}/INSTALL
|
||||
Full build documentation for SpiderMonkey is hosted on MDN:
|
||||
@ -158,8 +169,8 @@ INSTALL_EOF
|
||||
fi
|
||||
|
||||
# copy or create README
|
||||
if [ -e ${DIST}/README ]; then
|
||||
cp ${DIST}/README ${tgtpath}
|
||||
if [ -e ${STAGING}/README ]; then
|
||||
cp ${STAGING}/README ${tgtpath}
|
||||
else
|
||||
cat <<README_EOF >${tgtpath}/README
|
||||
This directory contains SpiderMonkey ${MOZJS_MAJOR_VERSION}.
|
||||
@ -180,16 +191,16 @@ README_EOF
|
||||
cp ${TOPSRCDIR}/LICENSE ${tgtpath}/
|
||||
fi
|
||||
|
||||
# copy patches dir, if it currently exists in DIST
|
||||
if [ -d ${DIST}/patches ]; then
|
||||
cp -pPR ${DIST}/patches ${tgtpath}
|
||||
# copy patches dir, if it currently exists in STAGING
|
||||
if [ -d ${STAGING}/patches ]; then
|
||||
cp -pPR ${STAGING}/patches ${tgtpath}
|
||||
elif [ -d ${TOPSRCDIR}/patches ]; then
|
||||
cp -pPR ${TOPSRCDIR}/patches ${tgtpath}
|
||||
fi
|
||||
|
||||
# Roll the tarball
|
||||
${TAR} $taropts ${DIST}/../${pkg} -C ${DIST} ${pkgpath}
|
||||
echo "Wrote $(cd ${DIST}/..; echo $PWD)/${pkg}"
|
||||
echo "Packaging source tarball at ${pkgpath}..."
|
||||
${TAR} $taropts ${pkgpath} -C ${STAGING} ${version}
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognized command: $cmd"
|
||||
|
26
testing/taskcluster/scripts/builder/build-sm-package.sh
Executable file
26
testing/taskcluster/scripts/builder/build-sm-package.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
source $(dirname $0)/sm-tooltool-config.sh
|
||||
|
||||
mkdir -p $UPLOAD_DIR
|
||||
|
||||
# Package up the sources into the release tarball.
|
||||
AUTOMATION=1 DIST=$UPLOAD_DIR $SRCDIR/js/src/make-source-package.sh
|
||||
|
||||
# Extract the tarball into a new directory in the workspace.
|
||||
|
||||
PACKAGE_DIR=$WORK/sm-package
|
||||
mkdir -p $PACKAGE_DIR
|
||||
pushd $PACKAGE_DIR
|
||||
|
||||
tar -xjvf $UPLOAD_DIR/mozjs-*.tar.bz2
|
||||
|
||||
# Build the freshly extracted, packaged SpiderMonkey.
|
||||
pushd ./mozjs-*/js/src
|
||||
RUN_MAKE_CHECKS=false AUTOMATION=1 ./devtools/automation/autospider.sh $SPIDERMONKEY_VARIANT
|
||||
popd
|
||||
|
||||
# Copy artifacts for upload by TaskCluster
|
||||
cp -rL ./mozjs-*/obj-spider/dist/bin/{js,jsapi-tests,js-gdb.py} $UPLOAD_DIR
|
@ -2,62 +2,7 @@
|
||||
|
||||
set -x
|
||||
|
||||
: ${TOOLTOOL_SERVER:=https://api.pub.build.mozilla.org/tooltool/}
|
||||
: ${TOOLTOOL_REPO:=https://git.mozilla.org/build/tooltool.git}
|
||||
: ${TOOLTOOL_REV:=master}
|
||||
: ${SPIDERMONKEY_VARIANT:=plain}
|
||||
: ${UPLOAD_DIR:=$HOME/artifacts/}
|
||||
: ${WORK:=$HOME/workspace}
|
||||
: ${SRCDIR:=$WORK/build/src}
|
||||
|
||||
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_MANIFEST="$SRCDIR/browser/config/tooltool-manifests/$BROWSER_PLATFORM/releng.manifest"
|
||||
|
||||
tc-vcs checkout $WORK/tooltool $TOOLTOOL_REPO $TOOLTOOL_REPO $TOOLTOOL_REV
|
||||
(cd $WORK && python tooltool/tooltool.py --url $TOOLTOOL_SERVER -m $TOOLTOOL_MANIFEST fetch ${TOOLTOOL_CACHE:+ -c $TOOLTOOL_CACHE})
|
||||
|
||||
# Point to the appropriate compiler, assuming taskcluster will one day run on non-Linux OSes.
|
||||
case "$PLATFORM_OS" in
|
||||
linux)
|
||||
export PATH="$WORK/gcc/bin":$PATH
|
||||
export GCCDIR="$WORK/gcc"
|
||||
;;
|
||||
macosx)
|
||||
export PATH="$WORK/clang/bin":$PATH
|
||||
;;
|
||||
esac
|
||||
source $(dirname $0)/sm-tooltool-config.sh
|
||||
|
||||
# Run the script
|
||||
AUTOMATION=1 $SRCDIR/js/src/devtools/automation/autospider.sh $SPIDERMONKEY_VARIANT
|
||||
|
61
testing/taskcluster/scripts/builder/sm-tooltool-config.sh
Executable file
61
testing/taskcluster/scripts/builder/sm-tooltool-config.sh
Executable file
@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
: ${TOOLTOOL_SERVER:=https://api.pub.build.mozilla.org/tooltool/}
|
||||
: ${TOOLTOOL_REPO:=https://git.mozilla.org/build/tooltool.git}
|
||||
: ${TOOLTOOL_REV:=master}
|
||||
: ${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_MANIFEST="$SRCDIR/browser/config/tooltool-manifests/$BROWSER_PLATFORM/releng.manifest"
|
||||
|
||||
tc-vcs checkout $WORK/tooltool $TOOLTOOL_REPO $TOOLTOOL_REPO $TOOLTOOL_REV
|
||||
(cd $WORK && python tooltool/tooltool.py --url $TOOLTOOL_SERVER -m $TOOLTOOL_MANIFEST fetch ${TOOLTOOL_CACHE:+ -c $TOOLTOOL_CACHE})
|
||||
|
||||
# Point to the appropriate compiler, assuming taskcluster will one day run on non-Linux OSes.
|
||||
case "$PLATFORM_OS" in
|
||||
linux)
|
||||
export PATH="$WORK/gcc/bin":$PATH
|
||||
export GCCDIR="$WORK/gcc"
|
||||
;;
|
||||
macosx)
|
||||
export PATH="$WORK/clang/bin":$PATH
|
||||
;;
|
||||
esac
|
@ -29,6 +29,7 @@ builds:
|
||||
- sm-arm-sim
|
||||
- sm-compacting
|
||||
- sm-rootanalysis
|
||||
- sm-package
|
||||
types:
|
||||
opt:
|
||||
task: tasks/builds/opt_linux64.yml
|
||||
@ -150,6 +151,38 @@ builds:
|
||||
file_patterns:
|
||||
- js/public/**
|
||||
- js/src/**
|
||||
sm-package:
|
||||
platforms:
|
||||
- Linux64
|
||||
types:
|
||||
opt:
|
||||
task: tasks/builds/sm_package.yml
|
||||
when:
|
||||
# Make sure this list stays in sync with the files and directories copied
|
||||
# by `js/src/make-source-package.sh`!
|
||||
file_patterns:
|
||||
- build/**
|
||||
- configure.py
|
||||
- dom/bindings/**
|
||||
- intl/icu/**
|
||||
- js/moz.configure
|
||||
- js/public/**
|
||||
- js/src/**
|
||||
- layout/tools/reftest/reftest/**
|
||||
- media/webrtc/trunk/tools/gyp/**
|
||||
- memory/**
|
||||
- mfbt/**
|
||||
- modules/fdlibm/**
|
||||
- modules/zlib/src/**
|
||||
- mozglue/**
|
||||
- moz.configure
|
||||
- nsprpub/**
|
||||
- python/**
|
||||
- taskcluster/moz.build
|
||||
- testing/mozbase/**
|
||||
- test.mozbuild
|
||||
- toolkit/mozapps/installer/package-name.mk
|
||||
- toolkit/mozapps/installer/upload-files.mk
|
||||
sm-rootanalysis:
|
||||
platforms:
|
||||
- Linux64
|
||||
|
@ -1,5 +1,5 @@
|
||||
$inherits:
|
||||
from: 'tasks/builds/sm_base.yml'
|
||||
from: 'tasks/builds/sm_variant_base.yml'
|
||||
variables:
|
||||
build_name: 'sm-arm64-sim'
|
||||
build_type: 'debug'
|
||||
|
@ -1,5 +1,5 @@
|
||||
$inherits:
|
||||
from: 'tasks/builds/sm_base.yml'
|
||||
from: 'tasks/builds/sm_variant_base.yml'
|
||||
variables:
|
||||
build_name: 'sm-arm-sim'
|
||||
build_type: 'debug'
|
||||
|
@ -1,5 +1,5 @@
|
||||
$inherits:
|
||||
from: 'tasks/builds/sm_base.yml'
|
||||
from: 'tasks/builds/sm_variant_base.yml'
|
||||
variables:
|
||||
build_name: 'sm-arm-sim-osx'
|
||||
build_type: 'debug'
|
||||
|
@ -23,8 +23,6 @@ task:
|
||||
|
||||
maxRunTime: 36000
|
||||
|
||||
command: ["/bin/bash", "-c", "cd /home/worker/ && ./bin/checkout-sources.sh && ./workspace/build/src/testing/taskcluster/scripts/builder/build-sm.sh" ]
|
||||
|
||||
extra:
|
||||
treeherderEnv:
|
||||
- staging
|
||||
|
@ -1,5 +1,5 @@
|
||||
$inherits:
|
||||
from: 'tasks/builds/sm_base.yml'
|
||||
from: 'tasks/builds/sm_variant_base.yml'
|
||||
variables:
|
||||
build_name: 'sm-compacting'
|
||||
build_type: 'debug'
|
||||
|
@ -1,5 +1,5 @@
|
||||
$inherits:
|
||||
from: 'tasks/builds/sm_base.yml'
|
||||
from: 'tasks/builds/sm_variant_base.yml'
|
||||
variables:
|
||||
build_name: 'sm-nonunified'
|
||||
build_type: 'debug'
|
||||
|
18
testing/taskcluster/tasks/builds/sm_package.yml
Normal file
18
testing/taskcluster/tasks/builds/sm_package.yml
Normal file
@ -0,0 +1,18 @@
|
||||
$inherits:
|
||||
from: 'tasks/builds/sm_base.yml'
|
||||
variables:
|
||||
build_name: 'sm-package'
|
||||
build_type: 'opt'
|
||||
task:
|
||||
payload:
|
||||
env:
|
||||
SPIDERMONKEY_VARIANT: 'plain'
|
||||
|
||||
command: [ "/bin/bash", "-c", "cd /home/worker/ && ./bin/checkout-sources.sh && ./workspace/build/src/testing/taskcluster/scripts/builder/build-sm-package.sh" ]
|
||||
|
||||
metadata:
|
||||
name: '[TC] Spidermonkey Package'
|
||||
description: 'Spidermonkey Package'
|
||||
extra:
|
||||
treeherder:
|
||||
symbol: pkg
|
@ -1,5 +1,5 @@
|
||||
$inherits:
|
||||
from: 'tasks/builds/sm_base.yml'
|
||||
from: 'tasks/builds/sm_variant_base.yml'
|
||||
variables:
|
||||
build_name: 'sm-plain'
|
||||
build_type: 'opt'
|
||||
|
@ -1,5 +1,5 @@
|
||||
$inherits:
|
||||
from: 'tasks/builds/sm_base.yml'
|
||||
from: 'tasks/builds/sm_variant_base.yml'
|
||||
variables:
|
||||
build_name: 'sm-plaindebug'
|
||||
build_type: 'debug'
|
||||
|
@ -1,5 +1,5 @@
|
||||
$inherits:
|
||||
from: 'tasks/builds/sm_base.yml'
|
||||
from: 'tasks/builds/sm_variant_base.yml'
|
||||
variables:
|
||||
build_name: 'sm-rootanalysis'
|
||||
build_type: 'debug'
|
||||
|
4
testing/taskcluster/tasks/builds/sm_variant_base.yml
Normal file
4
testing/taskcluster/tasks/builds/sm_variant_base.yml
Normal file
@ -0,0 +1,4 @@
|
||||
$inherits:
|
||||
from: 'tasks/builds/sm_base.yml'
|
||||
task:
|
||||
command: ["/bin/bash", "-c", "cd /home/worker/ && ./bin/checkout-sources.sh && ./workspace/build/src/testing/taskcluster/scripts/builder/build-sm.sh" ]
|
Loading…
x
Reference in New Issue
Block a user