From ae0699b2da084e16794d6167bfd80ef92318e517 Mon Sep 17 00:00:00 2001 From: timlichtenberg Date: Mon, 26 Oct 2026 21:23:02 +0100 Subject: [PATCH 1/3] Key the PETSc cache on the runner OS release 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. --- .github/workflows/ci.yml | 10 ++++++++-- .github/workflows/nightly.yml | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6eba33ec..45ff0e03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,12 +24,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + - name: Runner OS release + id: os + run: . /etc/os-release && echo "release=${ID}-${VERSION_ID}" >> "$GITHUB_OUTPUT" - name: PETSc cache id: petsc-cache uses: actions/cache@v5 with: path: petsc - key: ${{ runner.os }}-petsc-63b72503 + key: ${{ runner.os }}-${{ steps.os.outputs.release }}-petsc-63b72503 - name: Build PETSc if: steps.petsc-cache.outputs.cache-hit != 'true' run: | @@ -52,11 +55,14 @@ jobs: - uses: actions/checkout@v6 with: fetch-depth: 0 + - name: Runner OS release + id: os + run: . /etc/os-release && echo "release=${ID}-${VERSION_ID}" >> "$GITHUB_OUTPUT" - name: PETSc cache uses: actions/cache@v5 with: path: petsc - key: ${{ runner.os }}-petsc-63b72503 + key: ${{ runner.os }}-${{ steps.os.outputs.release }}-petsc-63b72503 fail-on-cache-miss: true - name: Install Python requirements run: pip install -r py/requirements.txt pytest pytest-timeout ruff gcovr 'proteus-mpl>=1.4.0' diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index e4f0d17d..e2578f35 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -17,12 +17,15 @@ jobs: PETSC_ARCH: arch-test steps: - uses: actions/checkout@v6 + - name: Runner OS release + id: os + run: . /etc/os-release && echo "release=${ID}-${VERSION_ID}" >> "$GITHUB_OUTPUT" - name: PETSc cache id: petsc-cache uses: actions/cache@v5 with: path: petsc - key: ${{ runner.os }}-petsc-63b72503 + key: ${{ runner.os }}-${{ steps.os.outputs.release }}-petsc-63b72503 - name: Build PETSc if: steps.petsc-cache.outputs.cache-hit != 'true' run: | From 25f28b4f692854c428e963b49f85f96d121e4941 Mon Sep 17 00:00:00 2001 From: timlichtenberg Date: Mon, 26 Oct 2026 21:39:09 +0100 Subject: [PATCH 2/3] Build PETSc with Python 3.12 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. --- .github/workflows/ci.yml | 4 ++++ .github/workflows/nightly.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45ff0e03..9486abf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,10 @@ jobs: with: path: petsc key: ${{ runner.os }}-${{ steps.os.outputs.release }}-petsc-63b72503 + - name: Python 3.12 for the PETSc configure scripts + uses: actions/setup-python@v5 + with: + python-version: "3.12" - name: Build PETSc if: steps.petsc-cache.outputs.cache-hit != 'true' run: | diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index e2578f35..5e657f5e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -26,6 +26,10 @@ jobs: with: path: petsc key: ${{ runner.os }}-${{ steps.os.outputs.release }}-petsc-63b72503 + - name: Python 3.12 for the PETSc configure scripts + uses: actions/setup-python@v5 + with: + python-version: "3.12" - name: Build PETSc if: steps.petsc-cache.outputs.cache-hit != 'true' run: | From 2757fc12f2af02d17ec4acd2b63945f79dcdefd5 Mon Sep 17 00:00:00 2001 From: timlichtenberg Date: Mon, 26 Oct 2026 21:51:11 +0100 Subject: [PATCH 3/3] Run the PETSc jobs on Ubuntu 24.04 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. --- .github/workflows/ci.yml | 6 +++--- .github/workflows/nightly.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9486abf4..903767b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: # Builds (or restores) the PETSc dependency. Separated from the test # job so the test job can carry a tight wallclock cap while a cold # PETSc build from source stays possible. - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 - name: Runner OS release @@ -48,7 +48,7 @@ jobs: test: needs: petsc - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 # Hard wallclock cap on the fast tier; slower work belongs in the # nightly workflow. timeout-minutes: 10 @@ -155,7 +155,7 @@ jobs: --txt --fail-under-line "$FAST" installer-smoke: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 - name: Install Python requirements diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5e657f5e..0b5dae32 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -10,7 +10,7 @@ permissions: jobs: full-suite: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 timeout-minutes: 120 env: PETSC_DIR: ${{ github.workspace }}/petsc