Alexander Afanasyev | c7c9900 | 2015-10-09 17:27:30 -0700 | [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 | |
Alexander Afanasyev | 984ca9d | 2016-12-19 13:09:14 -0800 | [diff] [blame] | 7 | set -x |
Alexander Afanasyev | c7c9900 | 2015-10-09 17:27:30 -0700 | [diff] [blame] | 8 | |
Alexander Afanasyev | 984ca9d | 2016-12-19 13:09:14 -0800 | [diff] [blame] | 9 | if has OSX $NODE_LABELS; then |
Davide Pesavento | 4a315b3 | 2018-11-24 14:32:19 -0500 | [diff] [blame^] | 10 | FORMULAE=(boost openssl pkg-config) |
Alexander Afanasyev | c7c9900 | 2015-10-09 17:27:30 -0700 | [diff] [blame] | 11 | brew update |
Davide Pesavento | 4a315b3 | 2018-11-24 14:32:19 -0500 | [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 | c7c9900 | 2015-10-09 17:27:30 -0700 | [diff] [blame] | 22 | brew cleanup |
| 23 | fi |
| 24 | |
| 25 | if has Ubuntu $NODE_LABELS; then |
Alexander Afanasyev | 984ca9d | 2016-12-19 13:09:14 -0800 | [diff] [blame] | 26 | sudo apt-get -qq update |
Davide Pesavento | 4a315b3 | 2018-11-24 14:32:19 -0500 | [diff] [blame^] | 27 | sudo apt-get -qy install build-essential pkg-config libboost-all-dev \ |
Davide Pesavento | 9003483 | 2018-05-30 10:10:31 -0400 | [diff] [blame] | 28 | libsqlite3-dev libssl-dev |
Davide Pesavento | 4a315b3 | 2018-11-24 14:32:19 -0500 | [diff] [blame^] | 29 | |
| 30 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
| 31 | sudo apt-get -qy install gcovr lcov libgd-perl |
| 32 | fi |
Alexander Afanasyev | c7c9900 | 2015-10-09 17:27:30 -0700 | [diff] [blame] | 33 | fi |