-
Notifications
You must be signed in to change notification settings - Fork 10
136 lines (111 loc) · 3.85 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
136
name: Continuous builds
on:
push:
branches: [ master, development, experimental, modelspec ]
pull_request:
branches: [ master, development, experimental, modelspec ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
env:
JNML_HOME: "/home/runner/work/NeuroMLlite/NeuroMLlite/jNeuroML"
HDF5_DISABLE_VERSION_CHECK: 1
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install some dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Install NeuroMLlite and extra requirements
run: |
pip install .
pip install -r requirements-extra.txt
pip install 'numpy<=1.23.0' # temp fix, see https://github.com/OpenSourceBrain/osb-model-validation/issues/91
- name: Lint with flake8
run: |
flake8 . --count --exit-zero --show-source --max-line-length=127 --statistics
- name: Install correct branch of pyneuroml etc.
run: |
env
# Check to see if on development/experimental branches
export jnml_branches="development"
export pynml_branch="development"
echo "JNML_HOME: $JNML_HOME"
echo "Will use jNeuroML from branches $jnml_branches"
echo "Will use pyNeuroML from branch $pynml_branch"
# Install pyNeuroML
git clone https://github.com/NeuroML/pyNeuroML.git
cd pyNeuroML
git checkout $pynml_branch
pip install pandas==1.3.5
pip install NEURON==8.2.2 # Specify version of neuron - 8.2.1 fails
#pip install -r requirements-dev.txt
pip install .
cd -
# Install latest jnml...
git clone https://github.com/NeuroML/jNeuroML.git
cd jNeuroML
git checkout $jnml_branches
python getNeuroML.py $jnml_branches # will call mvn install on this & other repos
echo "Installed!"
ls -alth
export PATH=$PATH:$JNML_HOME
./jnml -v
which jnml
env
cd ..
- name: List packages so far
run: |
pip list
- name: Install OMV
run: |
# Install OMV
pip install git+https://github.com/OpenSourceBrain/osb-model-validation
export PATH=$PATH:$JNML_HOME
omv list -V # list all currently known...
env
- name: Install some simulators for testing
run: |
#pip install cython
omv install NEURON
pip install NetPyNE # strange issues on py3.7 with omv install...
omv install PyNN
omv install jNeuroML
omv install Brian2
omv install arbor
omv install eden
#### HDF5_DISABLE_VERSION_CHECK set globally...
#pip uninstall h5py -y
#sudo apt install -y python3-h5py # issue when building nest
#export HDF5_DISABLE_VERSION_CHECK=1
if [[ ${{ matrix.python-version }} != 2.7 ]]; then omv install PyNEST; fi
#pip install h5py
omv list -V # list installed engines
- name: Run pytest
run: |
pip install pytest tables # tables for Sonata test file
cd neuromllite/test/
pytest -v
- name: Regenerate and test
run: |
export PATH=$PATH:$JNML_HOME
export NEURON_HOME=$pythonLocation
env
echo "===================="
# All tests
./regenerateAndTest.sh
- name: Run OMV tests
run: |
omv all -V --engine=jNeuroML # limited for now, issues with nest...
omv all -V --engine=jNeuroML_NEURON # limited for now, issues with nest...
- name: OMV final version info
run: |
omv list -V # list installed engines