You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
727 B
28 lines
727 B
FROM kuyoh/vcpkg:2025.06.13-ubuntu24.04 AS builder |
|
|
|
WORKDIR /workspace |
|
|
|
COPY ../CMakeLists.txt . |
|
COPY ../vcpkg.json . |
|
|
|
RUN vcpkg install |
|
|
|
# Cche stays valid if only code changes |
|
COPY .. . |
|
|
|
RUN cmake -DCMAKE_TOOLCHAIN_FILE:STRING=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \ |
|
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Release \ |
|
-H/workspace -B/workspace/build -G Ninja |
|
RUN cmake --build /workspace/build --config Release --target all -j 8 -- |
|
|
|
# run tests |
|
RUN cd /workspace/build && ctest --output-on-failure . |
|
|
|
FROM ubuntu:24.04 AS runtime |
|
|
|
WORKDIR /app |
|
|
|
COPY --from=builder /workspace/build/bin/AutoStore ./AutoStore |
|
COPY --from=builder /workspace/build/bin/data ./data |
|
|
|
CMD ["./AutoStore"] |