ci: Skip macOS 'brew update' to save a lot of time
authorShane Synan <digitalcircuit36939@gmail.com>
Wed, 2 Dec 2020 00:21:24 +0000 (19:21 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Fri, 4 Dec 2020 07:56:05 +0000 (08:56 +0100)
Skip macOS 'brew update' before 'brew install' to save up to an hour
of time with Homebrew updates, as per GitHub's recommendations.

See https://github.com/actions/virtual-environments/issues/2173
And https://github.com/microsoft/appcenter/issues/293

This could potentially introduce issues if Homebrew makes a breaking
change in between the 1-2 week window that GitHub Actions updates
their macOS CI images, but it seems unlikely and 'brew update' can be
re-added if needed.

.github/workflows/main.yml

index a8bd58d..e533fc1 100644 (file)
@@ -101,7 +101,18 @@ jobs:
       run: git fetch -f origin $GITHUB_REF:$GITHUB_REF
 
     - name: Install dependencies
-      run: brew update && brew install boost ccache ninja qca qt5
+      # Skip "brew update" as it can trigger 50+ minutes of updating.
+      # GitHub Actions intentionally disables the default auto-update on their
+      # macOS CI images (and macOS CI images usually update once a week).
+      #
+      # See https://github.com/actions/virtual-environments/issues/2173
+      # > We've set no auto-update intentionally here [...]
+      # And https://github.com/microsoft/appcenter/issues/293
+      #
+      # If Homebrew begins failing in the future due to out-of-date versions,
+      # it can be re-enabled here as follows...
+      # run: brew update && [below command]
+      run: brew install boost ccache ninja qca qt5
 
     - name: Get timestamp
       id: get-timestamp