Skip to content

Commit c71bec4

Browse files
committed
[ci] Retry to install Carthage
1 parent c8b8204 commit c71bec4

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.circleci/config.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,26 @@ jobs:
6868
name: Install Carthage
6969
command: |
7070
sudo softwareupdate --install-rosetta --agree-to-license
71-
curl -OL "https://github.com/Carthage/Carthage/releases/download/0.39.1/Carthage.pkg"
72-
sudo installer -pkg Carthage.pkg -target /
71+
72+
local max_retries=3
73+
local attempt=0
74+
75+
while (( attempt < max_retries )); do
76+
((attempt++))
77+
rm -rf Carthage.pkg
78+
curl -OL "https://github.com/Carthage/Carthage/releases/download/0.39.1/Carthage.pkg"
79+
sudo installer -pkg Carthage.pkg -target /
80+
81+
if [[ $? -eq 0 ]]; then
82+
attempt = max_retries
83+
echo "Carthage installed"
84+
else
85+
echo "Carthage installation failed on attempt $attempt"
86+
fi
87+
88+
sleep 1
89+
done
90+
7391
- run:
7492
name: Test Integration via Carthage
7593
command: Tests/Integration/test_carthage.sh

0 commit comments

Comments
 (0)