Skip to content

Commit

Permalink
Use pre-existing homebrew state on CircleCI VMs (#2608)
Browse files Browse the repository at this point in the history
CircleCI VMs come pre-installed with homebrew and some of the taps and packages we need already set up, so skipping running update and tap and install for those pre-existing assets reduces each job by ~6 minutes each (x 4 jobs).
  • Loading branch information
cce authored Jul 22, 2021
1 parent 07d3c1a commit 099cdd2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
16 changes: 10 additions & 6 deletions scripts/configure_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,20 @@ if [ "${OS}" = "linux" ]; then
sudo "$SCRIPTPATH/install_linux_deps.sh"
fi
elif [ "${OS}" = "darwin" ]; then
brew update
brew tap homebrew/cask
if [ "${CIRCLECI}" != "true" ]; then
brew update
brew tap homebrew/cask
fi
install_or_upgrade pkg-config
install_or_upgrade boost
install_or_upgrade jq
install_or_upgrade libtool
install_or_upgrade autoconf
install_or_upgrade automake
install_or_upgrade shellcheck
install_or_upgrade python3
if [ "${CIRCLECI}" != "true" ]; then
install_or_upgrade jq
install_or_upgrade autoconf
install_or_upgrade automake
install_or_upgrade python3
fi
elif [ "${OS}" = "windows" ]; then
if ! $msys2 pacman -S --disable-download-timeout --noconfirm git automake autoconf m4 libtool make mingw-w64-x86_64-gcc mingw-w64-x86_64-boost mingw-w64-x86_64-python mingw-w64-x86_64-jq unzip procps; then
echo "Error installing pacman dependencies"
Expand Down
8 changes: 5 additions & 3 deletions scripts/travis/configure_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ if [[ "${OS}" == "linux" ]]; then
elif [[ "${OS}" == "darwin" ]]; then
# we don't want to upgrade boost if we already have it, as it will try to update
# other components.
brew update
brew tap homebrew/cask
brew pin boost || true
if [ "${CIRCLECI}" != "true" ]; then
brew update
brew tap homebrew/cask
brew pin boost || true
fi
elif [[ "${OS}" == "windows" ]]; then
git config --global core.autocrlf true
# Golang probably is not installed under MSYS2 so add the environment variable temporarily
Expand Down

0 comments on commit 099cdd2

Please sign in to comment.