From cdc17d2787fd4db34938f85645e83d3cb9a5f3d8 Mon Sep 17 00:00:00 2001 From: Cristhian Date: Fri, 11 Sep 2026 06:46:56 -0300 Subject: [PATCH] fix cv2 import in CI by installing the OpenCV shared libraries The opencv-python wheel links against libGL at import time, so pytest failed at collection with ImportError: libGL.so.1 on the runner image. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01JPUZks9z3Pi5oxw9GQ9znt --- .gitea/workflows/validate.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/validate.yml b/.gitea/workflows/validate.yml index 21f9822..b9f575f 100644 --- a/.gitea/workflows/validate.yml +++ b/.gitea/workflows/validate.yml @@ -36,6 +36,13 @@ jobs: steps: - uses: actions/checkout@v4 + # The opencv-python wheel links against libGL at import time, so cv2 + # cannot even be imported on the bare runner image. + - name: Install the OpenCV shared libraries + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends libgl1 libglib2.0-0 + - uses: astral-sh/setup-uv@v5 with: enable-cache: true