diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 21ebe41..9913fc4 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -23,19 +23,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). + # The image is expected to carry the toolchain already (ci/Dockerfile); + # this step only proves it and says how to fix a bare image, instead of + # failing later with "cmake: command not found". - 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 + for tool in cmake c++ make; do + if ! command -v "$tool" >/dev/null 2>&1; then + echo "this runner image has no $tool -- build ci/Dockerfile and point the runner label at it" >&2 + exit 1 + fi + done cmake --version | head -1 - g++ --version | head -1 + c++ --version | head -1 echo "cores: $(nproc)" - name: configure run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release