-
Notifications
You must be signed in to change notification settings - Fork 7
/
.build.yml
55 lines (54 loc) · 2.58 KB
/
.build.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
# SPDX-FileCopyrightText: 2015-2023 Tanguy Fardet
# SPDX-License-Identifier: CC0-1.0
image: ubuntu/lts
sources:
- https://git.sr.ht/~tfardet/NNGT
packages:
- python3-pip
secrets:
- ceb490c3-68b4-41f7-9aa9-eb2e4b91d424
- 0b249c79-8eaf-4b82-b1d1-f3c38c7eae4b
- 3a7c042a-24d8-4f53-b75c-f061f7517b65
tasks:
- check: |
export PATH="/home/build/.local/bin:$PATH"
cd NNGT
python3 extra/check_headers.py
pip3 install reuse
reuse lint
- setup: |
sudo apt install -y software-properties-common
sudo sh -c 'echo -n "deb https://downloads.skewed.de/apt jammy main\n" >> /etc/apt/sources.list'
sudo apt-key adv --keyserver keys.openpgp.org --recv-key 612DEFB798507F25
sudo add-apt-repository -y ppa:nest-simulator/nest
sudo apt-get update -qq
sudo apt install -y gcc python3-dev libgeos-dev proj-bin libproj-dev openmpi-bin libopenmpi-dev libgmp-dev nest
sudo apt install -y python3-pip python3-tk libigraph-dev python3-graph-tool python3-cairo python3-cairocffi
pip3 install --upgrade pip setuptools
pip install --upgrade numpy scipy cython mpi4py
pip install --upgrade "networkx>=2.4" python-igraph
pip install --upgrade "matplotlib<3.7" seaborn shapely svg.path dxfgrabber cartopy geopandas descartes lxml
pip install --upgrade pytest pytest-mpi cov-core coverage coveralls[yaml]
mv .coveralls.yml NNGT/.coveralls.yml || true
cd NNGT
pip install .
echo 'export PATH=/home/build/.local/bin:$PATH' >> /home/build/.buildenv
- test: |
cd NNGT
GL=all coverage run -p -m pytest testing/library_compatibility.py
GL=gt coverage run -p -m pytest testing
GL=nx coverage run -p -m pytest testing
GL=ig coverage run -p -m pytest testing
GL=nngt coverage run -p -m pytest testing
GL=ig OMP=2 PYNEST_QUIET=1 coverage run -p -m pytest testing
GL=gt OMP=0 MPI=1 mpirun -n 2 coverage run -p -m pytest --with-mpi testing
coverage combine
GIT_BRANCH=$(git show -s --pretty=%D HEAD | tr -s ', /' '\n' | grep -v HEAD | sed -n 2p)
CI_NAME=$BUILD_SUBMITTER CI_BUILD_NUMBER=$JOB_ID CI_BUILD_URL=$JOB_URL CI_BRANCH=$GIT_BRANCH coveralls || true
- doc: |
cd NNGT
GIT_BRANCH=$(git show -s --pretty=%D HEAD | tr -s ', /' '\n' | grep -v HEAD | sed -n 2p)
set +x
. ~/.rtd_nngt
if [ "$GIT_BRANCH" == "main" ]; then curl -X POST -d "branches=main" -d "token=$rtd_nngt_token" https://readthedocs.org/api/v2/webhook/nngt/214030/; fi
set -x