GHActions: Don't update homebrew when not necessary

It's pretty slow and if GH hasn't been updating their image, could cause huge numbers of extra dependants and dependencies to have to be installed
This commit is contained in:
TellowKrinkle 2021-07-17 21:23:03 -05:00 committed by tellowkrinkle
parent 2e411a6019
commit 4f50e7e478
1 changed files with 8 additions and 2 deletions

View File

@ -99,8 +99,14 @@ jobs:
HOMEBREW_NO_INSTALL_CLEANUP: 1 HOMEBREW_NO_INSTALL_CLEANUP: 1
HOMEBREW_NO_ANALYTICS: 1 HOMEBREW_NO_ANALYTICS: 1
run: | run: |
brew update # To save time, only brew update if running the install without it fails
function do-install() {
brew install sound-touch portaudio wxmac gtk+3 sdl2 libsamplerate brew install sound-touch portaudio wxmac gtk+3 sdl2 libsamplerate
}
if ! do-install; then
brew update
do-install
fi
- name: Generate CMake Files - name: Generate CMake Files
run: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_PO=FALSE -B build . run: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_PO=FALSE -B build .