Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
27b71db
#71 Add Ubuntu 25.10 to CI testing
kwabenantim Mar 26, 2026
127d0f3
#71 Update apt-get lines for container
kwabenantim Mar 26, 2026
06b1a6c
#71 Always say yes to apt-get in containers
kwabenantim Mar 26, 2026
5564803
#71 Use conda not mamba
kwabenantim Mar 26, 2026
d7465e2
#71 Update github actions
kwabenantim Mar 26, 2026
0335012
#71 Simplify ubuntu test workflow
kwabenantim Mar 26, 2026
dcd8001
#71 Update vtk version finding in CI
kwabenantim Mar 26, 2026
4ac1f8d
#71 Make vtk finding in CI more robust
kwabenantim Mar 26, 2026
ba94852
#71 Add git safe directory in container CI
kwabenantim Mar 26, 2026
b70db9c
#71 Fix paths on CI
kwabenantim Mar 26, 2026
160d403
#71 Fix conda local install
kwabenantim Mar 26, 2026
4012283
#71 Upgrade pip on CI
kwabenantim Mar 26, 2026
d591e5b
#71 Simplify ubuntu test venv
kwabenantim Mar 26, 2026
a55ad75
#71 Pin status badges to develop
kwabenantim Mar 26, 2026
ac0ce6c
#71 Add conda clean in CI
kwabenantim Mar 26, 2026
7443e37
#71 Stagger start of conda jobs
kwabenantim Mar 27, 2026
9303945
#71 Verbose conda install
kwabenantim Mar 27, 2026
17c3439
#71 Adjust conda channel priority
kwabenantim Mar 27, 2026
10f13d1
#71 Reduce conda test stagger time
kwabenantim Mar 27, 2026
a93655d
#71 Simplify conda prepend channel
kwabenantim Mar 27, 2026
67ad224
#71 Try defaults channel for conda-build on 3.12
kwabenantim Mar 27, 2026
042dc0a
#71 Try flexible channel priorities for conda-build on 3.12
kwabenantim Mar 27, 2026
e48bf20
#71 Run all conda tests
kwabenantim Mar 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 29 additions & 11 deletions .github/workflows/test-cells-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ on:
jobs:
test-cells-conda:
runs-on: ubuntu-latest
timeout-minutes: 90

strategy:
fail-fast: false
max-parallel: 2
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

Expand All @@ -24,33 +26,51 @@ jobs:
shell: bash -el {0} # -l needed to activate conda

steps:
- name: Staggered sleep
run: |
if [[ "${{ matrix.python-version }}" == '3.8' ]]; then
echo "Sleeping for 3 minutes to stagger the start of the workflow..."
sleep 3m
fi
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install castxml clang cmake git
sudo apt-get install freeglut3-dev libglew-dev mesa-utils openbox xauth xorg
- name: Setup Miniconda Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
use-mamba: true
miniforge-version: latest
python-version: ${{ matrix.python-version }}
channels: conda-forge,defaults
conda-remove-defaults: "false"

- name: Install cppwg
run: |
python -m pip install --upgrade pip
python -m pip install .
python3 -m pip install --upgrade pip
python3 -m pip install .
- name: Install requirements
run: mamba install --yes --file conda/requirements.txt
run: |
conda clean --all --yes
conda config --prepend channels conda-forge
conda config --set channel_priority strict
conda config --get channels
conda install --yes -vv --file conda/requirements.txt
working-directory: examples/cells

- name: Install conda-build tools
run: |
conda config --set channel_priority flexible
conda config --get channels
conda install --yes -vv boa conda-build conda-verify
- name: Set config paths
run: |
echo "CMAKE_PREFIX_PATH=$CONDA_PREFIX;$CMAKE_PREFIX_PATH" >> $GITHUB_ENV
Expand All @@ -77,17 +97,15 @@ jobs:
grep "Unknown class" build/cppwg.log
working-directory: examples/cells

- name: Install conda-build tools
run: mamba install boa conda-build conda-verify

- name: Build
run: |
conda mambabuild recipe -m variants/python${{ matrix.python-version }}.yaml
conda build recipe -m variants/python${{ matrix.python-version }}.yaml --output-folder ./build
working-directory: examples/cells/conda

- name: Install
run: mamba install --use-local pycells
run: conda install -c ./build pycells
working-directory: examples/cells/conda

- name: Test
run: python -m unittest discover tests
run: python3 -m unittest discover tests
working-directory: examples/cells
61 changes: 41 additions & 20 deletions .github/workflows/test-cells-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,72 +8,87 @@ on:

jobs:
test-cells-ubuntu:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
os: ["ubuntu-22.04", "ubuntu-24.04"]
image: ["ubuntu:22.04", "ubuntu:24.04", "ubuntu:25.10"]

