build_gyp.sh (1004B)
1 #!/usr/bin/env bash 2 3 . $(dirname "$0")/tools.sh 4 5 set -e 6 7 test -n "${VCS_PATH}" 8 9 # builds write to the source dir (and its parent), so move the source trees to 10 # our workspace from the (cached) checkout dir 11 cp -a "${VCS_PATH}/nspr" "${VCS_PATH}/nss" . 12 13 pushd nspr 14 hg revert --all 15 if [ -f "../nss/nspr.patch" ] && [ "$ALLOW_NSPR_PATCH" = "1" ]; then 16 patch -p1 < ../nss/nspr.patch 17 fi 18 popd 19 20 # Dependencies 21 # For MacOS we have hardware in the CI which doesn't allow us to deploy VMs. 22 # The setup is hardcoded and can't be changed easily. 23 # This part is a helper We install dependencies manually to help. 24 if [ "$(uname)" = "Darwin" ]; then 25 python3 -m pip install --user gyp-next 26 python3 -m pip install --user ninja 27 export PATH="$(python3 -m site --user-base)/bin:${PATH}" 28 fi 29 30 # Build. 31 nss/build.sh -g -v --enable-libpkix -Denable_draft_hpke=1 "$@" 32 33 # Package. 34 if [ "$(uname)" = Linux ]; then 35 ln -s /builds/worker/artifacts artifacts 36 else 37 mkdir -p artifacts 38 fi 39 tar cvfjh artifacts/dist.tar.bz2 dist