Skip to content

Commit cf8e702

Browse files
authored
Merge pull request #35 from AdaWorldAPI/claude/continue-session-0mAVa
ci: add Dockerfile for Railway compile-test
2 parents 116a9f8 + e3dc4ee commit cf8e702

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
target/
2+
.git/
3+
.claude/
4+
*.md
5+
!README*.md
6+
.github/
7+
benches/
8+
examples/
9+
scripts/

Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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"]

0 commit comments

Comments
 (0)