blob: 79d65a2bcfd1945920dd8a54065abc4faf554682 [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 Pesavento9412d122018-01-02 21:52:09 -050010 FORMULAE=(boost pkg-config)
11 if [[ -n $USE_OPENSSL_1_1 ]]; then
12 FORMULAE+=(openssl@1.1)
13 else
14 FORMULAE+=(openssl)
15 fi
16
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -040017 brew update
Davide Pesaventob1a2a4b2017-06-08 19:37:21 -040018 if [[ -n $TRAVIS ]]; then
19 # travis images come with a large number of brew packages
20 # pre-installed, don't waste time upgrading all of them
21 for FORMULA in "${FORMULAE[@]}"; do
22 brew outdated $FORMULA || brew upgrade $FORMULA
23 done
24 else
25 brew upgrade
26 fi
27 brew install "${FORMULAE[@]}"
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -040028 brew cleanup
29fi
30
31if has Ubuntu $NODE_LABELS; then
Davide Pesaventoe11c8d82016-04-16 14:32:07 +020032 sudo apt-get -qq update
Davide Pesavento71430482017-06-08 20:06:40 -040033 sudo apt-get -qy install build-essential pkg-config libboost-all-dev \
Davide Pesavento006b7ce2017-08-16 00:55:02 -040034 libsqlite3-dev libssl-dev
Davide Pesaventoc44cc832017-04-03 22:11:48 -040035
36 if [[ $JOB_NAME == *"code-coverage" ]]; then
Davide Pesavento71430482017-06-08 20:06:40 -040037 sudo apt-get -qy install lcov libgd-perl python-setuptools
Davide Pesaventoc44cc832017-04-03 22:11:48 -040038 sudo easy_install --upgrade gcovr
39 fi
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -040040fi