Bug 1478995 - Add node toolchain repack tasks for linux, windows, and mac, r=gps

MozReview-Commit-ID: 3JEghnqGdun

--HG--
extra : rebase_source : 7468ee9f27ba8e6df208b317c0c944345e2d27ad
This commit is contained in:
Nick Alexander 2018-05-29 17:50:05 -07:00
parent bcaadeca3f
commit 8568d6adb5
4 changed files with 105 additions and 0 deletions

View File

@ -361,6 +361,23 @@ linux64-libdmg:
script: build-libdmg-hfsplus.sh
toolchain-artifact: public/build/dmg.tar.xz
linux64-node:
description: "Node repack toolchain build"
treeherder:
kind: build
platform: toolchains/opt
symbol: TL(node)
tier: 1
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
docker-image: {in-tree: toolchain-build}
max-run-time: 1800
run:
using: toolchain-script
script: repack-node.sh
arguments: ['linux64']
toolchain-artifact: public/build/node.tar.xz
linux64-android-sdk-linux-repack:
description: "Android SDK (Linux) repack toolchain build"
treeherder:

View File

@ -111,3 +111,21 @@ macosx64-gn:
toolchains:
- linux64-cctools-port
- linux64-clang-6
- linux64-node
macosx64-node:
description: "Node repack toolchain build"
treeherder:
kind: build
platform: toolchains/opt
symbol: TM(node)
tier: 1
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
docker-image: {in-tree: toolchain-build}
max-run-time: 1800
run:
using: toolchain-script
script: repack-node.sh
arguments: ['macosx64']
toolchain-artifact: public/build/node.tar.xz

View File

@ -168,6 +168,23 @@ win64-rust-nightly:
]
toolchain-artifact: public/build/rustc.tar.bz2
win64-node:
description: "Node repack toolchain build"
treeherder:
kind: build
platform: toolchains/opt
symbol: TW64(node)
tier: 1
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
docker-image: {in-tree: toolchain-build}
max-run-time: 1800
run:
using: toolchain-script
script: repack-node.sh
arguments: ['win64']
toolchain-artifact: public/build/node.tar.bz2
win32-rust-1.28:
description: "rust repack"
treeherder:

View File

@ -0,0 +1,53 @@
#!/bin/bash
set -x -e -v
# This script is for repacking Node (and NPM) from nodejs.org.
WORKSPACE=$HOME/workspace
UPLOAD_DIR=$HOME/artifacts
SUFFIX=tar.xz
UNARCHIVE="tar xaf"
REPACK_TAR_COMPRESSION_SWITCH=J
REPACK_SUFFIX=tar.xz
case "$1" in
linux64)
ARCH=linux-x64
# From https://nodejs.org/dist/v8.11.3/SHASUMS256.txt.asc
SHA256SUM=08e2fcfea66746bd966ea3a89f26851f1238d96f86c33eaf6274f67fce58421a
;;
macosx64)
ARCH=darwin-x64
# From https://nodejs.org/dist/v8.11.3/SHASUMS256.txt.asc
SHA256SUM=7eac0bf398cb6ecf9f84dfc577ee84eee3d930f7a54b7e50f56d1a358b528792
;;
win64)
ARCH=win-x64
# From https://nodejs.org/dist/v8.11.3/SHASUMS256.txt.asc
SHA256SUM=91b779def1b21dcd1def7fc9671a869a1e2f989952e76fdc08a5d73570075f31
SUFFIX=zip
UNARCHIVE=unzip
REPACK_TAR_COMPRESSION_SWITCH=j
REPACK_SUFFIX=tar.bz2
;;
esac
VERSION=8.11.3
# From https://nodejs.org/en/download/
URL=https://nodejs.org/dist/v$VERSION/node-v$VERSION-$ARCH.$SUFFIX
ARCHIVE=node-v$VERSION-$ARCH.$SUFFIX
DIR=node-v$VERSION
mkdir -p $UPLOAD_DIR
cd $WORKSPACE
wget --progress=dot:mega $URL
# shasum is available on both Linux and Windows builders, but on
# Windows, reading from stdin doesn't work as expected.
echo "$SHA256SUM $ARCHIVE" > node.txt
shasum --algorithm 256 --check node.txt
$UNARCHIVE $ARCHIVE
mv node-v$VERSION-$ARCH node
tar c${REPACK_TAR_COMPRESSION_SWITCH}f $UPLOAD_DIR/node.$REPACK_SUFFIX node