added sccache
Some checks failed
CI / Build arch-builder docker images (push) Failing after 21m32s

This commit is contained in:
2025-03-24 16:58:01 +08:00
parent 2cd390176f
commit 8a76515307
3 changed files with 9 additions and 4 deletions

View File

@@ -78,9 +78,12 @@ WORKDIR /home/luser
FROM base AS rust FROM base AS rust
RUN mkdir -p /etc/cargo RUN mkdir -p /etc/cargo
COPY config.toml /.cargo/ COPY --chown=1000:1000 config.toml /home/luser/.cargo/config.toml
COPY --chown=1000:1000 sccache_config.toml /home/luser/.config/sccache/config
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \ RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
rustup \ rustup \
trunk \
sccache \
llvm \ llvm \
clang clang
@@ -101,7 +104,6 @@ RUN rustup target add \
aarch64-unknown-linux-gnu \ aarch64-unknown-linux-gnu \
wasm32-unknown-unknown \ wasm32-unknown-unknown \
wasm32-wasip2 wasm32-wasip2
RUN --mount=type=cache,target=/home/luser/.cargo/registry/,uid=1000,gid=1000 cargo install --locked trunk
FROM base AS gitea_act_runner FROM base AS gitea_act_runner
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed nodejs npm docker docker-buildx btrfs-progs hidapi protobuf rustup llvm clang RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed nodejs npm docker docker-buildx btrfs-progs hidapi protobuf rustup llvm clang

View File

@@ -20,5 +20,5 @@ codegen-units = 4
lto = true lto = true
strip = true strip = true
#[build] [build]
#rustc-wrapper = "/usr/bin/sccache" rustc-wrapper = "/home/luser/.cargo/bin/sccache"

View File

@@ -0,0 +1,3 @@
[cache.disk]
dir = "/home/luser/.cache/sccache"
size = 12884901888 # 12 GiBytes