Files
R8Forge/.gitea/workflows/ci.yml
T
dsh a48adc85c6
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 1m41s
ci: install the toolchain again, from a domestic mirror
Back to apt-get per run, but archive.ubuntu.com is the slowest hop here: the step
rewrites sources.list (jammy and older) or the deb822 .sources (noble and newer)
to TUNA before updating, then installs cmake/g++/make.  APT_MIRROR is a knob --
aliyun and ustc are one edit away.  ci/Dockerfile stays as the option for a
runner that would rather bake the toolchain in.
2026-11-10 19:56:14 +08:00

188 lines
7.6 KiB
YAML

# Gitea act_runner (labels: ubuntu-latest / ubuntu-24.04 / ubuntu-22.04).
#
# One runner means one job at a time, so the cheap tier has to stay cheap:
# push : baseline only, 11 bits, and not for docs-only commits
# PR : baseline + the width matrix
# manual : everything, including the wide sweep and the cold cache audit
# Every job has a timeout: a hung step used to sit in the queue for half an hour
# and block every later push.
name: ci
on:
push:
paths-ignore:
- "**.md"
- "docs/**"
- ".r8forge_cache/**"
pull_request:
workflow_dispatch:
# A newer push cancels the older run instead of queueing behind it -- with a
# single runner that is the difference between one job and a backlog.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
baseline:
name: baseline (11 bit)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
# The runner image is a bare ubuntu, so the toolchain is installed per run.
# Point apt at a domestic mirror first -- archive.ubuntu.com is the slowest
# hop on this network. Swap APT_MIRROR for mirrors.aliyun.com/ubuntu or
# mirrors.ustc.edu.cn/ubuntu if TUNA is unhappy.
- name: toolchain
env:
DEBIAN_FRONTEND: noninteractive
APT_MIRROR: https://mirrors.tuna.tsinghua.edu.cn/ubuntu
run: |
set -eu
SUDO=""
command -v sudo >/dev/null 2>&1 && SUDO=sudo
# jammy and older keep sources.list; noble and newer use the deb822
# .sources format, so rewrite whatever exists.
for f in /etc/apt/sources.list /etc/apt/sources.list.d/*.sources; do
[ -f "$f" ] || continue
$SUDO sed -i -E "s#https?://(archive|security|ports)\.ubuntu\.com/ubuntu#${APT_MIRROR}#g" "$f"
done
$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
run: cmake --build build -j 4
- name: ctest
run: ctest --test-dir build -j 4 --output-on-failure
widths:
# Another cell width is one configure away (-DR8FORGE_CELL_SIZE). Only the
# `widthfree` tests are required: examples/ pins 2047 style values and
# byte_op_test drives the 8/11 bit word macros.
name: cell ${{ matrix.cell }}
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
cell: [8, 16, 32]
steps:
- uses: actions/checkout@v4
# The runner image is a bare ubuntu, so the toolchain is installed per run.
# Point apt at a domestic mirror first -- archive.ubuntu.com is the slowest
# hop on this network. Swap APT_MIRROR for mirrors.aliyun.com/ubuntu or
# mirrors.ustc.edu.cn/ubuntu if TUNA is unhappy.
- name: toolchain
env:
DEBIAN_FRONTEND: noninteractive
APT_MIRROR: https://mirrors.tuna.tsinghua.edu.cn/ubuntu
run: |
set -eu
SUDO=""
command -v sudo >/dev/null 2>&1 && SUDO=sudo
# jammy and older keep sources.list; noble and newer use the deb822
# .sources format, so rewrite whatever exists.
for f in /etc/apt/sources.list /etc/apt/sources.list.d/*.sources; do
[ -f "$f" ] || continue
$SUDO sed -i -E "s#https?://(archive|security|ports)\.ubuntu\.com/ubuntu#${APT_MIRROR}#g" "$f"
done
$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
run: cmake --build build -j 4
- name: width free tests
run: ctest --test-dir build -L widthfree -j 4 --output-on-failure
sweep:
name: wide sweep (manual)
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
cell: [8, 11, 16, 24, 32]
steps:
- uses: actions/checkout@v4
# The runner image is a bare ubuntu, so the toolchain is installed per run.
# Point apt at a domestic mirror first -- archive.ubuntu.com is the slowest
# hop on this network. Swap APT_MIRROR for mirrors.aliyun.com/ubuntu or
# mirrors.ustc.edu.cn/ubuntu if TUNA is unhappy.
- name: toolchain
env:
DEBIAN_FRONTEND: noninteractive
APT_MIRROR: https://mirrors.tuna.tsinghua.edu.cn/ubuntu
run: |
set -eu
SUDO=""
command -v sudo >/dev/null 2>&1 && SUDO=sudo
# jammy and older keep sources.list; noble and newer use the deb822
# .sources format, so rewrite whatever exists.
for f in /etc/apt/sources.list /etc/apt/sources.list.d/*.sources; do
[ -f "$f" ] || continue
$SUDO sed -i -E "s#https?://(archive|security|ports)\.ubuntu\.com/ubuntu#${APT_MIRROR}#g" "$f"
done
$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
run: cmake --build build -j 4
- name: width free tests
run: ctest --test-dir build -L widthfree -j 4 --output-on-failure
cold-cache:
# The committed .r8forge_cache is trusted by every build, so on demand we
# throw it away and let the searcher find the blocks again. A failure here
# means the cache no longer matches what the current model searches for.
name: cold cache (manual)
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
# The runner image is a bare ubuntu, so the toolchain is installed per run.
# Point apt at a domestic mirror first -- archive.ubuntu.com is the slowest
# hop on this network. Swap APT_MIRROR for mirrors.aliyun.com/ubuntu or
# mirrors.ustc.edu.cn/ubuntu if TUNA is unhappy.
- name: toolchain
env:
DEBIAN_FRONTEND: noninteractive
APT_MIRROR: https://mirrors.tuna.tsinghua.edu.cn/ubuntu
run: |
set -eu
SUDO=""
command -v sudo >/dev/null 2>&1 && SUDO=sudo
# jammy and older keep sources.list; noble and newer use the deb822
# .sources format, so rewrite whatever exists.
for f in /etc/apt/sources.list /etc/apt/sources.list.d/*.sources; do
[ -f "$f" ] || continue
$SUDO sed -i -E "s#https?://(archive|security|ports)\.ubuntu\.com/ubuntu#${APT_MIRROR}#g" "$f"
done
$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
run: cmake --build build -j 4
- name: forget the cache
run: rm -rf .r8forge_cache
- name: search again
run: ctest --test-dir build -R "flagship|synth_full_add" --output-on-failure