Junxiao Shi | 439d972 | 2015-03-20 15:08:44 -0700 | [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 | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame] | 7 | set -x |
| 8 | |
Junxiao Shi | 439d972 | 2015-03-20 15:08:44 -0700 | [diff] [blame] | 9 | if has OSX $NODE_LABELS; then |
Davide Pesavento | 07238e8 | 2017-08-26 13:21:57 -0400 | [diff] [blame] | 10 | FORMULAE=(boost openssl pkg-config) |
Davide Pesavento | a1a9d70 | 2020-03-29 00:58:15 -0400 | [diff] [blame^] | 11 | if has OSX-10.13 $NODE_LABELS || has OSX-10.14 $NODE_LABELS; then |
| 12 | FORMULAE+=(python) |
Davide Pesavento | 1eecc17 | 2017-06-24 14:30:42 -0400 | [diff] [blame] | 13 | fi |
Junxiao Shi | 439d972 | 2015-03-20 15:08:44 -0700 | [diff] [blame] | 14 | |
Davide Pesavento | a1a9d70 | 2020-03-29 00:58:15 -0400 | [diff] [blame^] | 15 | 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 | |
| 31 | elif has Ubuntu $NODE_LABELS; then |
Davide Pesavento | 0e8edde | 2016-05-03 18:08:39 +0200 | [diff] [blame] | 32 | sudo apt-get -qq update |
Davide Pesavento | a1a9d70 | 2020-03-29 00:58:15 -0400 | [diff] [blame^] | 33 | sudo apt-get -qy install g++ pkg-config python3-minimal \ |
| 34 | libboost-all-dev libssl-dev libsqlite3-dev \ |
| 35 | libpcap-dev |
Davide Pesavento | 931dfe8 | 2017-04-29 20:33:45 -0400 | [diff] [blame] | 36 | |
| 37 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
ashiqopu | 1f0cad7 | 2018-11-25 01:22:54 +0000 | [diff] [blame] | 38 | sudo apt-get -qy install gcovr lcov libgd-perl |
Davide Pesavento | 931dfe8 | 2017-04-29 20:33:45 -0400 | [diff] [blame] | 39 | fi |
Md Ashiqur Rahman | 25c37f1 | 2018-10-12 17:59:20 +0000 | [diff] [blame] | 40 | |
Davide Pesavento | a1a9d70 | 2020-03-29 00:58:15 -0400 | [diff] [blame^] | 41 | elif has CentOS-7 $NODE_LABELS; then |
Md Ashiqur Rahman | 25c37f1 | 2018-10-12 17:59:20 +0000 | [diff] [blame] | 42 | 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 Pesavento | 630b008 | 2019-04-20 16:36:55 -0400 | [diff] [blame] | 50 | 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 Rahman | 25c37f1 | 2018-10-12 17:59:20 +0000 | [diff] [blame] | 54 | fi |