Files
codebase-memory-mcp/.github/workflows/smoke.yml
T
Martin Vogel a545a0aa8c ci: fail apt-get update on any fetch error
apt-get update exits 0 when index fetches fail: it only prints
"W: Some index files failed to download. They have been ignored, or
old ones used instead." and the job breaks later at install time with
a misleading "Unable to locate package", or installs from stale lists.
Add --error-on=any to every apt-get update this branch hardens, placed
after the -o options as in test-infrastructure/Dockerfile.msan, so the
update step itself fails when an index cannot be fetched.

Proof in ubuntu:24.04 (apt 2.8.3) and ubuntu:22.04 (apt 2.4.14)
containers with a runner-shaped mirror+file:/etc/apt/apt-mirrors.txt
source and the same -o options CI passes:
- every mirror unreachable: exit 100 with the flag (E: lines), exit 0
  without it (W: lines, zero Packages lists), on both apt versions
- first mirror refused or stalled (30 s connect timeout) and the real
  archive second: the Ign: failover lines do not trip the flag, exit 0
  with every index fetched (measured with Acquire::Retries=0)
- the image sources with the flag: exit 0 and no Ign/W/E lines, so the
  option is understood by apt 2.4 and 2.8
- green hosted-runner logs (ubuntu-24.04 and ubuntu-22.04 legs) show no
  Ign/Err/W/E lines in the update step

With Acquire::Retries=3 a mirror failover leaves apt idle after the
InRelease failover, with or without the flag and also for a plain
apt-get update; that apt behaviour predates this change and is
unchanged by it.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-01 10:08:28 +01:00

124 lines
4.6 KiB
YAML

# Smoke invariants across the WIDEST set of GitHub-hosted runners. Builds the
# production source path with explicit fault-injection test seams and runs
# scripts/smoke-invariants.sh
# (version/help, MCP initialize handshake [#513], all registered tools invocable, malformed-
# input resilience, clean EOF exit, shared-lib resolution, install dry-run).
#
# Maximizing platforms is the point: ubuntu-22.04 (older glibc → AlmaLinux/#182
# class), all arm64 variants + windows-11-arm (arch portability), multiple macOS
# and Windows versions. A FAIL on any platform is a binary users would receive.
#
# NON-GATING: workflow_dispatch + push to qa/smoke-** only (the full ~10-platform
# build is heavy, so it is opt-in rather than on every qa push).
name: Smoke (all platforms)
on:
workflow_dispatch:
push:
branches: ['qa/smoke-**']
permissions:
contents: read
jobs:
# ── Unix: linux amd64+arm64 (incl. older glibc 22.04), darwin arm64+amd64 ──
smoke-unix:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04 # older glibc — AlmaLinux/#182 portability class
cc: gcc
cxx: g++
- os: ubuntu-24.04
cc: gcc
cxx: g++
- os: ubuntu-22.04-arm
cc: gcc
cxx: g++
- os: ubuntu-24.04-arm
cc: gcc
cxx: g++
- os: macos-15 # arm64
cc: cc
cxx: c++
- os: macos-15-intel # x86_64
cc: cc
cxx: c++
runs-on: ${{ matrix.os }}
timeout-minutes: 240
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install deps (Linux)
if: startsWith(matrix.os, 'ubuntu')
timeout-minutes: 10
run: sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 --error-on=any update && sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install -y zlib1g-dev python3 git
- name: Build (production path with explicit test seams)
run: scripts/build.sh CC=${{ matrix.cc }} CXX=${{ matrix.cxx }} TEST_SEAMS=1
- name: Smoke invariants
run: |
chmod +x scripts/smoke-invariants.sh
scripts/smoke-invariants.sh build/c/codebase-memory-mcp
# ── Windows x64: 2022 + 2025 (msys2 CLANG64) ──────────────────────────────
smoke-windows-x64:
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-2025]
runs-on: ${{ matrix.os }}
timeout-minutes: 240
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
with:
msystem: CLANG64
path-type: inherit
install: >-
mingw-w64-clang-x86_64-clang
mingw-w64-clang-x86_64-zlib
mingw-w64-clang-x86_64-python3
make
git
coreutils
- name: Build (production path with explicit test seams)
shell: msys2 {0}
run: scripts/build.sh CC=clang CXX=clang++ TEST_SEAMS=1
- name: Smoke invariants
shell: msys2 {0}
run: |
chmod +x scripts/smoke-invariants.sh
BIN=build/c/codebase-memory-mcp
[ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
scripts/smoke-invariants.sh "$BIN"
# ── Windows arm64: windows-11-arm (msys2 CLANGARM64) — experimental ───────
# Best-effort: surfaces whether our binary builds + smokes on Windows on ARM.
smoke-windows-arm:
runs-on: windows-11-arm
timeout-minutes: 240
continue-on-error: true
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
with:
msystem: CLANGARM64
path-type: inherit
install: >-
mingw-w64-clang-aarch64-clang
mingw-w64-clang-aarch64-zlib
mingw-w64-clang-aarch64-python3
make
git
coreutils
- name: Build (production path with explicit test seams)
shell: msys2 {0}
run: scripts/build.sh CC=clang CXX=clang++ TEST_SEAMS=1
- name: Smoke invariants
shell: msys2 {0}
run: |
chmod +x scripts/smoke-invariants.sh
BIN=build/c/codebase-memory-mcp
[ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
scripts/smoke-invariants.sh "$BIN"