Commit 280126df authored by Nick Alexander's avatar Nick Alexander
Browse files

Bug 1564256 - Part 2: Produce browsertime.zip in a toolchain task. r=mshal

In browsertime.zip we should have:

browsertime/
  package.json
  package-lock.json
  node_modules/
    .bin/
      browsertime -> ../browsertime/bin/browsertime.js
    browsertime/
      ...

The idea is that we'll fetch browsertime.zip in a generic-worker
environment and be able to run Node.js from within the top level
browsertime/ directory.

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

--HG--
extra : moz-landing-system : lando
parent ceec08a8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -63,3 +63,7 @@ path:modules/libmar/
path:other-licenses/bsdiff/
path:other-licenses/nsis/Contrib/CityHash/cityhash/
path:toolkit/mozapps/update/updater

# for the browsertime toolchain task
path:tools/browsertime/mach_commands.py
path:tools/browsertime/package.json
+17 −0
Original line number Diff line number Diff line
@@ -129,6 +129,23 @@ linux64-custom-v8:
        ]
        toolchain-artifact: public/build/d8.zip

browsertime:
    description: "npm install browsertime node_modules"
    treeherder:
        symbol: TL(browsertime)
    worker:
        env:
            NODEJS: "/builds/worker/workspace/build/src/node/bin/node"
    run:
        script: browsertime.sh
        sparse-profile: null
        resources:
            - 'tools/browsertime/package.json'
            - 'tools/browsertime/mach_commands.py'
        toolchain-artifact: public/build/browsertime.zip
    toolchains:
        - linux64-node

wrench-deps:
    description: "Downloads all the crates needed for building wrench"
    treeherder:
+27 −0
Original line number Diff line number Diff line
#!/bin/bash -vex

set -x -e

echo "running as" $(id)

: WORKSPACE ${WORKSPACE:=/builds/worker/workspace}

set -v

cd $WORKSPACE/build/src

# Download toolchain artifacts.
. taskcluster/scripts/misc/tooltool-download.sh

# We can't set the path to npm directly, but it's sibling to NODEJS.
export PATH=$PATH:`dirname $NODEJS`

# We don't install ImageMagick, so this will fail.  Continue.
./mach browsertime --setup || true

# We have tools/browsertime/{package.json,node_modules,...} and want
# browsertime/{package.json,node_modules}.  ZIP because generic-worker
# doesn't support .tar.xz.
mkdir -p  /builds/worker/artifacts
cd tools
zip -r /builds/worker/artifacts/browsertime.zip browsertime
+1 −1
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ class MachBrowsertime(MachCommandBase):
        sys.path.append(mozpath.join(self.topsrcdir, 'tools', 'lint', 'eslint'))
        import setup_helper

        if host_platform().startswith('linux'):
        if not os.environ.get('MOZ_AUTOMATION') and host_platform().startswith('linux'):
            # On Linux ImageMagick needs to be installed manually, and `mach bootstrap` doesn't
            # do that (yet).  Provide some guidance.
            try: