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 | cf8a368 | 2018-11-24 19:52:21 -0500 | [diff] [blame] | 37 | sudo apt-get -qy install gcovr lcov libgd-perl |
Davide Pesavento | c44cc83 | 2017-04-03 22:11:48 -0400 | [diff] [blame] | 38 | fi |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 39 | fi |
Md Ashiqur Rahman | 8bd3b8a | 2018-09-01 23:43:51 +0000 | [diff] [blame] | 40 | |
| 41 | if has CentOS $NODE_LABELS; then |
| 42 | sudo yum -y install yum-utils pkgconfig \ |
| 43 | openssl-devel libtranslit-icu \ |
| 44 | python-devel sqlite-devel \ |
| 45 | devtoolset-7-libasan-devel \ |
| 46 | devtoolset-7-liblsan-devel |
| 47 | sudo yum -y groupinstall 'Development Tools' |
| 48 | |
| 49 | svn checkout https://github.com/cmscaltech/sandie-ndn/trunk/packaging/RPMS/x86_64 |
| 50 | sudo rpm -U --force x86_64/boost-license* |
| 51 | sudo rpm -U --force x86_64/boost-doc-html* |
| 52 | sudo rpm -U --force x86_64/libboost* |
| 53 | sudo rpm -U --force x86_64/boost-devel* |
| 54 | fi |