diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 497d629..e0fa490 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -34,12 +34,18 @@ jobs: run: | echo "Setting up apt-cacher-ng for faster builds..." # Stop any existing apt-cacher-ng container - docker stop apt-cacher-ng 2>/dev/null || true - docker rm apt-cacher-ng 2>/dev/null || true + echo "Stopping any existing apt-cacher-ng containers..." + docker stop apt-cacher-ng 2>/dev/null || echo "No existing container to stop" + docker rm apt-cacher-ng 2>/dev/null || echo "No existing container to remove" # Start apt-cacher-ng in background with proper network configuration + echo "Starting apt-cacher-ng container..." docker run -d --name apt-cacher-ng --network host sameersbn/apt-cacher-ng:latest || echo "Apt-cacher-ng failed to start" + # Check if container is running + echo "Checking if apt-cacher-ng container is running..." + docker ps | grep apt-cacher-ng || echo "Apt-cacher-ng container not found in running containers" + # Wait for it to be ready echo "Waiting for apt-cacher-ng to be ready..." timeout 30 bash -c 'until curl -s http://localhost:3142/acng-report.html > /dev/null 2>&1; do sleep 2; done' || echo "Apt-cacher-ng not ready, continuing without cache" @@ -65,12 +71,18 @@ jobs: # Configure apt to use cacher if available # Try multiple methods to reach the apt-cacher-ng service APT_CACHER_IP="" + echo "Testing apt-cacher-ng connectivity..." if curl -s http://host.docker.internal:3142/acng-report.html > /dev/null 2>&1; then APT_CACHER_IP="host.docker.internal:3142" + echo "Found apt-cacher-ng at host.docker.internal:3142" elif curl -s http://172.17.0.1:3142/acng-report.html > /dev/null 2>&1; then APT_CACHER_IP="172.17.0.1:3142" + echo "Found apt-cacher-ng at 172.17.0.1:3142" elif curl -s http://host-gateway:3142/acng-report.html > /dev/null 2>&1; then APT_CACHER_IP="host-gateway:3142" + echo "Found apt-cacher-ng at host-gateway:3142" + else + echo "Apt-cacher-ng not accessible, testing direct connection" fi if [ -n "$APT_CACHER_IP" ]; then