Files
ortools-clone/cmake/docker/web/Dockerfile
Corentin Le Molgat 8d8218c4f0 cmake(ci): disable test when building using emcmake
note: googletest do not support DEATH TEST with emscripten but issue a compile error instead of a nop/disabling the test.
```

20117

20118

```
2025-05-05 15:27:38 +02:00

34 lines
888 B
Docker

# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/archlinux/
FROM archlinux:latest AS env
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN pacman -Syu --noconfirm git base-devel glibc cmake
RUN cmake -version
RUN pacman -Syu --noconfirm nodejs emscripten
ENV PATH=/usr/lib/emscripten:$PATH
RUN emcc -v
# Add the library src to our build env
FROM env AS devel
WORKDIR /home/project
COPY . .
FROM devel AS build
RUN emcmake cmake -S. -Bbuild \
-DCMAKE_BUILD_TYPE=Release -DBUILD_DEPS=ON \
-DBUILD_TESTING=OFF \
-DBUILD_EXAMPLES=OFF \
-DUSE_COINOR=OFF \
-DUSE_GLPK=OFF \
-DUSE_HIGHS=OFF \
-DUSE_PDLP=OFF \
-DUSE_SCIP=OFF
RUN cmake --build build --target all -v -j 4
#RUN cmake --build build --target install -v
FROM build AS test
#RUN CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target test
RUN cd build && ctest -V