diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c2be6577..9ac571b07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -777,38 +777,15 @@ jobs: PWD=`pwd` ctest --output-on-failure - linux-gcc-cmake-odbc: + linux-gcc-cmake-odbc-oracle: runs-on: ubuntu-22.04 services: - #mysql: - # image: mysql:8.1.0 - # env: - # MYSQL_ALLOW_EMPTY_PASSWORD: yes - # MYSQL_USER: pocotest - # MYSQL_PASSWORD: pocotest - # MYSQL_DATABASE: pocotest - # ports: - # - 3306:3306 - #postgres: - # image: postgres:16.0 - # env: - # POSTGRES_PASSWORD: postgres - # ports: - # - 5432:5432 oracle: image: container-registry.oracle.com/database/express:21.3.0-xe env: ORACLE_PWD: poco ports: - 1521:1521 - sqlserver: - image: mcr.microsoft.com/mssql/server:2022-latest - env: - MSSQL_PID: Express - ACCEPT_EULA: Y - MSSQL_SA_PASSWORD: Pocopoco1 - ports: - - 1433:1433 steps: - uses: actions/checkout@v4 @@ -826,7 +803,7 @@ jobs: echo "Disk usage after cleanup:" df -h . - - name: Install basic system dependencies (robust) + - name: Install basic system dependencies env: DEBIAN_FRONTEND: noninteractive run: | @@ -857,6 +834,90 @@ jobs: sudo apt-get install -y -f dpkg -l | grep -Ei 'devart|odbc|oracle' || true + - name: Capture apt/dpkg/system diagnostics on failure + if: failure() + run: | + set -euxo pipefail + echo "===== APT / DPKG DIAGNOSTICS =====" + sudo tail -n +1 /var/log/apt/term.log || true + sudo tail -n +1 /var/log/apt/history.log || true + sudo tail -n +1 /var/log/dpkg.log || true + df -h || true + free -h || true + uname -a || true + dmesg --level=err,warn | tail -n 200 || true + mkdir -p $GITHUB_WORKSPACE/ci-apt-logs + sudo cp /var/log/apt/* $GITHUB_WORKSPACE/ci-apt-logs/ 2>/dev/null || true + sudo cp /var/log/dpkg.log $GITHUB_WORKSPACE/ci-apt-logs/ 2>/dev/null || true + ls -l $GITHUB_WORKSPACE/ci-apt-logs || true + + - name: Upload apt/dpkg logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: apt-dpkg-logs-oracle + path: ci-apt-logs + - run: >- + cmake -S. -Bcmake-build -GNinja -DPOCO_MINIMAL_BUILD=ON -DENABLE_DATA_ODBC=ON -DENABLE_TESTS=ON + - run: cmake --build cmake-build --target all --parallel 4 + - uses: ./.github/actions/retry-action + with: + timeout_minutes: 90 + max_attempts: 3 + retry_on: any + command: >- + cd cmake-build && + PWD=`pwd` + ctest --output-on-failure + + linux-gcc-cmake-odbc-sqlserver: + runs-on: ubuntu-22.04 + services: + sqlserver: + image: mcr.microsoft.com/mssql/server:2022-latest + env: + MSSQL_PID: Express + ACCEPT_EULA: Y + MSSQL_SA_PASSWORD: Pocopoco1 + ports: + - 1433:1433 + steps: + - uses: actions/checkout@v4 + + - name: Pre-check runner disk & cleanup + run: | + echo "Disk usage before cleanup:" + df -h . + free -h + sudo rm -f /var/lib/dpkg/lock-frontend /var/cache/apt/archives/lock || true + sudo apt-get -y autoremove --purge || true + sudo apt-get -y clean || true + sudo rm -rf /usr/share/dotnet || true + sudo npm cache clean --force || true + sudo docker system prune -a --force || true + echo "Disk usage after cleanup:" + df -h . + + - name: Install basic system dependencies + env: + DEBIAN_FRONTEND: noninteractive + run: | + set -euxo pipefail + sudo rm -f /var/lib/dpkg/lock-frontend /var/cache/apt/archives/lock || true + sudo apt-get update -o Acquire::Retries=3 + for i in 1 2 3; do + sudo apt-get install -y --no-install-recommends \ + -o Dpkg::Options::="--force-confdef" \ + -o Dpkg::Options::="--force-confold" \ + libssl-dev unixodbc-dev alien libaio1 gnupg2 curl \ + odbcinst1debian2 libodbc1 odbcinst || { + echo "apt-get install attempt $i failed; retrying in 10s..." + sleep 10 + continue + } + break + done + - name: Setup Microsoft packages & msodbcsql18 env: DEBIAN_FRONTEND: noninteractive @@ -889,7 +950,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: apt-dpkg-logs + name: apt-dpkg-logs-sqlserver path: ci-apt-logs - run: >- cmake -S. -Bcmake-build -GNinja -DPOCO_MINIMAL_BUILD=ON -DENABLE_DATA_ODBC=ON -DENABLE_TESTS=ON