diff --git a/.forgejo/workflows/runtime-contract.yaml b/.forgejo/workflows/runtime-contract.yaml index 66c7f67..c96030f 100644 --- a/.forgejo/workflows/runtime-contract.yaml +++ b/.forgejo/workflows/runtime-contract.yaml @@ -50,6 +50,18 @@ jobs: export UV_PYTHON_INSTALL_DIR="${work_dir}/uv-python" "${uv_bin}" python install 3.12 python_bin="$("${uv_bin}" python find 3.12)" + if ! "${python_bin}" -c 'import ctypes; ctypes.CDLL("libgcc_s.so.1")' >/dev/null 2>&1; then + if command -v apk >/dev/null 2>&1; then + apk add --no-cache libgcc + elif command -v apt-get >/dev/null 2>&1; then + apt-get update + apt-get install -y libgcc-s1 + else + echo "managed Python requires libgcc_s.so.1, but no supported package manager is available" >&2 + exit 1 + fi + fi + "${python_bin}" -c 'import ctypes; ctypes.CDLL("libgcc_s.so.1")' git clone "${FORGE_BASE}/${REPO_NAME}.git" "${work_dir}/rein-aharness" git -C "${work_dir}/rein-aharness" checkout --detach "${REPO_SHA}"