container:
image: ${{ matrix.image }}

concurrency:
group: test-cells-ubuntu-${{ github.ref }}-${{ matrix.os }}
group: test-cells-ubuntu-${{ github.ref }}-${{ matrix.image }}
cancel-in-progress: true

defaults:
run:
shell: bash -el {0} # -l needed to activate pipx

steps:
- name: Install git
run: |
apt-get update
apt-get install -y git

- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install system dependencies
- name: Set git safe directory
run: |
sudo apt-get update
git config --global --add safe.directory $PWD

for vtk_ver in $(seq 7 9); do
available=1
dpkg -s "libvtk${vtk_ver}-dev" || available=0
if [ "${available}" -eq 1 ]; then
- name: Get system VTK version
run: |
vtk_ver=
for candidate in $(seq 7 99); do
vtk_pkg="$(apt-cache search --names-only ^libvtk${candidate}-dev$)"
if [ -n "${vtk_pkg}" ]; then
vtk_ver="${candidate}"
break
fi
done
echo "VTK version: ${vtk_ver}"
echo "VTK_VERSION=${vtk_ver}" >> $GITHUB_ENV

sudo apt-get install \
- name: Install system dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get install -y \
castxml \
clang \
cmake \
git \
libboost-all-dev \
libpetsc-real-dev \
libvtk${vtk_ver}-dev \
libvtk${{ env.VTK_VERSION }}-dev \
mpi-default-bin \
mpi-default-dev \
pipx \
python3-mpi4py \
python3-petsc4py-real \
python3-pip \
python3-vtk${vtk_ver}
python3-vtk${{ env.VTK_VERSION }}

pipx ensurepath

# Check installed package versions
- name: Check installed package versions
run: |
dpkg-query -W \
castxml \
clang \
cmake \
git \
libboost-all-dev \
libpetsc-real-dev \
libvtk${vtk_ver}-dev \
libvtk${{ env.VTK_VERSION }}-dev \
mpi-default-bin \
mpi-default-dev \
pipx \
python3-mpi4py \
python3-petsc4py-real \
python3-pip \
python3-vtk${vtk_ver}
python3-vtk${{ env.VTK_VERSION }}

- name: Install cppwg
run: pipx install .
Expand All @@ -97,15 +112,21 @@ jobs:
grep "Unknown class" build/cppwg.log
working-directory: examples/cells

- name: Build
- name: Create build env
run: |
python3 -m venv --system-site-packages .venv
. .venv/bin/activate
. .venv/bin/activate && \
python3 -m pip install --upgrade pip
working-directory: examples/cells

- name: Build
run: |
. .venv/bin/activate && \
python3 -m pip install -v .
working-directory: examples/cells

- name: Test
run: |
. .venv/bin/activate
. .venv/bin/activate && \
python3 -m unittest discover tests
working-directory: examples/cells
14 changes: 7 additions & 7 deletions .github/workflows/test-shapes-pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install castxml clang cmake git
sudo apt-get install -y castxml clang cmake git

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install cppwg
run: |
python -m pip install --upgrade pip
python -m pip install .
python3 -m pip install --upgrade pip
python3 -m pip install .

- name: Regenerate wrappers
run: |
Expand Down Expand Up @@ -67,6 +67,6 @@ jobs:

- name: Test
run: |
python -m unittest test_functions.py
python -m unittest test_classes.py
python3 -m unittest test_functions.py
python3 -m unittest test_classes.py
working-directory: examples/shapes/build
10 changes: 5 additions & 5 deletions .github/workflows/test-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install dependencies
run: |
Expand All @@ -25,10 +25,10 @@ jobs:

- name: Install cppwg
run: |
python -m pip install --upgrade pip
python -m pip install .[dev]
python3 -m pip install --upgrade pip
python3 -m pip install .[dev]

- name: Lint
run: |
python -m flake8 --version
python -m flake8 .
python3 -m flake8 --version
python3 -m flake8 .
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![pip](https://github.com/Chaste/cppwg/actions/workflows/test-shapes-pip.yml/badge.svg)
![ubuntu](https://github.com/Chaste/cppwg/actions/workflows/test-cells-ubuntu.yml/badge.svg)
![conda](https://github.com/Chaste/cppwg/actions/workflows/test-cells-conda.yml/badge.svg)
![pip](https://github.com/Chaste/cppwg/actions/workflows/test-shapes-pip.yml/badge.svg?branch=develop)
![ubuntu](https://github.com/Chaste/cppwg/actions/workflows/test-cells-ubuntu.yml/badge.svg?branch=develop)
![conda](https://github.com/Chaste/cppwg/actions/workflows/test-cells-conda.yml/badge.svg?branch=develop)

# cppwg

Expand Down
Loading