blob: 84c8ae16c9410527dc57303a612038d512b716d5 [file] [log] [blame]
Zhiyi Zhang8617a792017-01-17 16:45:56 -08001#!/usr/bin/env bash
2set -e
3
4JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
6
7set -x
8
9if has OSX $NODE_LABELS; then
Davide Pesaventocf9ffe42018-01-21 22:21:53 -050010 FORMULAE=(boost openssl pkg-config)
Zhiyi Zhang8617a792017-01-17 16:45:56 -080011 brew update
Davide Pesaventocf9ffe42018-01-21 22:21:53 -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[@]}"
Zhiyi Zhang8617a792017-01-17 16:45:56 -080022 brew cleanup
23fi
24
25if has Ubuntu $NODE_LABELS; then
26 sudo apt-get -qq update
Davide Pesaventocf9ffe42018-01-21 22:21:53 -050027 sudo apt-get -qy install build-essential pkg-config libboost-all-dev \
28 libsqlite3-dev libssl-dev
29
30 if [[ $JOB_NAME == *"code-coverage" ]]; then
ashiqopu83ad2c02018-11-25 06:49:52 +000031 sudo apt-get -qy install gcovr lcov libgd-perl
Davide Pesaventocf9ffe42018-01-21 22:21:53 -050032 fi
Zhiyi Zhang8617a792017-01-17 16:45:56 -080033fi