blob: c69f4929d9951372e0abfdeed47a45f706b949ee [file] [log] [blame]
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -04001#!/usr/bin/env bash
2set -e
3
4JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
6
Davide Pesavento09348882016-09-17 02:39:44 +02007set -x
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -04008
Davide Pesavento09348882016-09-17 02:39:44 +02009if has OSX $NODE_LABELS; then
Davide Pesaventob1a2a4b2017-06-08 19:37:21 -040010 FORMULAE=(boost pkg-config cryptopp openssl)
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -040011 brew update
Davide Pesaventob1a2a4b2017-06-08 19:37:21 -040012 if [[ -n $TRAVIS ]]; then
13 # travis images come with a large number of brew packages
14 # pre-installed, don't waste time upgrading all of them
15 for FORMULA in "${FORMULAE[@]}"; do
16 brew outdated $FORMULA || brew upgrade $FORMULA
17 done
18 else
19 brew upgrade
20 fi
21 brew install "${FORMULAE[@]}"
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -040022 brew cleanup
23fi
24
25if has Ubuntu $NODE_LABELS; then
Davide Pesaventoe11c8d82016-04-16 14:32:07 +020026 sudo apt-get -qq update
27 sudo apt-get -qq install build-essential pkg-config libboost-all-dev \
Alexander Afanasyev67cb75c2016-06-15 12:34:58 -070028 libcrypto++-dev libsqlite3-dev libssl-dev
Davide Pesaventoc44cc832017-04-03 22:11:48 -040029
30 if [[ $JOB_NAME == *"code-coverage" ]]; then
31 sudo apt-get -qq install lcov libgd-perl python-setuptools
32 sudo easy_install --upgrade gcovr
33 fi
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -040034fi