Skip to content

Commit c2c5667

Browse files
committed
fix(github): fix evmone building on same machine
1 parent 324f0f0 commit c2c5667

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/actions/build-evm-client/evmone/action.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,24 @@ runs:
3030
- name: "Install GMP Linux"
3131
if: runner.os == 'Linux'
3232
shell: bash
33-
run: sudo apt-get -q update && sudo apt-get -qy install libgmp-dev
33+
run: |
34+
# Retry apt-get with random sleep to avoid conflicts when multiple instances run
35+
for i in {1..3}; do
36+
if [ $i -gt 1 ]; then
37+
# Sleep for a random time between 1 and 10 seconds
38+
sleep $((RANDOM % 10 + 1))
39+
fi
40+
if sudo apt-get -q update && sudo apt-get -qy install libgmp-dev; then
41+
echo "apt-get succeeded on attempt $i"
42+
break
43+
else
44+
echo "apt-get failed on attempt $i"
45+
if [ $i -eq 3 ]; then
46+
echo "All retry attempts failed"
47+
exit 1
48+
fi
49+
fi
50+
done
3451
- name: Install GMP macOS
3552
if: runner.os == 'macOS'
3653
shell: bash

0 commit comments

Comments
 (0)