blob: fb63468e84e60be4ad5b7cfc98b1418a850e97de [file] [log] [blame]
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -04001#!/usr/bin/env bash
Davide Pesavento2349e282020-03-24 14:28:03 -04002set -ex
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -04003
Davide Pesavento09348882016-09-17 02:39:44 +02004if has OSX $NODE_LABELS; then
Davide Pesavento97242f72020-02-29 14:28:15 -05005 FORMULAE=(boost openssl pkg-config)
Davide Pesavento30ed6282021-07-25 20:05:06 -04006 if [[ $JOB_NAME == *"Docs" ]]; then
7 FORMULAE+=(doxygen graphviz)
8 fi
Davide Pesaventod776a932020-03-20 18:42:36 -04009
Davide Pesavento83f8d162021-09-26 21:58:36 -040010 if [[ -n $GITHUB_ACTIONS ]]; then
11 # GitHub Actions runners have a large number of pre-installed
12 # Homebrew packages. Don't waste time upgrading all of them.
Davide Pesaventod776a932020-03-20 18:42:36 -040013 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
Alexander Afanasyevb346ddb2015-06-03 00:52:03 -040025
Davide Pesavento30ed6282021-07-25 20:05:06 -040026 if [[ $JOB_NAME == *"Docs" ]]; then
27 pip3 install --upgrade --upgrade-strategy=eager sphinx sphinxcontrib-doxylink
28 fi
29
Davide Pesavento2349e282020-03-24 14:28:03 -040030elif has Ubuntu $NODE_LABELS; then
Davide Pesaventoe11c8d82016-04-16 14:32:07 +020031 sudo apt-get -qq update
Davide Pesavento30ed6282021-07-25 20:05:06 -040032 sudo apt-get -qy install build-essential pkg-config python3-minimal \
Davide Pesaventod776a932020-03-20 18:42:36 -040033 libboost-all-dev libssl-dev libsqlite3-dev
Davide Pesaventoc44cc832017-04-03 22:11:48 -040034
Davide Pesavento30ed6282021-07-25 20:05:06 -040035 case $JOB_NAME in
36 *code-coverage)
Davide Pesavento09d56622021-08-23 17:44:25 -040037 sudo apt-get -qy install lcov python3-pip
Davide Pesavento5b4b27f2022-04-19 16:31:03 -040038 pip3 install --user --upgrade --upgrade-strategy=eager 'gcovr~=5.1'
Davide Pesavento30ed6282021-07-25 20:05:06 -040039 ;;
40 *Docs)
41 sudo apt-get -qy install doxygen graphviz python3-pip
42 pip3 install --user --upgrade --upgrade-strategy=eager sphinx sphinxcontrib-doxylink
43 ;;
44 esac
Md Ashiqur Rahman8bd3b8a2018-09-01 23:43:51 +000045
Davide Pesavento2349e282020-03-24 14:28:03 -040046elif has CentOS-8 $NODE_LABELS; then
47 sudo dnf -y install gcc-c++ libasan pkgconf-pkg-config python3 \
48 boost-devel openssl-devel sqlite-devel
Md Ashiqur Rahman8bd3b8a2018-09-01 23:43:51 +000049fi