The ubuntu-latest runner image ships GTK 4.22, which cannot satisfy the crate's v4_24/v1_10 features (they want GTK >= 4.23 / libadwaita >= 1.10, newer than the latest stable GNOME release), so the first CI run failed compiling gdk4-sys. The GNOME OS SDK is no better. Build a regent-ci image (build-aux/ci/) from Arch with the GTK/libadwaita headers, a rustup-pinned toolchain and the static cargo-deny binary baked in, register a repo-level runner with the matching label, and drop the apt/rustup/install-action steps. Bump url to 2.5.9 (RUSTSEC-2026-0592), which the cargo-deny step would otherwise fail on.
49 lines
2.5 KiB
Docker
49 lines
2.5 KiB
Docker
# Regent's CI image (Gitea Actions). Built and pushed by build-aux/ci/build-image.sh;
|
|
# referenced by the `regent-ci` runner label in .gitea/workflows/ci.yaml.
|
|
#
|
|
# Arch is the AUR target and the closest match to the development environment.
|
|
# Regent asks for GTK >= 4.23 / libadwaita >= 1.10 (the crate's `v4_24` / `v1_10`
|
|
# features), which is *newer* than the latest stable GNOME release (GNOME 50
|
|
# ships GTK 4.22 / libadwaita 1.9), so a rolling base is required — the Gitea
|
|
# runner's ubuntu-latest image and the GNOME OS SDK both fail the build.
|
|
#
|
|
# Everything the job needs is baked in: the workflow installs nothing at run
|
|
# time. nodejs is for actions/checkout and actions/cache; ca-certificates and
|
|
# curl for the crate registry, the RustSec advisory database `cargo deny` fetches,
|
|
# and the toolchain downloads below.
|
|
FROM archlinux:base-devel
|
|
|
|
RUN pacman -Syu --noconfirm --needed \
|
|
ca-certificates \
|
|
curl \
|
|
git \
|
|
nodejs \
|
|
gtk4 \
|
|
libadwaita \
|
|
pkgconf \
|
|
&& rm -rf /var/cache/pacman/pkg/*
|
|
|
|
# The `-D warnings` gate is calibrated to a compiler, so the toolchain is pinned
|
|
# here rather than installed by an action on every run. Keep this in step with
|
|
# the `rust-version` in Cargo.toml and the development machine. rustup is used
|
|
# instead of the `rust` package precisely so the compiler cannot drift with the
|
|
# rolling base.
|
|
ENV PATH=/root/.cargo/bin:$PATH
|
|
RUN pacman -S --noconfirm --needed rustup \
|
|
&& rustup toolchain install 1.99.1 --profile minimal --component clippy \
|
|
&& rustup default 1.99.1
|
|
|
|
# cargo-deny ships as a static binary. Deliberately *not* the Arch `cargo-deny`
|
|
# package: it depends on `cargo`, which pulls in the rolling `rust` package we
|
|
# are pinning away from (and conflicts with rustup).
|
|
ARG CARGO_DENY_VERSION=0.22.2
|
|
RUN cd /tmp \
|
|
&& curl -fsSLO "https://github.com/EmbarkStudios/cargo-deny/releases/download/${CARGO_DENY_VERSION}/cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl.tar.gz" \
|
|
&& curl -fsSLO "https://github.com/EmbarkStudios/cargo-deny/releases/download/${CARGO_DENY_VERSION}/cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl.tar.gz.sha256" \
|
|
&& printf '%s cargo-deny-%s-x86_64-unknown-linux-musl.tar.gz\n' \
|
|
"$(cat "cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl.tar.gz.sha256")" \
|
|
"${CARGO_DENY_VERSION}" | sha256sum -c - \
|
|
&& tar -xzf "cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl.tar.gz" \
|
|
&& install -m755 "cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl/cargo-deny" /usr/local/bin/ \
|
|
&& rm -rf /tmp/cargo-deny-*
|