-
Notifications
You must be signed in to change notification settings - Fork 9
135 lines (109 loc) · 3.4 KB
/
ci.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Continuous builds
on:
push:
branches: [ main, development, experimental, test* ]
pull_request:
branches: [ main, development, experimental, test* ]
jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: pre-commit/[email protected]
with:
extra_args: --hook-stage manual --all-files
build:
name: Build for Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
runs-on: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- runs-on: macos-latest
python-version: "3.8"
- runs-on: macos-latest
python-version: "3.9"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install HDF5 for pytables on macos-14
if: ${{ matrix.runs-on == 'macos-latest' }}
run: |
brew install hdf5
- name: Install package
run: |
python -m pip install --upgrade pip
pip install 'numpy<2.0.0' # due to lingering issues with other modules & numpy...
pip install .[dev]
- name: Lint with flake8
run: |
flake8 . --count --exit-zero --show-source --max-line-length=127 --statistics
- name: List packages so far
run: |
pip list
- name: Run simple examples
run: |
cd examples
python document.py
git diff
cd test
python test.py
- name: Test NeuroML examples
run: |
cd examples/neuroml2
python neuroml2_spec.py
# Note: NeuroML files will be validated with OMV below
- name: Test SBML examples
run: |
cd examples/sbml
./regenerateAndTest.sh
- name: Run pytest
run: |
pytest tests -v
- name: Test NeuroMLlite
run: |
git clone --branch development https://github.com/NeuroML/NeuroMLlite.git
cd NeuroMLlite
# pip install . # Use versions of neuroml libs as set in modelspec's setup.cfg -> dev -> NeuroMLlite
cd examples
python Example1.py
- name: Install MDF
run: |
git clone --branch development https://github.com/ModECI/MDF.git
cd MDF
pip install .
cd examples/MDF
python arrays.py -run # test one example
- name: Build Documentation
run: |
# Note: contributors generation below fails on py 3.7 due to pandas version...
pip install .[docs]
cd docs
python generate.py
python contributors.py
cd sphinx
make clean
make html
- name: Install and test with OMV
if: ${{ matrix.runs-on != 'windows-latest' }}
run: |
# Note: OMV not well tested on Windows...
pip install git+https://github.com/OpenSourceBrain/osb-model-validation
pip install scipy sympy matplotlib cython pandas tables
# Run OMV tests on all engines
cd examples
omv all -V
omv list -V # list installed engines
- name: Final version info
run: |
pip list
env