This commit is contained in:
@ -16,13 +16,16 @@ RUN apk add --no-cache \
|
||||
linux-headers \
|
||||
mold \
|
||||
zlib-static \
|
||||
ccache
|
||||
ccache \
|
||||
libunwind-dev \
|
||||
libdwarf-dev
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /build
|
||||
|
||||
# Copy source files
|
||||
COPY . .
|
||||
COPY CMakeLists.txt cmake_prebuild.sh ./
|
||||
#COPY cmake ./cmake
|
||||
COPY src/version.hpp.in ./src/version.hpp.in
|
||||
|
||||
# Configure and build with ccache
|
||||
RUN mkdir -p build_static && \
|
||||
@ -37,6 +40,13 @@ RUN mkdir -p build_static && \
|
||||
-DPROJECT_NAME="${PROJECT}" \
|
||||
${CMAKE_TOOLCHAIN_FILE:+-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE}
|
||||
|
||||
|
||||
# Explicitly build dependencies first (cached separately)
|
||||
RUN cmake --build build_static --target run_prebuild_script
|
||||
|
||||
# Copy source files
|
||||
COPY src ./build_static/src
|
||||
|
||||
RUN cmake --build build_static
|
||||
|
||||
# Final stage that only contains the binary
|
||||
|
Reference in New Issue
Block a user