-
Notifications
You must be signed in to change notification settings - Fork 10
111 lines (92 loc) · 3.17 KB
/
test-cells-conda.yml
File metadata and controls
111 lines (92 loc) · 3.17 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: test-cells-conda
on:
workflow_dispatch:
pull_request:
branches:
- "**"
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"]
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: 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@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
miniforge-version: latest
python-version: ${{ matrix.python-version }}
channels: conda-forge,defaults
conda-remove-defaults: "false"
- name: Install cppwg
run: |
python3 -m pip install --upgrade pip
python3 -m pip install .
- name: Install requirements
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
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: |
conda build recipe -m variants/python${{ matrix.python-version }}.yaml --output-folder ./build
working-directory: examples/cells/conda
- name: Install
run: conda install -c ./build pycells
working-directory: examples/cells/conda
- name: Test
run: python3 -m unittest discover tests
working-directory: examples/cells