33 lines
796 B
Docker
33 lines
796 B
Docker
FROM ortools:fedora_swig AS env
|
|
ENV JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk
|
|
RUN dnf -y update \
|
|
&& dnf -y install java-1.8.0-openjdk-devel maven \
|
|
&& dnf clean all
|
|
|
|
FROM env AS devel
|
|
WORKDIR /home/lib
|
|
COPY . .
|
|
|
|
FROM devel AS build
|
|
RUN cmake -S. -Bbuild -DBUILD_DEPS=ON -DBUILD_JAVA=ON
|
|
RUN cmake --build build --target all -v
|
|
RUN cmake --build build --target install
|
|
|
|
FROM build AS test
|
|
RUN cmake --build build --target test
|
|
|
|
FROM env AS install_env
|
|
COPY --from=build /usr/local /usr/local/
|
|
|
|
FROM install_env AS install_devel
|
|
WORKDIR /home/sample
|
|
COPY ci/sample .
|
|
|
|
FROM install_devel AS install_build
|
|
RUN cmake -S. -Bbuild -DBUILD_DOTNET=ON
|
|
RUN cmake --build build --target all -v
|
|
RUN cmake --build build --target install
|
|
|
|
FROM install_build AS install_test
|
|
RUN cmake --build build --target test
|