Yingdi Yu | 1cc45d9 | 2015-02-09 14:19:54 -0800 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Varun Patil | a24bd3e | 2020-11-24 10:08:33 +0530 | [diff] [blame^] | 2 | set -ex |
Yingdi Yu | 1cc45d9 | 2015-02-09 14:19:54 -0800 | [diff] [blame] | 3 | |
| 4 | if has OSX $NODE_LABELS; then |
Varun Patil | a24bd3e | 2020-11-24 10:08:33 +0530 | [diff] [blame^] | 5 | FORMULAE=(boost openssl pkg-config qt) |
| 6 | if has OSX-10.13 $NODE_LABELS || has OSX-10.14 $NODE_LABELS; then |
| 7 | FORMULAE+=(python) |
| 8 | fi |
Yingdi Yu | 1cc45d9 | 2015-02-09 14:19:54 -0800 | [diff] [blame] | 9 | |
Varun Patil | a24bd3e | 2020-11-24 10:08:33 +0530 | [diff] [blame^] | 10 | if [[ -n $GITHUB_ACTIONS ]]; then |
| 11 | # Homebrew doesn't have cryptopp packages, so build from source |
| 12 | git clone https://github.com/weidai11/cryptopp/ |
| 13 | cd cryptopp |
| 14 | make -j4 |
| 15 | make install |
| 16 | cd .. |
Yingdi Yu | 1cc45d9 | 2015-02-09 14:19:54 -0800 | [diff] [blame] | 17 | |
Varun Patil | a24bd3e | 2020-11-24 10:08:33 +0530 | [diff] [blame^] | 18 | # Travis images come with a large number of pre-installed |
| 19 | # brew packages, don't waste time upgrading all of them |
| 20 | for FORMULA in "${FORMULAE[@]}"; do |
| 21 | brew list --versions "$FORMULA" || brew install "$FORMULA" |
| 22 | done |
| 23 | |
| 24 | brew link qt --force |
| 25 | else |
| 26 | brew update |
| 27 | brew upgrade |
| 28 | brew install "${FORMULAE[@]}" |
| 29 | brew cleanup |
| 30 | fi |
| 31 | |
| 32 | elif has Ubuntu $NODE_LABELS; then |
| 33 | sudo apt-get -qq update |
| 34 | sudo apt-get -qy install g++ pkg-config python3-minimal \ |
| 35 | libboost-all-dev libssl-dev libsqlite3-dev \ |
| 36 | libcrypto++-dev qt5-default |
| 37 | fi |