Typecaster examples #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test-cells | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
test-cells: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
concurrency: | |
group: test-cells-${{ github.ref }}-${{ matrix.python-version }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash -el {0} # -l needed to activate conda | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install cmake | |
- 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 }} | |
activate-environment: test_cells | |
channels: conda-forge | |
- name: Install cppwg | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install . | |
- name: Install requirements | |
run: | | |
mamba install --yes --file requirements.txt | |
working-directory: examples/cells | |
- name: Set config paths | |
run: | | |
echo "CMAKE_PREFIX_PATH=$CONDA_PREFIX;$CMAKE_PREFIX_PATH" >> $GITHUB_ENV | |
echo "PETSC_DIR=$CONDA_PREFIX" >> $GITHUB_ENV | |
echo "PETSC_ARCH=" >> $GITHUB_ENV | |
echo "VTK_DIR=$CONDA_PREFIX" >> $GITHUB_ENV | |
- 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 |