mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-24 02:13:02 -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
10
Dockerfile
10
Dockerfile
|
|
@ -5,6 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
ccache \
|
||||||
cmake \
|
cmake \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
file \
|
file \
|
||||||
|
|
@ -18,16 +19,23 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
qt6-tools-dev \
|
qt6-tools-dev \
|
||||||
qt6-tools-dev-tools
|
qt6-tools-dev-tools
|
||||||
|
|
||||||
|
ENV CCACHE_DIR=/root/.ccache
|
||||||
|
ENV CCACHE_MAXSIZE=550M
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN cmake -S . -B build \
|
RUN --mount=type=cache,target=/root/.ccache \
|
||||||
|
cmake -S . -B build \
|
||||||
-G Ninja \
|
-G Ninja \
|
||||||
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
-DWITH_SERVER=1 \
|
-DWITH_SERVER=1 \
|
||||||
-DWITH_CLIENT=0 \
|
-DWITH_CLIENT=0 \
|
||||||
-DWITH_ORACLE=0 \
|
-DWITH_ORACLE=0 \
|
||||||
&& cmake --build build \
|
&& cmake --build build \
|
||||||
&& cmake --install build
|
&& cmake --install build
|
||||||
|
|
||||||
|
RUN ccache --show-stats
|
||||||
|
|
||||||
|
|
||||||
# -------- Runtime Stage (clean) --------
|
# -------- Runtime Stage (clean) --------
|
||||||
FROM ubuntu:26.04
|
FROM ubuntu:26.04
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue