Skip to content

Commit

Permalink
#20 Rework cells example tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kwabenantim committed Nov 5, 2024
1 parent e6e82c8 commit 7bff31e
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install cmake
sudo apt-get install cmake git
- name: Setup Miniconda Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
Expand Down Expand Up @@ -79,7 +79,11 @@ jobs:
working-directory: examples/cells

- name: Build
run: python -m pip install -v .
run: conda build conda-recipe
working-directory: examples/cells

- name: Install
run: conda install --use-local pycells
working-directory: examples/cells

- name: Test
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/test-cells-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: test-cells-ubuntu

on:
workflow_dispatch:
pull_request:
branches:
- "**"

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

jobs:
test-cells-ubuntu:
runs-on: ubuntu-22.04

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

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install \
cmake \
git \
libpetsc-real3.15 \
libpetsc-real3.15-dbg \
libpetsc-real3.15-dev \
libvtk9-dev \
mpi-default-bin \
mpi-default-dev \
python3-mpi4py \
python3-petsc4py-real3.15 \
python3-vtk9 \
vtk9
- name: Install cppwg
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: Configure
run: |
mkdir build && cd build
cmake ..
working-directory: examples/cells

- name: Regenerate wrappers
run: |
rm -rf dynamic/wrappers
cd build
make pycells_wrappers
working-directory: examples/cells

- name: Check for changes
run: |
git diff --exit-code dynamic/wrappers
grep "Unknown class" build/cppwg.log
working-directory: examples/cells

- name: Build
run: python -m pip install -v .
working-directory: examples/cells

- name: Test
run: python -m unittest discover -s tests
working-directory: examples/cells
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-shapes
name: test-shapes-pip

on:
workflow_dispatch:
Expand All @@ -7,7 +7,7 @@ on:
- "**"

jobs:
test-shapes:
test-shapes-pip:
runs-on: ubuntu-latest

strategy:
Expand All @@ -16,7 +16,7 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

concurrency:
group: test-shapes-${{ github.ref }}-${{ matrix.python-version }}
group: test-shapes-pip-${{ github.ref }}-${{ matrix.python-version }}
cancel-in-progress: true

steps:
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install cmake
sudo apt-get install cmake git
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
![shapes-example](https://github.com/Chaste/cppwg/actions/workflows/test-shapes.yml/badge.svg)
![cells-example](https://github.com/Chaste/cppwg/actions/workflows/test-cells.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)
![ubuntu](https://github.com/Chaste/cppwg/actions/workflows/test-cells-ubuntu.yml/badge.svg)

# cppwg

Expand Down

0 comments on commit 7bff31e

Please sign in to comment.