Skip to content

ci: speed up the multi-arch builds - #179

Merged
kolyshkin merged 4 commits into
containers:mainfrom
kolyshkin:ci-speedup
Oct 12, 2026
Merged

kolyshkin merged 4 commits into
containers:mainfrom
kolyshkin:ci-speedup

Conversation

@kolyshkin

@kolyshkin kolyshkin commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

The "Build on" jobs take about 8 minutes, mostly because everything,
including autotools and make distcheck, runs under QEMU emulation.

So while waiting on it (for #177), I decided to speed it up a bit.

This PR:

  1. Moves aarch64 to a native ubuntu-24.04-arm runner. The build
    script is shared between the native and emulated jobs via a YAML
    anchor.
  2. Runs autogen.sh on the host rather than under emulation (with
    NOCONFIGURE=1, which also removes a redundant configure run, as
    autogen.sh was running it before the explicit ./configure).
  3. Runs make distcheck (and the clean working tree check) only in the
    native job, as what it validates does not depend on the
    architecture. Also, run the tests in parallel.
  4. Installs fewer packages in the emulated container: drops git,
    wget, and xz-utils, which are no longer needed, and uses
    --no-install-recommends (which brings the package count down from
    125 to about 55). This matters because the container image is built
    under emulation whenever the package list changes. Note that the
    image is cached in ghcr.io, but only pushes to main can update it,
    so in this PR it is rebuilt on every run, adding about a minute.

Should bring the builds down from ~8 to ~3 minutes (and to <1 minute for arm64).

GitHub now provides native arm64 runners, so there is no need to
build aarch64 under QEMU emulation, which is slow.

Move aarch64 to a separate job that runs on ubuntu-24.04-arm,
sharing the build script with the emulated job via a YAML anchor.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Running autotools under QEMU is slow. As the generated files do not
depend on the target architecture, run autogen.sh natively on the
host, and only do configure and make in the emulated environment.

This also means autotools are no longer needed inside the emulated
container. The explicit submodule update in setup is redundant, as
actions/checkout already fetches submodules.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
In the emulated builds, distcheck takes about half of the job time, as
it does yet another configure and a full rebuild under QEMU. What it
validates (the distribution tarball and a VPATH build) does not depend
on the architecture, so it is enough to run it once natively.

While at it, run the tests in parallel.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
The packages are installed under emulation, which is slow. Yet, the
list includes git, wget, and xz-utils, which are no longer needed
(and wget never was), and apt also pulls in a lot of recommended
packages, such as perl, fonts, and fontconfig.

Remove the unneeded packages, and use --no-install-recommends.
As gcc only recommends libc6-dev, add it explicitly.

As git is no longer available, drop the safe.directory setup.
It is not needed in the native job either, since actions/checkout
already does that (see set-safe-directory).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
kolyshkin marked this pull request as ready for review October 12, 2026 06:25

@giuseppe giuseppe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Does Merge work now? :-)

@kolyshkin
kolyshkin merged commit ee2abf7 into containers:main Oct 12, 2026
7 checks passed
@kolyshkin

Copy link
Copy Markdown
Collaborator Author

Does Merge work now? :-)

it does, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants