blob: 7ed8a104491f0a76d224d63459971fc38956702b [file] [log] [blame]
Davide Pesavento29db0fd2017-08-29 13:32:00 -04001#!/usr/bin/env bash
Davide Pesaventof5006be2022-08-19 17:36:36 -04002set -eo pipefail
Davide Pesavento29db0fd2017-08-29 13:32:00 -04003
Davide Pesavento7227d642024-02-10 01:58:15 -05004APT_PKGS=(
Davide Pesavento9bec15a2024-04-22 23:00:03 -04005 dpkg-dev
6 g++
Davide Pesavento7227d642024-02-10 01:58:15 -05007 libboost-chrono-dev
8 libboost-date-time-dev
9 libboost-dev
Davide Pesavento7227d642024-02-10 01:58:15 -050010 libboost-log-dev
11 libboost-program-options-dev
12 libboost-stacktrace-dev
13 libboost-test-dev
14 libboost-thread-dev
15 libsqlite3-dev
16 libssl-dev
Davide Pesavento53156c32025-03-19 19:04:28 -040017 pkgconf
Davide Pesavento9bec15a2024-04-22 23:00:03 -040018 python3
Davide Pesavento7227d642024-02-10 01:58:15 -050019)
Davide Pesavento53156c32025-03-19 19:04:28 -040020DNF_PKGS=(
21 boost-devel
22 gcc-c++
23 libasan
24 lld
25 openssl-devel
26 pkgconf
27 python3
28 sqlite-devel
29)
Davide Pesaventoc12f9152024-12-11 18:42:03 -050030FORMULAE=(boost openssl pkgconf)
Davide Pesavento29db0fd2017-08-29 13:32:00 -040031
Davide Pesaventof5006be2022-08-19 17:36:36 -040032set -x
33
34if [[ $ID == macos ]]; then
Davide Pesaventoc12f9152024-12-11 18:42:03 -050035 export HOMEBREW_NO_ENV_HINTS=1
Davide Pesaventoab6ac5d2021-10-05 23:23:53 -040036 if [[ -n $GITHUB_ACTIONS ]]; then
Davide Pesavento665f89c2023-02-14 16:45:07 -050037 export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
Davide Pesaventof5006be2022-08-19 17:36:36 -040038 fi
39 brew update
40 brew install --formula "${FORMULAE[@]}"
Davide Pesaventof5006be2022-08-19 17:36:36 -040041elif [[ $ID_LIKE == *debian* ]]; then
Davide Pesavento7227d642024-02-10 01:58:15 -050042 sudo apt-get update -qq
43 sudo apt-get install -qy --no-install-recommends "${APT_PKGS[@]}"
Davide Pesaventof5006be2022-08-19 17:36:36 -040044elif [[ $ID_LIKE == *fedora* ]]; then
Davide Pesavento53156c32025-03-19 19:04:28 -040045 sudo dnf install -y "${DNF_PKGS[@]}"
Davide Pesaventof855ec12022-11-16 16:08:35 -050046fi