Skip to content

Commit c19e6a7

Browse files
committed
CI: Retry build up to three times in KMP workflow
This commit updates the `kmp.yml` GitHub Actions workflow to add a retry mechanism for the build step. The build process will now be attempted up to three times upon failure. This is intended to mitigate intermittent build issues. The step names have been updated to reflect the attempt number (e.g., "Build (1st attempt)").
1 parent 2b0a257 commit c19e6a7

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/kmp.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,17 @@ jobs:
2828
with:
2929
cache-read-only: false
3030
cache-overwrite-existing: true
31-
- name: Build (first attempt)
32-
id: build
31+
- name: Build (1st attempt)
32+
id: build_1
3333
continue-on-error: true
3434
run: ./gradlew build
35-
- name: Build (retry on failure)
36-
if: ${{ steps.build.outcome == 'failure' }}
35+
- name: Build (2nd attempt)
36+
id: build_2
37+
if: ${{ steps.build_1.outcome == 'failure' }}
38+
continue-on-error: true
39+
run: ./gradlew build
40+
- name: Build (3rd attempt)
41+
if: ${{ steps.build_2.outcome == 'failure' }}
3742
run: ./gradlew build
3843
- name: Archive build-output artifacts
3944
if: always()
@@ -111,4 +116,4 @@ jobs:
111116
name: output-ui-tests-artifacts-${{ matrix.api-level }}-${{ matrix.target }}
112117
path: |
113118
app/android/build/outputs
114-
app/android/build/reports
119+
app/android/build/reports

0 commit comments

Comments
 (0)