-
Notifications
You must be signed in to change notification settings - Fork 8
91 lines (73 loc) · 2.4 KB
/
test-cells-conda.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: test-cells-conda
on:
workflow_dispatch:
pull_request:
branches:
- "**"
jobs:
test-cells-conda:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
concurrency:
group: test-cells-conda-${{ 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 git
- 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
- name: Install cppwg
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: Install requirements
run: mamba install --yes --file conda/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: 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
working-directory: examples/cells/conda
- name: Install
run: mamba install --use-local pycells
- name: Test
run: python -m unittest discover tests
working-directory: examples/cells