Skip to content

Commit

Permalink
10 second wait time for xvfb init
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanfischer97 committed Nov 17, 2024
1 parent 678053b commit bd1dc6f
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,25 @@ jobs:
# Start Xvfb on display :99
/usr/bin/Xvfb :99 -screen 0 1024x768x24 &
echo "Waiting for Xvfb to start..."
sleep 3
# Test if Xvfb is accepting connections
echo "Testing Xvfb connection..."
if xdpyinfo -display :99 >/dev/null 2>&1; then
echo "✓ Xvfb is running and accepting connections"
echo "DISPLAY=:99" >> $GITHUB_ENV
else
echo "✗ Failed to connect to Xvfb"
echo "Xvfb status:"
ps aux | grep Xvfb
exit 1
fi
# Try to connect to Xvfb for up to 10 seconds
max_attempts=10
attempt=1
while [ $attempt -le $max_attempts ]; do
echo "Connection attempt $attempt of $max_attempts..."
if xdpyinfo -display :99 >/dev/null 2>&1; then
echo "✓ Xvfb is running and accepting connections"
echo "DISPLAY=:99" >> $GITHUB_ENV
exit 0
fi
attempt=$((attempt+1))
sleep 1
done
echo "✗ Failed to connect to Xvfb after $max_attempts seconds"
echo "Xvfb status:"
ps aux | grep Xvfb
exit 1
- name: Install Julia
uses: julia-actions/setup-julia@latest
Expand Down

0 comments on commit bd1dc6f

Please sign in to comment.