Skip to content

Run the PETSc CI jobs on Ubuntu 24.04 and key the cache by image - #22

Merged
timlichtenberg merged 3 commits into
mainfrom
tl/ci-petsc-cache-image
Oct 26, 2026
Merged

timlichtenberg merged 3 commits into
mainfrom
tl/ci-petsc-cache-image

Conversation

@timlichtenberg

Copy link
Copy Markdown
Member

Summary

Since 26 October ubuntu-latest runs Ubuntu 26.04, and the SPIDER CI stops before any test there. The PETSc cache saved on the old image restores a libmpi.so that needs libxml2 symbols the new image lacks, and a fresh PETSc 3.16.1 build fails on 26.04 (its configure imports xdrlib, which Python 3.13 removed, and the f2cblaslapack download does not configure). This keeps CI on a working image and makes the cache follow the image; the PETSc 3.16.1 build on Ubuntu 26.04 itself stays open.

Changes

  • The jobs that build or use PETSc (petsc, test, installer-smoke in ci.yml, full-suite in nightly.yml) run on ubuntu-24.04.
  • The PETSc cache key holds the OS release (Linux-ubuntu-24.04-petsc-63b72503), so a cache from one image is never restored on another.
  • Python 3.12 is set up before the PETSc build, for its configure scripts.
  • docs.yaml, publish-test-badges.yml and release-guard.yml stay on ubuntu-latest: they use neither PETSc nor apt-get.

Validation

Runs on the branch tip 2757fc12f2af02d17ec4acd2b63945f79dcdefd5:

A PETSc tree built on one Ubuntu release links against its libraries, and the cached libmpi.so from the old image needs libxml2 symbols that the Ubuntu 26.04 runner lacks. The cache key now holds the OS release from /etc/os-release, so a new release builds PETSc once and caches it again.
The configure scripts of PETSc 3.16.1 import xdrlib, which Python 3.13 removed, and the Ubuntu 26.04 runner has no older python3. The jobs that build PETSc now set up Python 3.12 first.
PETSc 3.16.1 with its bundled f2cblaslapack does not build on the Ubuntu 26.04 runner image. The jobs that build or use PETSc (CI, installer smoke and nightly) run on ubuntu-24.04 until the build works on the new image.
Copilot AI balanced review requested due to automatic review settings October 26, 2026 21:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused workflow changes consistently align runner images, cache keys, and build-time Python, with no blocking issues identified.

No open issues 🎉

What changed in this PR

This PR keeps SPIDER’s PETSc-dependent CI jobs on Ubuntu 24.04 and prevents cached PETSc builds from being shared across OS releases.

Changes:

  • Pin PETSc build, test, installer-smoke, and nightly jobs to Ubuntu 24.04.
  • Include the runner’s OS release in PETSc cache keys.
  • Set up Python 3.12 before PETSc source builds.
File Description
.github/​workflows/​nightly.yml Pins the nightly runner, isolates its PETSc cache, and selects Python 3.12.
.github/​workflows/​ci.yml Pins PETSc-dependent runners, aligns cache keys, and selects Python 3.12 for builds.

Review effort: Balanced

@timlichtenberg
timlichtenberg merged commit 6c3de16 into main Oct 26, 2026
10 checks passed
@timlichtenberg
timlichtenberg deleted the tl/ci-petsc-cache-image branch October 26, 2026 21:58
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