'Generic Commit'
Some checks failed
Build-Test-Publish / build (push) Failing after 1m3s

This commit is contained in:
Your Name
2025-06-14 16:07:17 +12:00
parent 4ecfc1b68f
commit d92769d86c
3 changed files with 27 additions and 7 deletions

View File

@@ -9,8 +9,7 @@ WORKDIR /app
COPY . .
# Configure and build with ccache
RUN --mount=type=cache,target=/build \
mkdir -p /build && \
RUN mkdir -p /build && \
cmake -G Ninja -S /app -B /build \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
@@ -25,16 +24,19 @@ RUN --mount=type=cache,target=/build \
-DPROJECT_NAME="${PROJECT}" \
-DCMAKE_STRIP=OFF \
-DIGNORE_DYNAMIC_LOADING=ON \
-DOPENSSL_ROOT_DIR=/usr/local \
-DOPENSSL_LIBRARIES="/usr/local/lib64/libssl.a;/usr/local/lib64/libcrypto.a" \
-DOPENSSL_INCLUDE_DIR=/usr/local/include \
${CMAKE_TOOLCHAIN_FILE:+-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE}
# Explicitly build dependencies first (cached separately)
RUN --mount=type=cache,target=/build cmake --build /build --target run_prebuild_script
# Explicitly build dependencies first
RUN cmake --build /build --target run_prebuild_script
RUN --mount=type=cache,target=/build cmake --build /build
RUN cmake --build /build
# Copy the built executable to a regular directory for the final stage
RUN --mount=type=cache,target=/build mkdir -p /output && \
RUN mkdir -p /output && \
find /build -type f -executable -name "*${PROJECT}*" -exec cp {} /output/${PROJECT} \; || \
find /build -type f -executable -exec cp {} /output/${PROJECT} \;