blob: eb4e968f2f2434e602b8744101acab305d75af51 [file] [log] [blame]
Junxiao Shi439d9722015-03-20 15:08:44 -07001#!/usr/bin/env bash
2set -e
3
4JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
6
Davide Pesavento956ac312016-09-20 19:11:30 +02007set -x
8
Junxiao Shi439d9722015-03-20 15:08:44 -07009if has OSX $NODE_LABELS; then
Davide Pesavento1eecc172017-06-24 14:30:42 -040010 FORMULAE=(boost pkg-config cryptopp openssl)
Junxiao Shi439d9722015-03-20 15:08:44 -070011 brew update
Davide Pesavento1eecc172017-06-24 14:30:42 -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[@]}"
Junxiao Shi439d9722015-03-20 15:08:44 -070022 brew cleanup
23fi
24
25if has Ubuntu $NODE_LABELS; then
Davide Pesavento0e8edde2016-05-03 18:08:39 +020026 sudo apt-get -qq update
27 sudo apt-get -qq install build-essential pkg-config libboost-all-dev \
Davide Pesavento956ac312016-09-20 19:11:30 +020028 libcrypto++-dev libsqlite3-dev libssl-dev \
29 libpcap-dev
Davide Pesavento931dfe82017-04-29 20:33:45 -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
Junxiao Shi439d9722015-03-20 15:08:44 -070035fi