]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CI: fix retrying on brew failures
authorDan Fandrich <dan@coneharvesters.com>
Sat, 11 Mar 2023 00:41:25 +0000 (16:41 -0800)
committerDan Fandrich <dan@coneharvesters.com>
Sat, 11 Mar 2023 00:41:25 +0000 (16:41 -0800)
The previous attempt didn't consider that the shell would exit
immediately after the false statement in the retry case.

Follow-up to dc141a37

.cirrus.yml
.github/workflows/macos.yml

index 4886e413a715f63676c717bde7fa6e6d072ba408..309491a63ed66fbbdc56053a788d6537e97490fe 100644 (file)
@@ -210,7 +210,7 @@ macos_task:
 
   pkginstall_script:
     - echo libtool autoconf automake pkg-config ${install_packages} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
-    - "for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break || { echo Error: wait to try again; sleep 10; false; } done"
+    - "while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; } done; false Too many retries; done"
     - sudo -H python3 -m pip install --upgrade pip
     - sudo -H python3 -m pip install impacket
   configure_script:
index 16077e7d8215b8f1b0d88cfa0786bbb6eeac5855..e50011e542d08958fab92302971f3b3475c28393 100644 (file)
@@ -96,7 +96,7 @@ jobs:
     # 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: "for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break || { echo Error: wait to try again; sleep 10; false; } done"
+    - run: "while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; false; } done; false Too many retries; done"
       name: 'brew install'
 
     - run: python3 -m pip install impacket
@@ -155,7 +155,7 @@ jobs:
     - run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
       name: 'brew bundle'
 
-    - run: "for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break || { echo Error: wait to try again; sleep 10; false; } done"
+    - run: "while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; false; } done; false Too many retries; done"
       name: 'brew install'
 
     - run: python3 -m pip install impacket