Skip to content

Custom Ubuntu base#101

Merged
kwabenantim merged 17 commits into
mainfrom
98-custom-ubuntu-base
May 22, 2026
Merged

Custom Ubuntu base#101
kwabenantim merged 17 commits into
mainfrom
98-custom-ubuntu-base

Conversation

@kwabenantim
Copy link
Copy Markdown
Member

Supports #98

@kwabenantim kwabenantim self-assigned this Apr 30, 2026
@kwabenantim kwabenantim mentioned this pull request May 19, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for selecting the Ubuntu base (codename) used for custom dependency images and rebuild workflows, aligning with Issue #98 (“Specify Ubuntu base for custom images”) and introducing Ubuntu 22.04/24.04/26.04 setup paths.

Changes:

  • Introduce OS/version helper scripts (scripts/env.sh, scripts/functions.sh) and refactor scripts/common.sh to source them.
  • Split custom Ubuntu setup into per-LTS scripts (22.04/24.04/26.04) and route via setup_custom.sh.
  • Parameterize Docker/custom workflows to select Ubuntu codename (defaulting to resolute) and update build workflows to run inside ubuntu:<codename> containers.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
tests/test_common.sh Updates script path resolution for sourcing shared shell helpers.
scripts/system/setup_system.sh Switches to bash + shared env helpers; adds python-is-python3; uses OS codename variable.
scripts/functions.sh New shared version parsing/comparison functions for scripts.
scripts/env.sh New shared OS version/codename detection for scripts.
scripts/custom/setup_ubuntu_2604.sh New Ubuntu 26.04 dependency bootstrap script.
scripts/custom/setup_ubuntu_2404.sh New Ubuntu 24.04 dependency bootstrap script.
scripts/custom/setup_ubuntu_2204.sh New Ubuntu 22.04 dependency bootstrap script (incl. cmake via pip for HDF5 2.x).
scripts/custom/setup_custom.sh Routes setup to the appropriate per-LTS setup script based on OS codename.
scripts/custom/patches/README.md Documents patch sources for vendored dependency patches.
scripts/custom/install_xsd.sh Updates script dir resolution and shared helper sourcing.
scripts/custom/install_xercesc.sh Updates script dir resolution and shared helper sourcing.
scripts/custom/install_vtk.sh Updates helper sourcing and patch directory handling.
scripts/custom/install_sundials.sh Updates script dir resolution and shared helper sourcing.
scripts/custom/install_python.sh Updates script dir resolution and shared helper sourcing.
scripts/custom/install_petsc.sh Updates script dir resolution and shared helper sourcing.
scripts/custom/install_petsc_hdf5.sh Updates script dir resolution and shared helper sourcing.
scripts/custom/install_hdf5.sh Updates script dir resolution and shared helper sourcing.
scripts/custom/install_cmake.sh Updates script dir resolution and shared helper sourcing.
scripts/custom/install_boost.sh Updates helper sourcing and patch directory handling.
scripts/common.sh Refactors shared script utilities to source env.sh and functions.sh.
Dockerfile.system Changes default Ubuntu base build arg to resolute.
Dockerfile.custom Adds BASE build arg for selecting Ubuntu base image.
.github/workflows/docker-portability-system.yml Changes default Ubuntu codename input to resolute.
.github/workflows/docker-portability-custom.yml Adds Ubuntu codename input and passes it as BASE build arg.
.github/workflows/build-xsd.yml Adds Ubuntu codename input; runs build inside ubuntu:<codename> container; removes sudo.
.github/workflows/build-xercesc.yml Adds Ubuntu codename input; runs build inside ubuntu:<codename> container; removes sudo.
.github/workflows/build-vtk.yml Adds Ubuntu codename input; runs build inside ubuntu:<codename> container; removes sudo.
.github/workflows/build-sundials.yml Adds Ubuntu codename input; runs build inside ubuntu:<codename> container; removes sudo.
.github/workflows/build-petsc.yml Adds Ubuntu codename input; runs build inside ubuntu:<codename> container; removes sudo.
.github/workflows/build-hdf5.yml Adds Ubuntu codename input; runs build inside ubuntu:<codename> container; removes sudo.
.github/workflows/build-boost.yml Adds Ubuntu codename input; runs build inside ubuntu:<codename> container; removes sudo.
.github/workflows/build-all.yml Adds Ubuntu codename input; runs build inside ubuntu:<codename> container; removes sudo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +31 to +35
runs-on: ubuntu-latest

container:
image: "ubuntu:${{ github.event.inputs.ubuntu_codename }}"
env:
Comment on lines +31 to +35
runs-on: ubuntu-latest

container:
image: "ubuntu:${{ github.event.inputs.ubuntu_codename }}"
env:
Comment on lines +31 to +35
runs-on: ubuntu-latest

container:
image: "ubuntu:${{ github.event.inputs.ubuntu_codename }}"
env:
Comment on lines +31 to +35
runs-on: ubuntu-latest

container:
image: "ubuntu:${{ github.event.inputs.ubuntu_codename }}"
env:
Comment on lines +40 to +44
runs-on: ubuntu-latest

container:
image: "ubuntu:${{ github.event.inputs.ubuntu_codename }}"
env:
Comment thread scripts/custom/setup_custom.sh Outdated
Comment on lines +1 to +5
#!/bin/bash

# Setup required libraries for building Chaste dependencies on Ubuntu 22.04 Jammy
# Setup required libraries for building Chaste dependencies on Ubuntu LTS
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) # https://stackoverflow.com/a/246128
. ${script_dir}/../common.sh
Comment on lines +2 to +9

# Setup required libraries for building Chaste dependencies on Ubuntu 22.04 Jammy LTS

export DEBIAN_FRONTEND=noninteractive

# Base dependencies
apt-get update
apt-get install -y --no-install-recommends \
Comment thread scripts/custom/setup_ubuntu_2404.sh Outdated
Comment on lines +1 to +8
#!/bin/bash

# Setup required libraries for building Chaste dependencies on Ubuntu 24.04 Noble LTS

export DEBIAN_FRONTEND=noninteractive

# Base dependencies
apt-get update
Comment thread scripts/custom/setup_ubuntu_2604.sh Outdated
Comment on lines +1 to +8
#!/bin/bash

# Setup required libraries for building Chaste dependencies on Ubuntu 26.04 Resolute LTS

export DEBIAN_FRONTEND=noninteractive

# Base dependencies
apt-get update
Comment thread scripts/functions.sh
Comment on lines +50 to +56
{
local arr_x maj_x min_x patch_x
local arr_y maj_y min_y patch_y

read -r _ maj_x min_x patch_x _ < <(split_version $1)
read -r _ maj_y min_y patch_y _ < <(split_version $2)

@kwabenantim
Copy link
Copy Markdown
Member Author

The portability-dev image has built correctly with an Ubuntu 26.04 Resolute base:

https://github.com/Chaste/dependency-modules/actions/runs/26243384124

@kwabenantim kwabenantim marked this pull request as ready for review May 22, 2026 08:40
@kwabenantim kwabenantim requested a review from fcooper8472 May 22, 2026 08:40
@kwabenantim kwabenantim linked an issue May 22, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Member

@fcooper8472 fcooper8472 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@kwabenantim kwabenantim merged commit 4738a30 into main May 22, 2026
1 of 3 checks passed
@kwabenantim kwabenantim deleted the 98-custom-ubuntu-base branch May 22, 2026 09:19
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.

Specify Ubuntu base for custom images

3 participants