updated arch builder
CI / Build arch-builder docker images (push) Has been cancelled

This commit is contained in:
2025-12-31 19:34:11 +08:00
parent 6708b8e3ec
commit 9836ca4ccc
4 changed files with 81 additions and 19 deletions
+29 -1
View File
@@ -81,6 +81,34 @@ WORKDIR /home/luser
FROM base AS rust
RUN mkdir -p /etc/cargo
COPY --chown=1000:1000 config.toml /home/luser/.cargo/config.toml
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
rustup \
trunk \
llvm \
clang
FROM rust AS rust-full
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
hidapi \
protobuf
USER luser
WORKDIR /home/luser
RUN rustup update
RUN rustup toolchain install stable-x86_64-unknown-linux-gnu --profile minimal
RUN rustup component add rustfmt
RUN rustup target add \
x86_64-unknown-linux-musl \
x86_64-unknown-linux-gnu \
armv7-unknown-linux-musleabihf \
arm-unknown-linux-musleabi \
aarch64-unknown-linux-musl \
aarch64-unknown-linux-gnu \
wasm32-unknown-unknown \
wasm32-wasip2
FROM base AS rust-sccache
RUN mkdir -p /etc/cargo
COPY --chown=1000:1000 config-sccache.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 \
rustup \
@@ -89,7 +117,7 @@ RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
llvm \
clang
FROM rust AS rust-full
FROM rust-sccache AS rust-full-scache
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
hidapi \
protobuf
+23
View File
@@ -0,0 +1,23 @@
[target.aarch64-unknown-linux-musl]
linker = "/opt/x-tools/aarch64-unknown-linux-musl/bin/aarch64-unknown-linux-musl-ld"
[target.x86_64-unknown-linux-musl]
linker = "/opt/x-tools/x86_64-unknown-linux-musl/bin/x86_64-unknown-linux-musl-ld"
[target.x86_64-pc-windows-gnu]
linker = "/opt/x-tools/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc"
[target.armv7-unknown-linux-musleabihf]
linker = "/opt/x-tools/arm-unknown-linux-musleabihf/bin/arm-unknown-linux-musleabihf-ld"
[registries.gitea]
global-credential-providers = ["cargo:token"]
index = "sparse+https://gitea.woggioni.net/api/packages/woggioni/cargo/"
[net]
git-fetch-with-cli = true
[profile.release]
opt-level = 3
lto = true
strip = true
[build]
rustc-wrapper = "/usr/bin/sccache"
-3
View File
@@ -18,6 +18,3 @@ git-fetch-with-cli = true
opt-level = 3
lto = true
strip = true
[build]
rustc-wrapper = "/usr/bin/sccache"