blob: eb4e968f2f2434e602b8744101acab305d75af51 [file] [log] [blame]
Alexander Afanasyevb81cff92015-07-09 09:45:09 +08001#!/usr/bin/env bash
2set -e
3
4JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
6
Davide Pesaventoe0edc4c2016-09-13 18:29:52 +00007set -x
Alexander Afanasyevb81cff92015-07-09 09:45:09 +08008
Davide Pesaventoe0edc4c2016-09-13 18:29:52 +00009if has OSX $NODE_LABELS; then
Davide Pesavento7744a4a2017-06-20 21:29:56 -040010 FORMULAE=(boost pkg-config cryptopp openssl)
Alexander Afanasyevb81cff92015-07-09 09:45:09 +080011 brew update
Davide Pesavento7744a4a2017-06-20 21:29:56 -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 Afanasyevb81cff92015-07-09 09:45:09 +080022 brew cleanup
23fi
24
25if has Ubuntu $NODE_LABELS; then
Davide Pesaventocc7bee72016-04-22 02:21:13 +020026 sudo apt-get -qq update
27 sudo apt-get -qq install build-essential pkg-config libboost-all-dev \
Davide Pesavento231ddd72016-09-02 22:20:00 +000028 libcrypto++-dev libsqlite3-dev libssl-dev \
29 libpcap-dev
Davide Pesavento8d61c032017-04-29 20:06:33 -040030
31 if [[ $JOB_NAME == *"code-coverage" ]]; then
32 sudo apt-get -qq install lcov libgd-perl python-setuptools
33 sudo easy_install --upgrade gcovr
34 fi
Alexander Afanasyevb81cff92015-07-09 09:45:09 +080035fi