leleka-cuda-driver, leleka-runtime and leleka-native-cpu-expert are gated on linux/x86_64 and had only ever been type-checked with `cargo check --target`. scripts/linux-tests/run.sh builds a linux/amd64 image from the toolchain pinned in rust-toolchain.toml (Rosetta/qemu on Apple Silicon), mounts the repo read-only with a persistent cargo cache and target volume, runs one `cargo test --no-fail-fast` shard per crate and prints a pass/fail/ignored/time summary. No GPU is used: #[ignore]d tests stay ignored and libcuda.so.1 is absent. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
26 lines
1.0 KiB
Docker
26 lines
1.0 KiB
Docker
# Linux x86_64 CPU-only test image for the Rust port crates that are gated on
|
|
# cfg(target_os = "linux", target_arch = "x86_64") and cannot run on macOS.
|
|
# No sources, caches or build products are baked in; run.sh mounts them.
|
|
#
|
|
# Build via scripts/linux-tests/run.sh (it passes RUST_VERSION from
|
|
# rust-toolchain.toml). Runs under Rosetta/qemu on Apple Silicon.
|
|
ARG RUST_VERSION
|
|
# Always built with `--platform linux/amd64` by run.sh.
|
|
FROM rust:${RUST_VERSION}-bookworm
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends build-essential clang pkg-config python3 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# The official image already carries this exact toolchain; pin it explicitly so
|
|
# rustup never tries to fetch the rustfmt/clippy components named in
|
|
# rust-toolchain.toml (they are not needed for tests).
|
|
ARG RUST_VERSION
|
|
ENV RUSTUP_TOOLCHAIN=${RUST_VERSION}-x86_64-unknown-linux-gnu \
|
|
CARGO_HOME=/cargo-cache \
|
|
CARGO_TARGET_DIR=/target \
|
|
CARGO_TERM_COLOR=never \
|
|
CARGO_INCREMENTAL=0 \
|
|
RUST_BACKTRACE=0
|
|
WORKDIR /src
|