Davide Pesavento | 29db0fd | 2017-08-29 13:32:00 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Davide Pesavento | f5006be | 2022-08-19 17:36:36 -0400 | [diff] [blame] | 2 | set -eo pipefail |
Davide Pesavento | 29db0fd | 2017-08-29 13:32:00 -0400 | [diff] [blame] | 3 | |
Davide Pesavento | 7227d64 | 2024-02-10 01:58:15 -0500 | [diff] [blame] | 4 | APT_PKGS=( |
Davide Pesavento | 9bec15a | 2024-04-22 23:00:03 -0400 | [diff] [blame] | 5 | dpkg-dev |
| 6 | g++ |
Davide Pesavento | 7227d64 | 2024-02-10 01:58:15 -0500 | [diff] [blame] | 7 | libboost-chrono-dev |
| 8 | libboost-date-time-dev |
| 9 | libboost-dev |
Davide Pesavento | 7227d64 | 2024-02-10 01:58:15 -0500 | [diff] [blame] | 10 | 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 Pesavento | 53156c3 | 2025-03-19 19:04:28 -0400 | [diff] [blame] | 17 | pkgconf |
Davide Pesavento | 9bec15a | 2024-04-22 23:00:03 -0400 | [diff] [blame] | 18 | python3 |
Davide Pesavento | 7227d64 | 2024-02-10 01:58:15 -0500 | [diff] [blame] | 19 | ) |
Davide Pesavento | 53156c3 | 2025-03-19 19:04:28 -0400 | [diff] [blame] | 20 | DNF_PKGS=( |
| 21 | boost-devel |
| 22 | gcc-c++ |
| 23 | libasan |
| 24 | lld |
| 25 | openssl-devel |
| 26 | pkgconf |
| 27 | python3 |
| 28 | sqlite-devel |
| 29 | ) |
Davide Pesavento | c12f915 | 2024-12-11 18:42:03 -0500 | [diff] [blame] | 30 | FORMULAE=(boost openssl pkgconf) |
Davide Pesavento | 29db0fd | 2017-08-29 13:32:00 -0400 | [diff] [blame] | 31 | |
Davide Pesavento | f5006be | 2022-08-19 17:36:36 -0400 | [diff] [blame] | 32 | set -x |
| 33 | |
| 34 | if [[ $ID == macos ]]; then |
Davide Pesavento | c12f915 | 2024-12-11 18:42:03 -0500 | [diff] [blame] | 35 | export HOMEBREW_NO_ENV_HINTS=1 |
Davide Pesavento | ab6ac5d | 2021-10-05 23:23:53 -0400 | [diff] [blame] | 36 | if [[ -n $GITHUB_ACTIONS ]]; then |
Davide Pesavento | 665f89c | 2023-02-14 16:45:07 -0500 | [diff] [blame] | 37 | export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 |
Davide Pesavento | f5006be | 2022-08-19 17:36:36 -0400 | [diff] [blame] | 38 | fi |
| 39 | brew update |
| 40 | brew install --formula "${FORMULAE[@]}" |
Davide Pesavento | f5006be | 2022-08-19 17:36:36 -0400 | [diff] [blame] | 41 | elif [[ $ID_LIKE == *debian* ]]; then |
Davide Pesavento | 7227d64 | 2024-02-10 01:58:15 -0500 | [diff] [blame] | 42 | sudo apt-get update -qq |
| 43 | sudo apt-get install -qy --no-install-recommends "${APT_PKGS[@]}" |
Davide Pesavento | f5006be | 2022-08-19 17:36:36 -0400 | [diff] [blame] | 44 | elif [[ $ID_LIKE == *fedora* ]]; then |
Davide Pesavento | 53156c3 | 2025-03-19 19:04:28 -0400 | [diff] [blame] | 45 | sudo dnf install -y "${DNF_PKGS[@]}" |
Davide Pesavento | f855ec1 | 2022-11-16 16:08:35 -0500 | [diff] [blame] | 46 | fi |