ci: support static cross-compilation with vendored UCI

Add Dockerfile.ci with pkg-config for vendored UCI builds. Switch
Jenkinsfile from pre-built Docker images to Dockerfile-based agents
for full control over the build environment. Add static CRT linking
via RUSTFLAGS for standalone static binaries across the CI matrix.
This commit is contained in:
Nils Andreas Svee committed 2026-08-07 16:04:59 +07:00
1 parent af07915441
commit a653bcf279
2 files changed
+13 -3

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
ARG TARGET
FROM ghcr.io/rust-cross/rust-musl-cross:${TARGET}
RUN apt-get update \
&& apt-get install -y --no-install-recommends pkg-config \
&& rm -rf /var/lib/apt/lists/*
Vendored
+6 -3
View File
@@ -12,9 +12,9 @@ pipeline {
}
agent {
docker {
image "ghcr.io/rust-cross/rust-musl-cross:${TARGET}"
alwaysPull true
dockerfile {
filename 'Dockerfile.ci'
additionalBuildArgs "--pull --build-arg TARGET=${TARGET}"
}
}
@@ -44,6 +44,9 @@ pipeline {
echo "----------------------------------"
# 5. Check Toolchain & Build
# Force standalone static artifacts across the entire CI matrix.
export RUSTFLAGS="${RUSTFLAGS:+$RUSTFLAGS }-C target-feature=+crt-static"
# We grep for "nightly" in the version string (e.g., "rustc 1.95.0-nightly...")
if rustc -V | grep -q "nightly"; then
echo "Detected Nightly toolchain. Enabling '-Z build-std' to support panic=abort..."