Alexander Afanasyev | df26b5a | 2015-01-15 23:30:56 -0800 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Alexander Afanasyev | df26b5a | 2015-01-15 23:30:56 -0800 | [diff] [blame] | 2 | set -e |
| 3 | |
Yuanzhi Gao | dd516fe | 2015-04-23 04:18:24 -0700 | [diff] [blame] | 4 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 5 | source "$JDIR"/util.sh |
Alexander Afanasyev | df26b5a | 2015-01-15 23:30:56 -0800 | [diff] [blame] | 6 | |
Alexander Afanasyev | e0ab3f9 | 2016-10-20 13:29:39 -0700 | [diff] [blame] | 7 | set -x |
| 8 | |
Yuanzhi Gao | dd516fe | 2015-04-23 04:18:24 -0700 | [diff] [blame] | 9 | if has OSX $NODE_LABELS; then |
Alexander Afanasyev | 49ecab2 | 2020-05-31 00:03:17 -0400 | [diff] [blame] | 10 | FORMULAE=(boost pkg-config libxml2) |
| 11 | if [[ -n $USE_OPENSSL_1_1 ]]; then |
| 12 | FORMULAE+=(openssl@1.1) |
| 13 | else |
| 14 | FORMULAE+=(openssl) |
| 15 | fi |
| 16 | |
Alexander Afanasyev | df26b5a | 2015-01-15 23:30:56 -0800 | [diff] [blame] | 17 | brew update |
Alexander Afanasyev | 49ecab2 | 2020-05-31 00:03:17 -0400 | [diff] [blame] | 18 | if [[ -n $TRAVIS ]]; then |
| 19 | # Travis images come with a large number of brew packages |
| 20 | # pre-installed, don't waste time upgrading all of them |
| 21 | for FORMULA in "${FORMULAE[@]}"; do |
| 22 | brew outdated $FORMULA || brew upgrade $FORMULA |
| 23 | done |
| 24 | else |
| 25 | brew upgrade |
| 26 | fi |
| 27 | brew install "${FORMULAE[@]}" |
Alexander Afanasyev | df26b5a | 2015-01-15 23:30:56 -0800 | [diff] [blame] | 28 | brew cleanup |
| 29 | fi |
| 30 | |
Yuanzhi Gao | dd516fe | 2015-04-23 04:18:24 -0700 | [diff] [blame] | 31 | if has Ubuntu $NODE_LABELS; then |
Alexander Afanasyev | e0ab3f9 | 2016-10-20 13:29:39 -0700 | [diff] [blame] | 32 | sudo apt-get -qq update |
Alexander Afanasyev | 49ecab2 | 2020-05-31 00:03:17 -0400 | [diff] [blame] | 33 | sudo apt-get -qy install build-essential pkg-config libboost-all-dev \ |
| 34 | libsqlite3-dev libssl-dev |
| 35 | |
| 36 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
| 37 | sudo apt-get -qy install gcovr lcov libgd-perl |
| 38 | fi |
| 39 | fi |
| 40 | |
| 41 | if has Ubuntu-16.04 $NODE_LABELS; then |
| 42 | sudo apt-get -qy install python-setuptools python-dev python-pygraphviz castxml \ |
| 43 | python-kiwi python-gnome2 ipython libcairo2-dev python3-gi \ |
| 44 | libgirepository1.0-dev python-gi python-gi-cairo \ |
| 45 | gir1.2-gtk-3.0 gir1.2-goocanvas-2.0 python-pip |
| 46 | sudo pip install pygraphviz pycairo PyGObject pygccxml |
| 47 | elif has Ubuntu $NODE_LABELS; then |
| 48 | sudo apt-get -qy install build-essential libsqlite3-dev libboost-all-dev libssl-dev \ |
| 49 | git python3-setuptools castxml \ |
| 50 | gir1.2-goocanvas-2.0 gir1.2-gtk-3.0 libgirepository1.0-dev \ |
| 51 | python3-dev python3-gi python3-gi-cairo \ |
| 52 | python3-pip python3-pygraphviz python3-pygccxml |
| 53 | sudo pip3 install kiwi |
Alexander Afanasyev | df26b5a | 2015-01-15 23:30:56 -0800 | [diff] [blame] | 54 | fi |