blob: 56eeab318e38d1ce0a2d8bf6e62b4c327162132a [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
Davide Pesavento71430482017-06-08 20:06:40 -040027 sudo apt-get -qy 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
Davide Pesavento71430482017-06-08 20:06:40 -040031 sudo apt-get -qy install lcov libgd-perl python-setuptools
Davide Pesaventoc44cc832017-04-03 22:11:48 -040032 sudo easy_install --upgrade gcovr
33 fi
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -040034fi