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 | 9412d12 | 2018-01-02 21:52:09 -0500 | [diff] [blame^] | 10 | 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 Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 17 | brew update |
Davide Pesavento | b1a2a4b | 2017-06-08 19:37:21 -0400 | [diff] [blame] | 18 | 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 Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 28 | brew cleanup |
| 29 | fi |
| 30 | |
| 31 | if has Ubuntu $NODE_LABELS; then |
Davide Pesavento | e11c8d8 | 2016-04-16 14:32:07 +0200 | [diff] [blame] | 32 | sudo apt-get -qq update |
Davide Pesavento | 7143048 | 2017-06-08 20:06:40 -0400 | [diff] [blame] | 33 | sudo apt-get -qy install build-essential pkg-config libboost-all-dev \ |
Davide Pesavento | 006b7ce | 2017-08-16 00:55:02 -0400 | [diff] [blame] | 34 | libsqlite3-dev libssl-dev |
Davide Pesavento | c44cc83 | 2017-04-03 22:11:48 -0400 | [diff] [blame] | 35 | |
| 36 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
Davide Pesavento | 7143048 | 2017-06-08 20:06:40 -0400 | [diff] [blame] | 37 | sudo apt-get -qy install lcov libgd-perl python-setuptools |
Davide Pesavento | c44cc83 | 2017-04-03 22:11:48 -0400 | [diff] [blame] | 38 | sudo easy_install --upgrade gcovr |
| 39 | fi |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 40 | fi |