blob: 633c56f0ebee8825872f0400058292d897a33619 [file] [log] [blame]
Alexander Afanasyevb81cff92015-07-09 09:45:09 +08001#!/usr/bin/env bash
Davide Pesavento69857c32020-04-05 16:36:26 -04002set -ex
Alexander Afanasyevb81cff92015-07-09 09:45:09 +08003
Davide Pesaventoe0edc4c2016-09-13 18:29:52 +00004if has OSX $NODE_LABELS; then
Davide Pesaventoc25737c2017-08-26 13:18:17 -04005 FORMULAE=(boost openssl pkg-config)
Davide Pesavento69857c32020-04-05 16:36:26 -04006 if has OSX-10.13 $NODE_LABELS || has OSX-10.14 $NODE_LABELS; then
7 FORMULAE+=(python)
Davide Pesavento7744a4a2017-06-20 21:29:56 -04008 fi
Alexander Afanasyevb81cff92015-07-09 09:45:09 +08009
Davide Pesavento69857c32020-04-05 16:36:26 -040010 if [[ -n $TRAVIS ]]; then
11 # Travis images come with a large number of pre-installed
12 # brew packages, don't waste time upgrading all of them
13 brew list --versions "${FORMULAE[@]}" || brew update
14 for FORMULA in "${FORMULAE[@]}"; do
15 brew list --versions "$FORMULA" || brew install "$FORMULA"
16 done
17 # Ensure /usr/local/opt/openssl exists
18 brew reinstall openssl
19 else
20 brew update
21 brew upgrade
22 brew install "${FORMULAE[@]}"
23 brew cleanup
24 fi
25
26elif has Ubuntu $NODE_LABELS; then
Davide Pesaventocc7bee72016-04-22 02:21:13 +020027 sudo apt-get -qq update
Davide Pesavento69857c32020-04-05 16:36:26 -040028 sudo apt-get -qy install g++ pkg-config python3-minimal \
29 libboost-all-dev libssl-dev libsqlite3-dev \
30 libpcap-dev libsystemd-dev
Davide Pesavento8d61c032017-04-29 20:06:33 -040031
32 if [[ $JOB_NAME == *"code-coverage" ]]; then
ashiqopud29a5da2018-11-25 01:09:15 +000033 sudo apt-get -qy install gcovr lcov libgd-perl
Davide Pesavento8d61c032017-04-29 20:06:33 -040034 fi
Md Ashiqur Rahman922330b2018-09-04 17:55:18 +000035
Davide Pesavento69857c32020-04-05 16:36:26 -040036elif has CentOS-7 $NODE_LABELS; then
Davide Pesavento774071c2018-11-15 21:33:23 -050037 sudo yum -y install yum-utils pkgconfig \
Md Ashiqur Rahman922330b2018-09-04 17:55:18 +000038 openssl-devel libtranslit-icu \
39 python-devel sqlite-devel \
Davide Pesavento774071c2018-11-15 21:33:23 -050040 libpcap-devel systemd-devel \
Md Ashiqur Rahman922330b2018-09-04 17:55:18 +000041 devtoolset-7-libasan-devel \
42 devtoolset-7-liblsan-devel
43 sudo yum -y groupinstall 'Development Tools'
44
Davide Pesavento0dc3cb12019-04-20 16:38:06 -040045 svn checkout https://github.com/cmscaltech/sandie-ndn/trunk/packaging/RPMS/x86_64/boost1_58_0
46 pushd boost1_58_0 >/dev/null
47 sudo rpm -Uv --replacepkgs --replacefiles boost-devel* boost-license* libboost_*
48 popd >/dev/null
Md Ashiqur Rahman922330b2018-09-04 17:55:18 +000049fi