blob: 84c8ae16c9410527dc57303a612038d512b716d5 [file] [log] [blame]
Alexander Afanasyevc7c99002015-10-09 17:27:30 -07001#!/usr/bin/env bash
2set -e
3
4JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
6
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -08007set -x
Alexander Afanasyevc7c99002015-10-09 17:27:30 -07008
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -08009if has OSX $NODE_LABELS; then
Davide Pesavento4a315b32018-11-24 14:32:19 -050010 FORMULAE=(boost openssl pkg-config)
Alexander Afanasyevc7c99002015-10-09 17:27:30 -070011 brew update
Davide Pesavento4a315b32018-11-24 14:32:19 -050012 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 Afanasyevc7c99002015-10-09 17:27:30 -070022 brew cleanup
23fi
24
25if has Ubuntu $NODE_LABELS; then
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -080026 sudo apt-get -qq update
Davide Pesavento4a315b32018-11-24 14:32:19 -050027 sudo apt-get -qy install build-essential pkg-config libboost-all-dev \
Davide Pesavento90034832018-05-30 10:10:31 -040028 libsqlite3-dev libssl-dev
Davide Pesavento4a315b32018-11-24 14:32:19 -050029
30 if [[ $JOB_NAME == *"code-coverage" ]]; then
31 sudo apt-get -qy install gcovr lcov libgd-perl
32 fi
Alexander Afanasyevc7c99002015-10-09 17:27:30 -070033fi