Skip to content

Commit 02cb12d

Browse files
authored
Add retry for brew update in integration test. (#527)
Add retry for brew update step in all workflows. This should help reduce flakes due to GHA runner network connectivity.
1 parent b49f622 commit 02cb12d

File tree

4 files changed

+74
-40
lines changed

4 files changed

+74
-40
lines changed

.github/workflows/android.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,16 @@ jobs:
7979
key: android-ndk-${{ matrix.os }}-r16b
8080

8181
- name: Update homebrew (avoid bintray errors)
82+
uses: nick-invision/retry@v2
8283
if: startsWith(matrix.os, 'macos')
83-
run: |
84-
# Temporarily here until Github runners have updated their version of
85-
# homebrew. This prevents errors arising from the shut down of
86-
# binutils, used by older version of homebrew for hosting packages.
87-
brew update
84+
with:
85+
timeout_minutes: 10
86+
max_attempts: 3
87+
command: |
88+
# Temporarily here until Github runners have updated their version of
89+
# homebrew. This prevents errors arising from the shut down of
90+
# binutils, used by older version of homebrew for hosting packages.
91+
brew update
8892
8993
- name: Install prerequisites
9094
shell: bash

.github/workflows/cpp-packaging.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,16 @@ jobs:
328328
python-version: ${{ matrix.python_version }}
329329

330330
- name: Update homebrew (avoid bintray errors)
331+
uses: nick-invision/retry@v2
331332
if: runner.os == 'macOS'
332-
run: |
333-
# Temporarily here until Github runners have updated their version of
334-
# homebrew. This prevents errors arising from the shut down of
335-
# binutils, used by older version of homebrew for hosting packages.
336-
brew update
333+
with:
334+
timeout_minutes: 10
335+
max_attempts: 3
336+
command: |
337+
# Temporarily here until Github runners have updated their version of
338+
# homebrew. This prevents errors arising from the shut down of
339+
# binutils, used by older version of homebrew for hosting packages.
340+
brew update
337341
338342
- name: Install prerequisites
339343
run: |
@@ -449,12 +453,16 @@ jobs:
449453
python-version: 3.7
450454

451455
- name: Update homebrew (avoid bintray errors)
456+
uses: nick-invision/retry@v2
452457
if: runner.os == 'macOS'
453-
run: |
454-
# Temporarily here until Github runners have updated their version of
455-
# homebrew. This prevents errors arising from the shut down of
456-
# binutils, used by older version of homebrew for hosting packages.
457-
brew update
458+
with:
459+
timeout_minutes: 10
460+
max_attempts: 3
461+
command: |
462+
# Temporarily here until Github runners have updated their version of
463+
# homebrew. This prevents errors arising from the shut down of
464+
# binutils, used by older version of homebrew for hosting packages.
465+
brew update
458466
459467
- name: Install prerequisites
460468
run: |

.github/workflows/desktop.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,16 @@ jobs:
137137
architecture: 'x64'
138138

139139
- name: Update homebrew (avoid bintray errors)
140+
uses: nick-invision/retry@v2
140141
if: startsWith(matrix.os, 'macos')
141-
run: |
142-
# Temporarily here until Github runners have updated their version of
143-
# homebrew. This prevents errors arising from the shut down of
144-
# binutils, used by older version of homebrew for hosting packages.
145-
brew update
142+
with:
143+
timeout_minutes: 10
144+
max_attempts: 3
145+
command: |
146+
# Temporarily here until Github runners have updated their version of
147+
# homebrew. This prevents errors arising from the shut down of
148+
# binutils, used by older version of homebrew for hosting packages.
149+
brew update
146150
147151
- name: Install prerequisites
148152
run: |

.github/workflows/integration_tests.yml

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,16 @@ jobs:
248248
with:
249249
python-version: ${{ env.pythonVersion }}
250250
- name: Update homebrew (avoid bintray errors)
251+
uses: nick-invision/retry@v2
251252
if: startsWith(matrix.os, 'macos')
252-
run: |
253-
# Temporarily here until Github runners have updated their version of
254-
# homebrew. This prevents errors arising from the shut down of
255-
# binutils, used by older version of homebrew for hosting packages.
256-
brew update
253+
with:
254+
timeout_minutes: 10
255+
max_attempts: 3
256+
command: |
257+
# Temporarily here until Github runners have updated their version of
258+
# homebrew. This prevents errors arising from the shut down of
259+
# binutils, used by older version of homebrew for hosting packages.
260+
brew update
257261
- name: Install SDK Desktop prerequisites
258262
run: |
259263
python scripts/gha/install_prereqs_desktop.py
@@ -394,12 +398,16 @@ jobs:
394398
with:
395399
python-version: ${{ env.pythonVersion }}
396400
- name: Update homebrew (avoid bintray errors)
401+
uses: nick-invision/retry@v2
397402
if: startsWith(matrix.os, 'macos')
398-
run: |
399-
# Temporarily here until Github runners have updated their version of
400-
# homebrew. This prevents errors arising from the shut down of
401-
# binutils, used by older version of homebrew for hosting packages.
402-
brew update
403+
with:
404+
timeout_minutes: 10
405+
max_attempts: 3
406+
command: |
407+
# Temporarily here until Github runners have updated their version of
408+
# homebrew. This prevents errors arising from the shut down of
409+
# binutils, used by older version of homebrew for hosting packages.
410+
brew update
403411
- name: Install SDK Android prerequisites
404412
shell: bash
405413
run: |
@@ -489,11 +497,16 @@ jobs:
489497
with:
490498
python-version: ${{ env.pythonVersion }}
491499
- name: Update homebrew (avoid bintray errors)
492-
run: |
493-
# Temporarily here until Github runners have updated their version of
494-
# homebrew. This prevents errors arising from the shut down of
495-
# binutils, used by older version of homebrew for hosting packages.
496-
brew update
500+
uses: nick-invision/retry@v2
501+
if: startsWith(matrix.os, 'macos')
502+
with:
503+
timeout_minutes: 10
504+
max_attempts: 3
505+
command: |
506+
# Temporarily here until Github runners have updated their version of
507+
# homebrew. This prevents errors arising from the shut down of
508+
# binutils, used by older version of homebrew for hosting packages.
509+
brew update
497510
- name: Install SDK iOS prerequisites
498511
run: build_scripts/ios/install_prereqs.sh
499512
- name: Prepare for integration tests
@@ -582,11 +595,16 @@ jobs:
582595
with:
583596
python-version: ${{ env.pythonVersion }}
584597
- name: Update homebrew (avoid bintray errors)
585-
run: |
586-
# Temporarily here until Github runners have updated their version of
587-
# homebrew. This prevents errors arising from the shut down of
588-
# binutils, used by older version of homebrew for hosting packages.
589-
brew update
598+
uses: nick-invision/retry@v2
599+
if: startsWith(matrix.os, 'macos')
600+
with:
601+
timeout_minutes: 10
602+
max_attempts: 3
603+
command: |
604+
# Temporarily here until Github runners have updated their version of
605+
# homebrew. This prevents errors arising from the shut down of
606+
# binutils, used by older version of homebrew for hosting packages.
607+
brew update
590608
- name: Install SDK tvOS prerequisites
591609
run: build_scripts/tvos/install_prereqs.sh
592610
- name: Prepare for integration tests

0 commit comments

Comments
 (0)