Skip to content

Commit a8dbb30

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

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

.circleci/config.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,28 @@ jobs:
6767
- run:
6868
name: Install Carthage
6969
command: |
70+
set -x
7071
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 /
72+
73+
max_retries=3
74+
attempt=0
75+
76+
while (( attempt < max_retries )); do
77+
((attempt++))
78+
rm -rf Carthage.pkg
79+
curl -OL "https://github.com/Carthage/Carthage/releases/download/0.39.1/Carthage.pkg"
80+
sudo installer -pkg Carthage.pkg -target /
81+
82+
if [[ $? -eq 0 ]]; then
83+
attempt=max_retries
84+
echo "Carthage installed"
85+
else
86+
echo "Carthage installation failed on attempt $attempt"
87+
fi
88+
89+
sleep 1
90+
done
91+
7392
- run:
7493
name: Test Integration via Carthage
7594
command: Tests/Integration/test_carthage.sh

0 commit comments

Comments
 (0)