This repository has been archived on 2026-09-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
arc-core/ci/ffi.Dockerfile
T

42 lines
1.1 KiB
Docker

FROM occt-build:latest AS occt-local
FROM ghcr.io/erickahmed/arc-core/occt-build:latest AS occt-ghcr
FROM occt-local AS occt-selected
FROM occt-selected AS ffi-base
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y curl build-essential
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /app
COPY . .
ENV LD_LIBRARY_PATH=/usr/local/lib:/app/build
ENV RUSTFLAGS="-L /usr/local/lib -L /app/build"
RUN cargo build
FROM ubuntu:24.04 AS ffi-unit-testing
RUN apt-get update && apt-get install -y \
build-essential cmake git curl \
libfreetype-dev \
xvfb \
&& rm -rf /var/lib/apt/lists/*
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
COPY --from=occt-selected /usr/local /usr/local
COPY --from=occt-selected /app/build /app/occt-build
COPY --from=ffi-base /app /app
WORKDIR /app
ENV LD_LIBRARY_PATH=/usr/local/lib:/app/occt-build
ENV RUSTFLAGS="-L /usr/local/lib -L /app/occt-build"
CMD ["cargo", "test", "--verbose", "--", "--nocapture"]