ci: the image carries the toolchain, not the job
ci / cell 16 (push) Skipped
ci / cell 32 (push) Skipped
ci / cell 8 (push) Skipped
ci / wide sweep (manual) (11) (push) Skipped
ci / wide sweep (manual) (16) (push) Skipped
ci / wide sweep (manual) (24) (push) Skipped
ci / wide sweep (manual) (32) (push) Skipped
ci / wide sweep (manual) (8) (push) Skipped
ci / cold cache (manual) (push) Skipped
ci / baseline (11 bit) (push) Failing after 16s

An apt-get per run is slow, depends on the Ubuntu mirrors (the flakiest hop on
this network) and makes a run non-reproducible.  ci/Dockerfile builds the image
once -- cmake, g++, make, git -- and the runner label points at it
(ubuntu-latest:docker://r8forge-ci:24.04).

The workflow now only proves the toolchain is there and explains how to fix a
bare image, instead of installing it.
This commit is contained in:
dsh committed 2026-11-10 19:52:35 +08:00
1 parent 9b1a8fc0de
commit 5bc26f7762
2 files changed
+72 -36

No files matched your search

+40 -36
View File
@@ -30,19 +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).
# 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
@@ -65,19 +66,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).
# 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 -DR8FORGE_CELL_SIZE=${{ matrix.cell }}
@@ -97,19 +99,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).
# 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 -DR8FORGE_CELL_SIZE=${{ matrix.cell }}
@@ -128,19 +131,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).
# 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
+32
View File
@@ -0,0 +1,32 @@
# The CI image.
#
# A job container should not install packages: an apt-get per run is slow, needs
# the Ubuntu mirrors (often the flakiest part of a Chinese network) and is not
# reproducible. Build this image once on the runner host and point the
# act_runner label at it, then no job ever touches the network for a toolchain:
#
# docker build -t r8forge-ci:24.04 ci
#
# # ~/.config/act_runner/config.yaml (or the labels in the runner's env)
# labels:
# - ubuntu-latest:docker://r8forge-ci:24.04
#
# # restart act_runner, then check "Last Online Time" in the runner list
#
# Everything a job needs is here: cmake, a C++20 compiler, make. act_runner
# mounts its own node into the container, so the image does not need node.
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq \
&& apt-get install -y -qq --no-install-recommends \
cmake \
g++ \
make \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# A quick smoke of the toolchain, so a broken image fails at build time.
RUN cmake --version | head -1 && g++ --version | head -1