Skip to content

ci: install from the runner's package lists instead of refreshing them first - #23

Merged
Paururo merged 1 commit into
mainfrom
ci/apt-without-update
Aug 19, 2026
Merged

Paururo merged 1 commit into
mainfrom
ci/apt-without-update

Conversation

@Paururo

@Paururo Paururo commented Aug 19, 2026

Copy link
Copy Markdown
Member

The timeout from #22 did its job on the very next run. Both jobs stopped after ten minutes instead of three and a half hours, and named the step:

##[error]The action 'Install build dependencies' has timed out after 10 minutes.

That turned a mystery into a measurement.

Where it actually hangs

Reading the failing job's log: the hang is in apt-get update, not in the install. It got through nine of roughly thirty repositories in ten minutes and never reached cmake.

Those thirty include Microsoft's azure-cli and prod feeds and Google's Chrome feed. This project has no use for any of them; they ship with the runner image and get queried on every run.

The change

The image already carries package lists, and cmake 3.22.1 has been in jammy since release. So install from those lists, and only refresh if a package cannot be found:

sudo apt-get install -y cmake ||
  { sudo apt-get update && sudo apt-get install -y cmake; }

The slow path survives for the day a list really is stale. It simply is not the path taken every time.

Applied to all four apt steps: both CI jobs, the docs social-card libraries, and the Ubuntu leg of the release matrix.

Expected side benefit

That step was the single most expensive thing in CI:

Job apt step Whole job
test 193s 5.2 min
GUI (Linux) 75s 3.2 min

Installing these packages takes seconds once the lists are not being rebuilt from thirty remote repositories.

Verified

The shell of each step was syntax-checked with bash -n, the fallback branch was exercised both ways, and the timeouts from #22 are untouched: 8 of 8 jobs still carry a ceiling.

…m first

The timeout added yesterday did its job on the very next run: both CI jobs
stopped after ten minutes instead of three and a half hours, and named the step.

    ##[error]The action 'Install build dependencies' has timed out after 10 minutes.

Which turned a mystery into a measurement. Reading that job's log, the hang is
in apt-get update and not in the install: it got through nine of roughly thirty
repositories in ten minutes and never reached cmake. Those repositories include
Microsoft's azure-cli and prod feeds and Google's Chrome feed, none of which
this project has any use for; they ship with the runner image and get queried
every time.

The image already carries package lists, and cmake 3.22.1 has been in jammy
since release. So the install now runs against those lists, and only refreshes
them if a package cannot be found:

    sudo apt-get install -y cmake ||
      { sudo apt-get update && sudo apt-get install -y cmake; }

The slow path is still there for the day a list really is stale. It just is not
the path taken every time.

Applied to all four apt steps: both CI jobs, the docs social-card libraries and
the Ubuntu leg of the release matrix. The shell of each was syntax-checked, and
the timeouts from the previous change are untouched.

This should also take a bite out of the normal case, where that step was the
single most expensive thing in CI: 193 seconds of the 5 minute test job and 75
of the 3 minute GUI job, to install packages that take seconds once the lists
are not being rebuilt from thirty remote repositories.
@Paururo Paururo added the area:ci Workflows, checks and repository automation label Aug 19, 2026
@github-actions github-actions Bot added the area:packaging Release artifacts, Bioconda, installation label Aug 19, 2026
@Paururo
Paururo merged commit 225ec6f into main Aug 19, 2026
4 checks passed
@Paururo
Paururo deleted the ci/apt-without-update branch August 19, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Workflows, checks and repository automation area:packaging Release artifacts, Bioconda, installation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant