blob: 617f383968cfad6c14b020018e68e81b1ef1dbb5 [file] [log] [blame]
Junxiao Shi439d9722015-03-20 15:08:44 -07001#!/usr/bin/env bash
2set -e
3
4JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
6
Davide Pesavento956ac312016-09-20 19:11:30 +02007set -x
8
Junxiao Shi439d9722015-03-20 15:08:44 -07009if has OSX $NODE_LABELS; then
Davide Pesavento07238e82017-08-26 13:21:57 -040010 FORMULAE=(boost openssl pkg-config)
Davide Pesaventoa1a9d702020-03-29 00:58:15 -040011 if has OSX-10.13 $NODE_LABELS || has OSX-10.14 $NODE_LABELS; then
12 FORMULAE+=(python)
Davide Pesavento1eecc172017-06-24 14:30:42 -040013 fi
Junxiao Shi439d9722015-03-20 15:08:44 -070014
Davide Pesaventoa1a9d702020-03-29 00:58:15 -040015 if [[ -n $TRAVIS ]]; then
16 # Travis images come with a large number of pre-installed
17 # brew packages, don't waste time upgrading all of them
18 brew list --versions "${FORMULAE[@]}" || brew update
19 for FORMULA in "${FORMULAE[@]}"; do
20 brew list --versions "$FORMULA" || brew install "$FORMULA"
21 done
22 # Ensure /usr/local/opt/openssl exists
23 brew reinstall openssl
24 else
25 brew update
26 brew upgrade
27 brew install "${FORMULAE[@]}"
28 brew cleanup
29 fi
30
31elif has Ubuntu $NODE_LABELS; then
Davide Pesavento0e8edde2016-05-03 18:08:39 +020032 sudo apt-get -qq update
Davide Pesaventoa1a9d702020-03-29 00:58:15 -040033 sudo apt-get -qy install g++ pkg-config python3-minimal \
34 libboost-all-dev libssl-dev libsqlite3-dev \
35 libpcap-dev
Davide Pesavento931dfe82017-04-29 20:33:45 -040036
37 if [[ $JOB_NAME == *"code-coverage" ]]; then
ashiqopu1f0cad72018-11-25 01:22:54 +000038 sudo apt-get -qy install gcovr lcov libgd-perl
Davide Pesavento931dfe82017-04-29 20:33:45 -040039 fi
Md Ashiqur Rahman25c37f12018-10-12 17:59:20 +000040
Davide Pesaventoa1a9d702020-03-29 00:58:15 -040041elif has CentOS-7 $NODE_LABELS; then
Md Ashiqur Rahman25c37f12018-10-12 17:59:20 +000042 sudo yum -y install yum-utils pkgconfig \
43 openssl-devel libtranslit-icu \
44 python-devel sqlite-devel \
45 libpcap-devel \
46 devtoolset-7-libasan-devel \
47 devtoolset-7-liblsan-devel
48 sudo yum -y groupinstall 'Development Tools'
49
Davide Pesavento630b0082019-04-20 16:36:55 -040050 svn checkout https://github.com/cmscaltech/sandie-ndn/trunk/packaging/RPMS/x86_64/boost1_58_0
51 pushd boost1_58_0 >/dev/null
52 sudo rpm -Uv --replacepkgs --replacefiles boost-devel* boost-license* libboost_*
53 popd >/dev/null
Md Ashiqur Rahman25c37f12018-10-12 17:59:20 +000054fi