mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-23 18:06:26 -07:00
add ccache and cache mounts
This commit is contained in:
parent
790e4093ef
commit
304dbcd9fa
1 changed files with 15 additions and 7 deletions
22
Dockerfile
22
Dockerfile
|
|
@ -5,6 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
|
|||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ccache \
|
||||
cmake \
|
||||
ninja-build \
|
||||
file \
|
||||
|
|
@ -18,15 +19,22 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
qt6-tools-dev \
|
||||
qt6-tools-dev-tools
|
||||
|
||||
ENV CCACHE_DIR=/root/.ccache
|
||||
ENV CCACHE_MAXSIZE=550M
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN cmake -S . -B build \
|
||||
-G Ninja \
|
||||
-DWITH_SERVER=1 \
|
||||
-DWITH_CLIENT=0 \
|
||||
-DWITH_ORACLE=0 \
|
||||
&& cmake --build build \
|
||||
&& cmake --install build
|
||||
RUN --mount=type=cache,target=/root/.ccache \
|
||||
cmake -S . -B build \
|
||||
-G Ninja \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DWITH_SERVER=1 \
|
||||
-DWITH_CLIENT=0 \
|
||||
-DWITH_ORACLE=0 \
|
||||
&& cmake --build build \
|
||||
&& cmake --install build
|
||||
|
||||
RUN ccache --show-stats
|
||||
|
||||
|
||||
# -------- Runtime Stage (clean) --------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue