Files
ortools-clone/cmake/docker/debian/java.Dockerfile
Mizux Seiha e83cf08ce1 ci: Refactor CMake CI
* Update CMake doc
* Update Docker diagram
* Refactor CI Makefile
* Refactor and Fix <lang>.Dockerfile
* Refactor gh Docker CMake workflow
* gh CMake workflow disable fail-fast
* Remove manylinux
* Add Java samplei, generated using:
    $ mvn archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart
    -> com.google.ortools
    -> sample
  note: sample still not use ortools package yet
2020-04-15 15:22:41 +02:00

31 lines
685 B
Docker

FROM ortools/cmake:debian_swig AS env
RUN apt-get update -qq \
&& apt-get install -yq default-jdk maven \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
FROM env AS devel
WORKDIR /home/project
COPY . .
FROM devel AS build
RUN cmake -S. -Bbuild -DBUILD_DEPS=ON -DBUILD_JAVA=ON
RUN cmake --build build --target all
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 cmake/samples/java .
FROM install_devel AS install_build
RUN mvn compile
FROM install_build AS install_test
RUN mvn test