Skip to content

Conversation

@kroening
Copy link
Collaborator

This is an attempt to speed up CI jobs on Ubuntu runners, which spend between 2 and 3 minutes on apt-get update and apt-get install.

@kroening kroening force-pushed the ubuntu-ci-speedup branch 3 times, most recently from ac6f678 to dc00e2d Compare October 29, 2025 18:34
@tautschnig
Copy link
Collaborator

Might work most of the time, but could break at some arbitrary point of time if there ever was a security update to those packages.

@kroening
Copy link
Collaborator Author

The question is whether Github would update the image often enough?

@kroening kroening force-pushed the ubuntu-ci-speedup branch 2 times, most recently from cf8ee16 to b429c09 Compare October 29, 2025 18:53
@tautschnig
Copy link
Collaborator

The question is whether Github would update the image often enough?

I believe that's almost always true, but I recall (in other repos) adding the apt-get update step to address CI failures for the occasions where that wasn't the case. How about the following:

packages_to_install="pkg1 pkg2 ..."
if ! sudo apt-get install $packages_to_install ; then
  sudo apt-get update
  # retry after updating package indices
  sudo apt-get install $packages_to_install
fi

This is an attempt to speed up the gcc and clang-format CI jobs on the
Ubuntu runner, which spends between 2 and 3 minutes on apt-get update and
apt-get install.

Without apt-get update, the installation of the dependencies (ccache, z3,
clang-format) now takes 20 seconds.
@kroening kroening marked this pull request as ready for review October 29, 2025 20:53
@tautschnig tautschnig merged commit d4de8c0 into main Oct 30, 2025
11 checks passed
@tautschnig tautschnig deleted the ubuntu-ci-speedup branch October 30, 2025 08:04
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.

3 participants