From 59f9073e219a6c874472c608c278dc249a79bc3e Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 18 Dec 2025 13:37:58 +0100 Subject: [PATCH] ci: retry swiftpm build/test --- .github/workflows/ci.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a3465a46..8651eea2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -148,10 +148,28 @@ jobs: run: swiftformat --lint apps/macos/Sources --config .swiftformat - name: Swift build (release) - run: swift build --package-path apps/macos --configuration release + run: | + set -euo pipefail + for attempt in 1 2 3; do + if swift build --package-path apps/macos --configuration release; then + exit 0 + fi + echo "swift build failed (attempt $attempt/3). Retrying…" + sleep $((attempt * 20)) + done + exit 1 - name: Swift tests (coverage) - run: swift test --package-path apps/macos --parallel --enable-code-coverage --show-codecov-path + run: | + set -euo pipefail + for attempt in 1 2 3; do + if swift test --package-path apps/macos --parallel --enable-code-coverage --show-codecov-path; then + exit 0 + fi + echo "swift test failed (attempt $attempt/3). Retrying…" + sleep $((attempt * 20)) + done + exit 1 - name: Generate iOS project run: |