Files
leleka/.github/workflows/port.yml
T
Pavlo RatushnyiandClaude Sonnet 5.5 4cecb3b205 ci: repairs found by running the Docker- and tool-dependent steps in containers
* scripts/test-cuda-fixed-ptx.sh asserted the CUDA 13.0 toolkit pins; deploy/cuda-toolkit.lock.json moved to 13.2.2 on 2026-10-14. Pins updated
  to nvcc/ptxas 13.2.86 and nvdisasm 13.2.86 (sha256 and sizes from the official manifest, verified against the lock's manifest_sha256);
  the SASS dataflow assertions hold for the new ptxas.
* crates/model-format/src/huge_pages.rs: libc 0.2.190 has no MADV_COLLAPSE for musl targets, so the static CLI (linux-static-cli,
  release-cli, Dockerfile.static-cli) did not compile since the hugepages work (2026-11-01). The constant (25, the same value glibc's libc
  exports) is spelled out locally; nothing else changes.
* deploy/Dockerfile.static-cli: `rustup target add` ran before rust-toolchain.toml was copied; the floating rust:1.99 tag is 1.99.1 while the
  pin is 1.99.0, so the musl std was installed for the wrong toolchain ("can't find crate for core"). The target is added after the COPY.
* crates/cuda-driver/tests/mock_cuda.c: load-only cuStreamSynchronize (Driver::load resolves it eagerly); the fake-libcuda mock gates pass again.
  port.yml runs them (`run.sh --mocks`) after the harness.
* scripts/cuda-stubs: glibc/libstdc++ already declare the libm names the stub redefines (clash on every file), so those stubs are skipped under
  __GLIBC__; check-cu.py finds s26_tsum.cuh in the Original kernels; check-local.sh runs the C++-only pass (--plain) off macOS (101/104 files).
* check-local.sh --full: test-cuda-driver-bootstrap.sh reported as debt (stale: it builds a synthetic workspace of the crate alone, which no
  longer resolves its path dependencies).

No engine numerics or kernels are changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 02:59:50 +01:00

111 lines
5.5 KiB
YAML

name: Rust port
# Checks for the Rust port of the Original engine (docs/port-status.md). Everything here runs without a GPU, model
# weights or tokens. The existing "Linux" workflow is unchanged; the jobs below add the port-specific gates:
# port-fast fmt, Clippy and tests on the host-buildable crates (scripts/check-local.sh --fast)
# port-typecheck Linux-only crates (cuda-driver with the cuda-driver feature, leleka-runtime) type-checked, not run
# port-oracles CPU oracle differentials against the unmodified Python tools (needs pip and a pinned llama.cpp gguf-py)
# port-linux-tests Docker Linux harness (scripts/linux-tests/run.sh); optional until branch claude/port-linux-tests merges
# Type-checking is not execution: nothing here runs the Linux-gated tests or any GPU smoke.
on:
push:
branches: [main, 'claude/port-*']
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: never
RUST_BACKTRACE: '1'
jobs:
port-fast:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install build tools
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake python3
- name: Install pinned Rust
run: scripts/install-pinned-rustup.sh rustup toolchain install 1.99.0 --profile minimal --component rustfmt --component clippy
- name: Fast path (fmt, Clippy, tests on host-buildable crates)
# Known fmt/Clippy debt in leleka-model-format and the Linux-only crates is reported as warnings;
# set STRICT_DEBT=1 to make it fatal once the owners have cleaned it up.
run: scripts/check-local.sh --fast
port-typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install build tools
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake python3
- name: Install pinned Rust
run: scripts/install-pinned-rustup.sh rustup toolchain install 1.99.0 --profile minimal --component rustfmt --component clippy --target x86_64-unknown-linux-gnu
- name: Type-check the Linux-gated crates (no tests are run)
run: >-
cargo check --locked --target x86_64-unknown-linux-gnu --all-targets
-p leleka-cuda-driver --features cuda-driver -p leleka-runtime
- name: Format and Clippy debt report for the Linux-only crates (informational)
continue-on-error: true
run: |
cargo fmt -p leleka-cuda-driver -p leleka-runtime -p leleka-native-cpu-expert --check
cargo clippy --locked --target x86_64-unknown-linux-gnu --no-deps -p leleka-cuda-driver --features cuda-driver -p leleka-runtime --all-targets -- -D warnings
port-oracles:
# CPU oracle differentials: the Rust side against the UNMODIFIED Python tools (docs/offline-port.md) and the
# sampler host shim. Optional until it has run green on the hosted runner; the committed goldens are replayed by
# port-fast regardless.
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install build tools
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake git python3 python3-venv
- name: Install pinned Rust
run: scripts/install-pinned-rustup.sh rustup toolchain install 1.99.0 --profile minimal --component rustfmt --component clippy
- name: Oracle Python environment (no model data)
run: |
python3 -m venv "$RUNNER_TEMP/oracle-venv"
"$RUNNER_TEMP/oracle-venv/bin/pip" install --disable-pip-version-check numpy==2.5.4 PyYAML==6.0.3 tqdm==4.70.1 Jinja2==3.1.6 regex==2026.9.10
- name: Fetch the pinned llama.cpp gguf-py
run: |
commit="$(sed -n 's/^LLAMA_CPP_COMMIT = "\(.*\)"$/\1/p' engine/strata/setup.py)"
test -n "$commit"
git init -q "$RUNNER_TEMP/llama.cpp"
git -C "$RUNNER_TEMP/llama.cpp" fetch --depth 1 https://github.com/ggml-org/llama.cpp "$commit"
git -C "$RUNNER_TEMP/llama.cpp" checkout -q FETCH_HEAD
- name: Port oracles (sampler shim and live Python differentials)
env:
OFFLINE_ORACLE_PYTHON: ${{ runner.temp }}/oracle-venv/bin/python
STRATA_GGUF_PY: ${{ runner.temp }}/llama.cpp/gguf-py
SKIP_LINUX_TYPECHECK: '1'
run: scripts/check-local.sh --port
port-linux-tests:
# Docker Linux harness that runs the Linux-gated tests of leleka-cuda-driver and leleka-runtime (mock driver, no
# GPU). The script is created on branch claude/port-linux-tests; until it is merged this job reports "absent"
# and stays green. Optional: a failure does not block the other jobs.
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- id: present
run: |
if [ -x scripts/linux-tests/run.sh ]; then
echo 'present=true' >> "$GITHUB_OUTPUT"
else
echo 'present=false' >> "$GITHUB_OUTPUT"
echo 'scripts/linux-tests/run.sh is absent (branch claude/port-linux-tests is not merged); skipping'
fi
- name: Install Docker
if: steps.present.outputs.present == 'true'
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y docker.io
- name: Linux test harness
if: steps.present.outputs.present == 'true'
run: scripts/linux-tests/run.sh
- name: Fake-libcuda mock gates (CPU-only ELF protocol tests of the driver)
if: steps.present.outputs.present == 'true'
run: scripts/linux-tests/run.sh --mocks