Skip to content

Commit bdb9c33

Browse files
committed
fix: install Chrome shared libs and poll for PDF instead of fixed sleep
1 parent e76497f commit bdb9c33

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,31 @@ jobs:
2323
- name: Verify benchmarks compile
2424
run: cargo bench --no-run
2525

26-
- name: Install Chrome
27-
run: sudo apt-get update && sudo apt-get install -y chromium-browser
26+
- name: Install Chrome dependencies
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y \
30+
libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \
31+
libxcomposite1 libxdamage1 libxrandr2 libgbm1 libpango-1.0-0 \
32+
libcairo2 libasound2 libxshmfence1
2833
2934
- name: Test (HTML → PDF)
3035
run: |
3136
echo "<h1>ci</h1>" > /tmp/test.html
3237
./target/debug/artifact-generator /tmp/test.html --output /tmp/test.pdf &
3338
PID=$!
34-
sleep 5
39+
# Poll for PDF instead of fixed sleep
40+
for i in $(seq 1 30); do
41+
if [ -s /tmp/test.pdf ]; then
42+
echo "PASS: PDF is non-empty (after ${i}s)"
43+
kill $PID 2>/dev/null || true
44+
exit 0
45+
fi
46+
sleep 1
47+
done
3548
kill $PID 2>/dev/null || true
36-
test -s /tmp/test.pdf && echo "PASS: PDF is non-empty" || (echo "FAIL: PDF missing or empty" && exit 1)
49+
echo "FAIL: PDF missing or empty after 30s"
50+
exit 1
3751
3852
python:
3953
name: Python benchmarks

0 commit comments

Comments
 (0)