Alexander Afanasyev | b81cff9 | 2015-07-09 09:45:09 +0800 | [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 | e0edc4c | 2016-09-13 18:29:52 +0000 | [diff] [blame] | 7 | set -x |
Alexander Afanasyev | b81cff9 | 2015-07-09 09:45:09 +0800 | [diff] [blame] | 8 | |
Davide Pesavento | e0edc4c | 2016-09-13 18:29:52 +0000 | [diff] [blame] | 9 | if has OSX $NODE_LABELS; then |
Davide Pesavento | c25737c | 2017-08-26 13:18:17 -0400 | [diff] [blame] | 10 | FORMULAE=(boost openssl pkg-config) |
Alexander Afanasyev | b81cff9 | 2015-07-09 09:45:09 +0800 | [diff] [blame] | 11 | brew update |
Davide Pesavento | 7744a4a | 2017-06-20 21:29:56 -0400 | [diff] [blame] | 12 | if [[ -n $TRAVIS ]]; then |
Davide Pesavento | 4bd4f71 | 2019-10-09 01:02:45 -0400 | [diff] [blame] | 13 | # Travis images come with a large number of brew packages |
Davide Pesavento | 7744a4a | 2017-06-20 21:29:56 -0400 | [diff] [blame] | 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 | b81cff9 | 2015-07-09 09:45:09 +0800 | [diff] [blame] | 22 | brew cleanup |
| 23 | fi |
| 24 | |
| 25 | if has Ubuntu $NODE_LABELS; then |
Davide Pesavento | cc7bee7 | 2016-04-22 02:21:13 +0200 | [diff] [blame] | 26 | sudo apt-get -qq update |
Davide Pesavento | 9ac95d3 | 2017-07-01 01:51:37 -0400 | [diff] [blame] | 27 | sudo apt-get -qy install build-essential pkg-config libboost-all-dev \ |
Davide Pesavento | 774071c | 2018-11-15 21:33:23 -0500 | [diff] [blame] | 28 | libsqlite3-dev libssl-dev libpcap-dev libsystemd-dev |
Davide Pesavento | 8d61c03 | 2017-04-29 20:06:33 -0400 | [diff] [blame] | 29 | |
| 30 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
ashiqopu | d29a5da | 2018-11-25 01:09:15 +0000 | [diff] [blame] | 31 | sudo apt-get -qy install gcovr lcov libgd-perl |
Davide Pesavento | 8d61c03 | 2017-04-29 20:06:33 -0400 | [diff] [blame] | 32 | fi |
Alexander Afanasyev | b81cff9 | 2015-07-09 09:45:09 +0800 | [diff] [blame] | 33 | fi |
Md Ashiqur Rahman | 922330b | 2018-09-04 17:55:18 +0000 | [diff] [blame] | 34 | |
Davide Pesavento | 4bd4f71 | 2019-10-09 01:02:45 -0400 | [diff] [blame] | 35 | if has CentOS-7 $NODE_LABELS; then |
Davide Pesavento | 774071c | 2018-11-15 21:33:23 -0500 | [diff] [blame] | 36 | sudo yum -y install yum-utils pkgconfig \ |
Md Ashiqur Rahman | 922330b | 2018-09-04 17:55:18 +0000 | [diff] [blame] | 37 | openssl-devel libtranslit-icu \ |
| 38 | python-devel sqlite-devel \ |
Davide Pesavento | 774071c | 2018-11-15 21:33:23 -0500 | [diff] [blame] | 39 | libpcap-devel systemd-devel \ |
Md Ashiqur Rahman | 922330b | 2018-09-04 17:55:18 +0000 | [diff] [blame] | 40 | devtoolset-7-libasan-devel \ |
| 41 | devtoolset-7-liblsan-devel |
| 42 | sudo yum -y groupinstall 'Development Tools' |
| 43 | |
Davide Pesavento | 0dc3cb1 | 2019-04-20 16:38:06 -0400 | [diff] [blame] | 44 | svn checkout https://github.com/cmscaltech/sandie-ndn/trunk/packaging/RPMS/x86_64/boost1_58_0 |
| 45 | pushd boost1_58_0 >/dev/null |
| 46 | sudo rpm -Uv --replacepkgs --replacefiles boost-devel* boost-license* libboost_* |
| 47 | popd >/dev/null |
Md Ashiqur Rahman | 922330b | 2018-09-04 17:55:18 +0000 | [diff] [blame] | 48 | fi |