Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -e |
| 3 | |
| 4 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 5 | source "$JDIR"/util.sh |
| 6 | |
Davide Pesavento | 0934888 | 2016-09-17 02:39:44 +0200 | [diff] [blame] | 7 | set -x |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 8 | |
Davide Pesavento | 0934888 | 2016-09-17 02:39:44 +0200 | [diff] [blame] | 9 | if has OSX $NODE_LABELS; then |
Davide Pesavento | b1a2a4b | 2017-06-08 19:37:21 -0400 | [diff] [blame] | 10 | FORMULAE=(boost pkg-config cryptopp openssl) |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 11 | brew update |
Davide Pesavento | b1a2a4b | 2017-06-08 19:37:21 -0400 | [diff] [blame] | 12 | 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 Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 22 | brew cleanup |
| 23 | fi |
| 24 | |
| 25 | if has Ubuntu $NODE_LABELS; then |
Davide Pesavento | e11c8d8 | 2016-04-16 14:32:07 +0200 | [diff] [blame] | 26 | sudo apt-get -qq update |
| 27 | sudo apt-get -qq install build-essential pkg-config libboost-all-dev \ |
Alexander Afanasyev | 67cb75c | 2016-06-15 12:34:58 -0700 | [diff] [blame] | 28 | libcrypto++-dev libsqlite3-dev libssl-dev |
Davide Pesavento | c44cc83 | 2017-04-03 22:11:48 -0400 | [diff] [blame] | 29 | |
| 30 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
| 31 | sudo apt-get -qq install lcov libgd-perl python-setuptools |
| 32 | sudo easy_install --upgrade gcovr |
| 33 | fi |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 34 | fi |