File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ target /
2+ .git /
3+ .claude /
4+ * .md
5+ ! README * .md
6+ .github /
7+ benches /
8+ examples /
9+ scripts /
Original file line number Diff line number Diff line change 1+ # ndarray — Railway compile-test image
2+ # Verifies the HPC module builds cleanly (default + jit-native features)
3+ #
4+ # Build: docker build -t ndarray-test .
5+ # Run: docker run --rm ndarray-test
6+
7+ FROM rust:1.85-slim AS builder
8+
9+ WORKDIR /app
10+
11+ # System deps for Cranelift JIT
12+ RUN apt-get update && apt-get install -y --no-install-recommends \
13+ pkg-config libssl-dev \
14+ && rm -rf /var/lib/apt/lists/*
15+
16+ # Copy workspace files first for layer caching
17+ COPY Cargo.toml Cargo.lock ./
18+ COPY ndarray-rand/Cargo.toml ndarray-rand/Cargo.toml
19+ COPY crates/ crates/
20+
21+ # Copy source
22+ COPY src/ src/
23+ COPY ndarray-rand/src/ ndarray-rand/src/
24+
25+ # Build default features
26+ RUN cargo build --release 2>&1 && echo "=== DEFAULT BUILD OK ==="
27+
28+ # Build with JIT
29+ RUN cargo build --release --features jit-native 2>&1 && echo "=== JIT-NATIVE BUILD OK ==="
30+
31+ # Run tests
32+ RUN cargo test --release --lib -- hpc:: 2>&1 && echo "=== HPC TESTS OK ==="
33+
34+ # Minimal runtime image — just proves it compiled
35+ FROM debian:bookworm-slim
36+ COPY --from=builder /app/target/release/libndarray.rlib /usr/local/lib/
37+ CMD ["echo" , "ndarray build verified" ]
You can’t perform that action at this time.
0 commit comments