From 220aa796aecb2e99263bc0f4c77cf23585ade72f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 2 Jul 2026 18:29:18 -0400 Subject: [PATCH 1/3] ci: Skip redundant package rebuild in test-container step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test-container step calls `just test-container`, whose dependency chain includes `package`. Without BOOTC_SKIP_PACKAGE=1, this triggers a full RPM package build from source inside a container — taking ~27 minutes and consuming ~5GB of container image layers — even though pre-built RPMs are already present from the download-artifact step. The build-fetch and build steps already set BOOTC_SKIP_PACKAGE=1; this was just missing from test-container. Signed-off-by: Colin Walters --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1112bab3..9fef88f68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -307,7 +307,7 @@ jobs: test ${{ matrix.test_os }} = "${used_vid}" - name: Unit and container integration tests - run: just test-container + run: BOOTC_SKIP_PACKAGE=1 just test-container - name: Validate composefs digest (UKI only) if: matrix.boot_type == 'uki' From 67909bab5e339a939f30b7b0c707ee61cef779b5 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 2 Jul 2026 18:29:54 -0400 Subject: [PATCH 2/3] ci: Disable incremental compilation in CI container builds The Dockerfile uses --mount=type=cache,target=/src/target to persist the cargo build directory across podman build invocations within a job. With incremental compilation enabled (the default for dev profile), these cache mounts accumulate incremental artifacts that waste disk space and don't help one-shot CI builds. Set CARGO_INCREMENTAL=0 in the CI workflow env and pass it through unconditionally in the Justfile's --build-arg (an empty value is a no-op for podman, identical to omitting the flag). The Dockerfile's buildroot stage turns the ARG into an ENV, so stages that inherit from it (build, units, validate, sysext) automatically pick it up. For local dev, CARGO_INCREMENTAL is unset, so cargo uses its profile defaults (incremental for dev, off for release). Signed-off-by: Colin Walters --- .github/workflows/ci.yml | 4 ++++ Dockerfile | 4 ++++ Justfile | 3 +++ 3 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fef88f68..39b35a91b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,10 @@ on: env: CARGO_TERM_COLOR: always + # Disable incremental compilation in CI; it wastes disk in the container + # build cache (--mount=type=cache,target=/src/target) and doesn't help + # one-shot builds. Wired into container builds via Justfile --build-arg. + CARGO_INCREMENTAL: "0" # Something seems to be setting this in the default GHA runners, which breaks bcvk # as the default runner user doesn't have access LIBVIRT_DEFAULT_URI: "qemu:///session" diff --git a/Dockerfile b/Dockerfile index 4de0c2e8f..3173951b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,10 @@ COPY contrib/packaging / FROM $base as buildroot # Flip this off to disable initramfs code ARG initramfs=1 +# CI passes --build-arg=CARGO_INCREMENTAL=0 to save disk in the build cache. +# When unset (local dev), cargo uses its profile defaults. +ARG CARGO_INCREMENTAL +ENV CARGO_INCREMENTAL=${CARGO_INCREMENTAL} # This installs our buildroot, and we want to cache it independently of the rest. # Basically we don't want changing a .rs file to blow out the cache of packages. # Use tmpfs for /run and /tmp with bind mounts inside to avoid leaking mount stubs into the image diff --git a/Justfile b/Justfile index 3c16ea1aa..c01717956 100644 --- a/Justfile +++ b/Justfile @@ -65,7 +65,10 @@ fedora-coreos := "quay.io/fedora/fedora-coreos:testing-devel" generic_buildargs := "" _extra_src_args := if extra_src != "" { "-v " + extra_src + ":/run/extra-src:ro --security-opt=label=disable" } else { "" } # filesystem arg: required for bootc container ukify to allow missing fsverity +# CARGO_INCREMENTAL is passed through as-is (CI sets it to 0); empty is a no-op, +# leaving cargo's own profile defaults in effect in the Dockerfile. base_buildargs := generic_buildargs + " " + _extra_src_args \ + + " --build-arg=CARGO_INCREMENTAL=" + env("CARGO_INCREMENTAL", "") \ + " --build-arg=base=" + base \ + " --build-arg=variant=" + variant \ + " --build-arg=bootloader=" + bootloader \ From e60c83fa9c6ca5426f78e05d49e4afaa404d688e Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 2 Jul 2026 18:30:17 -0400 Subject: [PATCH 3/3] ci: Prune container build cache before TMT tests The Dockerfile's --mount=type=cache mounts for target/ and .cargo persist across podman build invocations within a job, accumulating several GB of Rust compilation artifacts. By the time TMT starts, this cache is no longer needed (the container images are already built), but it still occupies disk space. Prune it before the TMT step to reclaim headroom for the 32 sequential VM test plans. This is especially important on the smaller (72GB) GHA runners where baseline disk usage of ~63GB leaves only ~9GB for VM overlays. Signed-off-by: Colin Walters --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39b35a91b..d5f80bae0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -317,6 +317,9 @@ jobs: if: matrix.boot_type == 'uki' run: just validate-composefs-digest + - name: Reclaim disk space before TMT + run: podman builder prune -af + - name: Run TMT integration tests run: | if [[ "${{ matrix.variant }}" = composefs ]]; then