]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
.github: retry macos "brew install" command on failure
authorKevin Burke <kevin@burke.dev>
Wed, 3 Nov 2021 23:41:57 +0000 (16:41 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 4 Nov 2021 12:55:03 +0000 (13:55 +0100)
Previously we saw errors attempting to run "brew install", see
https://github.com/curl/curl/runs/4095721123?check_suite_focus=true for
an example, since this command is idempotent, it is safe to run again.

Closes #7955

.github/workflows/macos.yml

index 400f469cd43e135e06f614c79845d2a9faec0066..aa4c24d5af0644e2cdb716ea0bf0fcb4d2ef74c9 100644 (file)
@@ -70,7 +70,10 @@ jobs:
     - run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
       name: 'brew bundle'
 
-    - run: brew update && brew bundle install --no-lock --file /tmp/Brewfile
+    # Run this command with retries because of spurious failures seen
+    # while running the tests, for example
+    # https://github.com/curl/curl/runs/4095721123?check_suite_focus=true
+    - run: brew update && for i in 1 2 3; do brew bundle install --no-lock --file /tmp/Brewfile && break || sleep 1; done
       name: 'brew install'
 
     - uses: actions/checkout@v2