From 9b1a8fc0dea775154bedc57e5e304394df2b6501 Mon Sep 17 00:00:00 2001 From: dsh Date: Tue, 10 Nov 2026 19:51:08 +0800 Subject: [PATCH] ci: install cmake and g++ before configuring The runner image is a bare ubuntu with git and node but no cmake, so the very first step died with 'cmake: command not found' (exit 127). Every job now installs cmake/g++/make first and prints their versions plus the core count, which is also the environment snapshot the logs were missing. --- .gitea/workflows/ci.yml | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 7d4a6d2..c9d4ed3 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -30,6 +30,20 @@ jobs: timeout-minutes: 20 steps: - uses: actions/checkout@v4 + # The runner image is a bare ubuntu: no cmake, no compiler. Install the + # toolchain the build needs (and print it, so the log shows what we got). + - name: toolchain + env: + DEBIAN_FRONTEND: noninteractive + run: | + set -eu + SUDO="" + command -v sudo >/dev/null 2>&1 && SUDO=sudo + $SUDO apt-get update -qq + $SUDO apt-get install -y -qq --no-install-recommends cmake g++ make + cmake --version | head -1 + g++ --version | head -1 + echo "cores: $(nproc)" - name: configure run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release - name: build @@ -51,6 +65,20 @@ jobs: cell: [8, 16, 32] steps: - uses: actions/checkout@v4 + # The runner image is a bare ubuntu: no cmake, no compiler. Install the + # toolchain the build needs (and print it, so the log shows what we got). + - name: toolchain + env: + DEBIAN_FRONTEND: noninteractive + run: | + set -eu + SUDO="" + command -v sudo >/dev/null 2>&1 && SUDO=sudo + $SUDO apt-get update -qq + $SUDO apt-get install -y -qq --no-install-recommends cmake g++ make + cmake --version | head -1 + g++ --version | head -1 + echo "cores: $(nproc)" - name: configure run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DR8FORGE_CELL_SIZE=${{ matrix.cell }} - name: build @@ -69,6 +97,20 @@ jobs: cell: [8, 11, 16, 24, 32] steps: - uses: actions/checkout@v4 + # The runner image is a bare ubuntu: no cmake, no compiler. Install the + # toolchain the build needs (and print it, so the log shows what we got). + - name: toolchain + env: + DEBIAN_FRONTEND: noninteractive + run: | + set -eu + SUDO="" + command -v sudo >/dev/null 2>&1 && SUDO=sudo + $SUDO apt-get update -qq + $SUDO apt-get install -y -qq --no-install-recommends cmake g++ make + cmake --version | head -1 + g++ --version | head -1 + echo "cores: $(nproc)" - name: configure run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DR8FORGE_CELL_SIZE=${{ matrix.cell }} - name: build @@ -86,6 +128,20 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v4 + # The runner image is a bare ubuntu: no cmake, no compiler. Install the + # toolchain the build needs (and print it, so the log shows what we got). + - name: toolchain + env: + DEBIAN_FRONTEND: noninteractive + run: | + set -eu + SUDO="" + command -v sudo >/dev/null 2>&1 && SUDO=sudo + $SUDO apt-get update -qq + $SUDO apt-get install -y -qq --no-install-recommends cmake g++ make + cmake --version | head -1 + g++ --version | head -1 + echo "cores: $(nproc)" - name: configure run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release - name: build