blob: b5671bc1e3a8b4b5dceeb78b568b0cb9e4f2b0a6 [file] [log] [blame]
Alexander Afanasyevf3192eb2016-12-19 17:11:20 -08001#!/usr/bin/env bash
Davide Pesaventoa0546db2020-04-01 19:18:04 -04002set -ex
Alexander Afanasyevf3192eb2016-12-19 17:11:20 -08003
4if has OSX $NODE_LABELS; then
Davide Pesavento7ef57e22017-10-28 16:58:43 -04005 FORMULAE=(boost openssl pkg-config)
Davide Pesaventoa0546db2020-04-01 19:18:04 -04006 if has OSX-10.13 $NODE_LABELS || has OSX-10.14 $NODE_LABELS; then
7 FORMULAE+=(python)
Davide Pesavento7ef57e22017-10-28 16:58:43 -04008 fi
Alexander Afanasyevf3192eb2016-12-19 17:11:20 -08009
Davide Pesaventoa0546db2020-04-01 19:18:04 -040010 if [[ -n $TRAVIS ]]; then
11 # Travis images come with a large number of pre-installed
12 # brew packages, don't waste time upgrading all of them
13 brew list --versions "${FORMULAE[@]}" || brew update
14 for FORMULA in "${FORMULAE[@]}"; do
15 brew list --versions "$FORMULA" || brew install "$FORMULA"
16 done
17 # Ensure /usr/local/opt/openssl exists
18 brew reinstall openssl
19 else
20 brew update
21 brew upgrade
22 brew install "${FORMULAE[@]}"
23 brew cleanup
24 fi
25
26elif has Ubuntu $NODE_LABELS; then
Alexander Afanasyevf3192eb2016-12-19 17:11:20 -080027 sudo apt-get -qq update
Davide Pesaventoa0546db2020-04-01 19:18:04 -040028 sudo apt-get -qy install g++ pkg-config python3-minimal \
29 libboost-all-dev libssl-dev libsqlite3-dev
Alexander Afanasyevf3192eb2016-12-19 17:11:20 -080030fi