blob: 34d006ef0ebd73b4c2afbbbd85b75f795390b56e [file] [log] [blame]
Yingdi Yu1cc45d92015-02-09 14:19:54 -08001#!/usr/bin/env bash
Varun Patila24bd3e2020-11-24 10:08:33 +05302set -ex
Yingdi Yu1cc45d92015-02-09 14:19:54 -08003
4if has OSX $NODE_LABELS; then
Varun Patila24bd3e2020-11-24 10:08:33 +05305 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 Yu1cc45d92015-02-09 14:19:54 -08009
Varun Patila24bd3e2020-11-24 10:08:33 +053010 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 Yu1cc45d92015-02-09 14:19:54 -080017
Varun Patila24bd3e2020-11-24 10:08:33 +053018 # 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
32elif 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
37fi