From 5e01bbf8a14c08674520650ef8d2cc268d2a1096 Mon Sep 17 00:00:00 2001 From: "Aleksei (Faumaray) Selikhov" Date: Sat, 5 Dec 2026 15:25:30 +0300 Subject: [PATCH] ci: require Ninja 1.11 for C++20 module scanning The runner ships Ninja 1.10.1, which makes CMake reject C++20 module projects. Try an apt upgrade once during requirements, then fail with a clear message if the version is still too old. --- .gitea/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 924bb1b..f1a0c3a 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -66,6 +66,21 @@ jobs: exit 1 fi ninja --version + ninja_version="$(ninja --version)" + if [ "$(printf '%s\n%s\n' 1.11 "${ninja_version}" | sort -V | head -n1)" != "1.11" ]; then + # CMake needs Ninja 1.11+ for C++20 module scanning: try upgrading once. + if command -v apt-get >/dev/null 2>&1; then + sudo="" + if [ "$(id -u)" -ne 0 ]; then sudo="sudo"; fi + ${sudo} apt-get update || true + ${sudo} apt-get install -y ninja-build || true + fi + ninja_version="$(ninja --version)" + fi + if [ "$(printf '%s\n%s\n' 1.11 "${ninja_version}" | sort -V | head -n1)" != "1.11" ]; then + echo "Ninja 1.11 or newer is required for C++20 module scanning (found ${ninja_version})" >&2 + exit 1 + fi git --version - name: Install the development requirements run: |