Skip to content

Commit 05b8ce4

Browse files
fix(ci): add retry logic for web-llm stack overflow in release builds
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
1 parent d24bfba commit 05b8ce4

3 files changed

Lines changed: 45 additions & 3 deletions

File tree

.github/workflows/release-linux.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,21 @@ jobs:
122122

123123
- name: Build client
124124
if: matrix.variant == 'full'
125-
run: (ulimit -s unlimited 2>/dev/null || true) && bun run --filter @tileserver-rs/client generate
125+
run: |
126+
max_attempts=3
127+
for attempt in $(seq 1 $max_attempts); do
128+
echo "Build attempt $attempt/$max_attempts..."
129+
if (ulimit -s unlimited 2>/dev/null || true) && bun run --filter @tileserver-rs/client generate; then
130+
echo "Build succeeded on attempt $attempt"
131+
exit 0
132+
fi
133+
if [ $attempt -lt $max_attempts ]; then
134+
echo "Build failed, retrying in 15s..."
135+
sleep 15
136+
fi
137+
done
138+
echo "Build failed after $max_attempts attempts"
139+
exit 1
126140
env:
127141
NODE_OPTIONS: '--max-old-space-size=8192'
128142

.github/workflows/release-macos-amd64.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,21 @@ jobs:
7777
run: bun install --frozen-lockfile
7878

7979
- name: Build client
80-
run: (ulimit -s unlimited 2>/dev/null || true) && bun run --filter @tileserver-rs/client generate
80+
run: |
81+
max_attempts=3
82+
for attempt in $(seq 1 $max_attempts); do
83+
echo "Build attempt $attempt/$max_attempts..."
84+
if (ulimit -s unlimited 2>/dev/null || true) && bun run --filter @tileserver-rs/client generate; then
85+
echo "Build succeeded on attempt $attempt"
86+
exit 0
87+
fi
88+
if [ $attempt -lt $max_attempts ]; then
89+
echo "Build failed, retrying in 15s..."
90+
sleep 15
91+
fi
92+
done
93+
echo "Build failed after $max_attempts attempts"
94+
exit 1
8195
env:
8296
NODE_OPTIONS: '--max-old-space-size=8192'
8397

.github/workflows/release-macos-arm64.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,21 @@ jobs:
7373
run: bun install --frozen-lockfile
7474

7575
- name: Build client
76-
run: (ulimit -s unlimited 2>/dev/null || true) && bun run --filter @tileserver-rs/client generate
76+
run: |
77+
max_attempts=3
78+
for attempt in $(seq 1 $max_attempts); do
79+
echo "Build attempt $attempt/$max_attempts..."
80+
if (ulimit -s unlimited 2>/dev/null || true) && bun run --filter @tileserver-rs/client generate; then
81+
echo "Build succeeded on attempt $attempt"
82+
exit 0
83+
fi
84+
if [ $attempt -lt $max_attempts ]; then
85+
echo "Build failed, retrying in 15s..."
86+
sleep 15
87+
fi
88+
done
89+
echo "Build failed after $max_attempts attempts"
90+
exit 1
7791
env:
7892
NODE_OPTIONS: '--max-old-space-size=8192'
7993

0 commit comments

Comments
 (0)