-
Notifications
You must be signed in to change notification settings - Fork 6
92 lines (84 loc) · 2.2 KB
/
ci_build_and_test.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
name: CI build and test
on: [push]
jobs:
ci_build_and_test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: apt-get update
run: |
sudo apt-get update --fix-missing
- name: Workaround - install CMake 3.25.2 since 3.26.0 doesn't work
run: |
sudo apt remove cmake
sudo apt purge --auto-remove cmake
wget http://www.cmake.org/files/v3.25/cmake-3.25.2.tar.gz
tar xf cmake-3.25.2.tar.gz
cd cmake-3.25.2
./configure
make
sudo make install
hash -r
cd -
- name: Show CMake version
run: |
cmake --version
- name: Install dependencies
run: |
sudo apt-get install \
libhdf5-dev \
swig4.0 \
doxygen \
graphviz \
python3 \
python3-pip \
python3-dev \
python3-numpy \
python3-yaml
- name: Install Python dependencies
run: |
pip install --upgrade pip -r requirements.txt
pip install -r requirements_full.txt
pip install -r requirements_dev.txt
pip install -r requirements_doc.txt
- name: check numpy
run: |
which python3
python3 --version
pip3 --version
python3 -c 'import numpy as np; print(np.get_include())'
- name: configure
run: |
mkdir build
cd build
Python3_ROOT=$(python3 -c 'import sys; print(sys.exec_prefix)') \
CFLAGS='-Wno-missing-field-initializers' \
cmake .. -DFORCE_EXAMPLES=ON -DWITH_FORTRAN=YES
cd -
- name: make
run: |
cd build
make
cd -
- name: install
run: |
cd build
make install
cd -
- name: make test
run: |
cd build
ctest || ctest --rerun-failed --output-on-failure -V
cd -
- name: build Linux wheel
run: |
cd python
pip install numpy wheel
python3 setup.py bdist_wheel
cd -
- name: Install python package via setup.py and test the installation
run: |
cd python
python3 setup.py install --user
cd ../bindings/python/tests
python3 __main__.py