blob: f73079a2559bc071e88fbecd279e4ba19b35e07a [file] [log] [blame]
Alexander Afanasyevb81cff92015-07-09 09:45:09 +08001#!/usr/bin/env bash
2set -e
3
4JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
6
Davide Pesaventoe0edc4c2016-09-13 18:29:52 +00007set -x
Alexander Afanasyevb81cff92015-07-09 09:45:09 +08008
Davide Pesaventoe0edc4c2016-09-13 18:29:52 +00009if has OSX $NODE_LABELS; then
Davide Pesaventoc25737c2017-08-26 13:18:17 -040010 FORMULAE=(boost openssl pkg-config)
Alexander Afanasyevb81cff92015-07-09 09:45:09 +080011 brew update
Davide Pesavento7744a4a2017-06-20 21:29:56 -040012 if [[ -n $TRAVIS ]]; then
Davide Pesavento4bd4f712019-10-09 01:02:45 -040013 # Travis images come with a large number of brew packages
Davide Pesavento7744a4a2017-06-20 21:29:56 -040014 # 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 Afanasyevb81cff92015-07-09 09:45:09 +080022 brew cleanup
23fi
24
25if has Ubuntu $NODE_LABELS; then
Davide Pesaventocc7bee72016-04-22 02:21:13 +020026 sudo apt-get -qq update
Davide Pesavento9ac95d32017-07-01 01:51:37 -040027 sudo apt-get -qy install build-essential pkg-config libboost-all-dev \
Davide Pesavento774071c2018-11-15 21:33:23 -050028 libsqlite3-dev libssl-dev libpcap-dev libsystemd-dev
Davide Pesavento8d61c032017-04-29 20:06:33 -040029
30 if [[ $JOB_NAME == *"code-coverage" ]]; then
ashiqopud29a5da2018-11-25 01:09:15 +000031 sudo apt-get -qy install gcovr lcov libgd-perl
Davide Pesavento8d61c032017-04-29 20:06:33 -040032 fi
Alexander Afanasyevb81cff92015-07-09 09:45:09 +080033fi
Md Ashiqur Rahman922330b2018-09-04 17:55:18 +000034
Davide Pesavento4bd4f712019-10-09 01:02:45 -040035if has CentOS-7 $NODE_LABELS; then
Davide Pesavento774071c2018-11-15 21:33:23 -050036 sudo yum -y install yum-utils pkgconfig \
Md Ashiqur Rahman922330b2018-09-04 17:55:18 +000037 openssl-devel libtranslit-icu \
38 python-devel sqlite-devel \
Davide Pesavento774071c2018-11-15 21:33:23 -050039 libpcap-devel systemd-devel \
Md Ashiqur Rahman922330b2018-09-04 17:55:18 +000040 devtoolset-7-libasan-devel \
41 devtoolset-7-liblsan-devel
42 sudo yum -y groupinstall 'Development Tools'
43
Davide Pesavento0dc3cb12019-04-20 16:38:06 -040044 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 Rahman922330b2018-09-04 17:55:18 +000048fi