Skip to content

fix(cli): parity-check was silently skipping every *_test binary #244

fix(cli): parity-check was silently skipping every *_test binary

fix(cli): parity-check was silently skipping every *_test binary #244

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [cuda-only]
permissions:
contents: read
jobs:
shell:
name: ShellCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install shellcheck
run: sudo apt-get update && sudo apt-get install -y shellcheck
- name: Lint scripts/
# Recurse so scripts/test/install-container-deps/run.sh and any
# future helpers under scripts/ stay covered.
run: find scripts -name '*.sh' -print0 | xargs -0 shellcheck
actions:
name: actionlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: reviewdog/action-actionlint@v1
with:
fail_level: error
rust:
name: Rust (keygen-rs)
runs-on: ubuntu-latest
defaults:
run:
working-directory: keygen-rs
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
with:
workspaces: keygen-rs
- name: cargo fmt --check
run: cargo fmt --all --check
- name: cargo check
run: cargo check --all-targets --locked || cargo check --all-targets
- name: cargo clippy (advisory)
run: cargo clippy --all-targets -- -W clippy::all
continue-on-error: true
- name: cargo test
run: cargo test --all-targets
host-tests:
name: C++ host tests (${{ matrix.mode }})
runs-on: ubuntu-latest
# The cuda-build job below COMPILES the C++ but cannot run any of it — the
# runner has no GPU. So until this job existed, the host test binaries were
# built only when someone typed their names, and the host-RAM spill path
# shipped on this branch with no automated check.
#
# These targets need a C++20 compiler and nothing else — no CUDA, no GPU —
# so they run on a bare runner in seconds. The sanitizer arms are not
# decoration: the spill I/O engine is a worker pool over a ticket protocol,
# and a missing lock there is invisible to any interleaving the test
# happens to take.
strategy:
fail-fast: false
matrix:
mode: [plain, thread, address]
steps:
- uses: actions/checkout@v5
- name: Run host tests
run: |
if [ "${{ matrix.mode }}" = "plain" ]; then
scripts/test/host-tests.sh
else
scripts/test/host-tests.sh "${{ matrix.mode }}"
fi
cuda-build:
# Compile-only smoke: catches CMakeLists / nvcc-arch / link-order
# regressions without needing a real GPU on the runner. Targets
# sm_75 (Turing) so the Pascal/Volta preflight in CMakeLists.txt —
# which throws when CUDA 13+ meets sm < 75 — doesn't trip on the
# runner's toolkit.
name: cuda build smoke (nvcc, no GPU)
runs-on: ubuntu-latest
container:
image: docker.io/nvidia/cuda:13.0.0-devel-ubuntu24.04
steps:
- name: Install host tools
run: |
apt-get update
apt-get install -y --no-install-recommends \
cmake ninja-build curl ca-certificates pkg-config \
git build-essential
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: keygen-rs
- name: Configure
run: cmake -B build -S . -GNinja -DCMAKE_CUDA_ARCHITECTURES=75
- name: Build
run: cmake --build build -j$(nproc)
install-container-deps-dryrun:
name: install-container-deps.sh — dry-run fixtures
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Diff --dry-run output against fixtures
# Runs --dry-run for every engine in arch / ubuntu / fedora
# containers and diffs against the checked-in fixtures under
# scripts/test/install-container-deps/. ~60s, no sudo, no network
# beyond image pulls.
#
# cuda-only is NVIDIA-only, so there's no smoke job equivalent
# to main's: nvidia-ctk cdi generate needs a real GPU + driver
# to populate the spec, and the dry-run fixtures already cover
# the planning logic for that path.
run: scripts/test/install-container-deps/run.sh
hadolint:
name: hadolint Containerfile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: Containerfile
# CUDA base images make version-pinning warnings (DL3008,
# DL3009) impractical — package versions shift between base
# image rolls and the toolkit pin lives in BASE_DEVEL. Same
# for `set -o pipefail` warnings on RUN-with-pipe (DL4006) —
# those pipes are bootstrap-time noise, not runtime data
# paths. Filter to errors so we still catch real bugs (root,
# ADD vs COPY, missing && \, COPY --chown typos, etc.).
failure-threshold: error
compose-config:
name: docker compose config validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: docker compose config --quiet
# Catches typos in service names / build-arg keys / unresolvable
# ${VAR} placeholders without ever pulling a base image. ~5s.
run: docker compose -f compose.yaml config --quiet
typos:
name: typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: crate-ci/typos@master
markdownlint:
name: markdownlint README
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: DavidAnson/markdownlint-cli2-action@v18
with:
globs: README.md