-
Notifications
You must be signed in to change notification settings - Fork 25
72 lines (59 loc) · 1.82 KB
/
run_tests.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
name: CI
on:
push:
branches:
- '*'
tags:
- '*'
jobs:
build:
runs-on: ubuntu-focal
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update -qy
sudo apt-get install -y gfortran libopenmpi-dev libopenblas-dev liblapack-dev libnetcdff-dev python-numpy
python3 -m pip install setuptools
python3 -m pip install -r requirements.txt
# - name: Compile LAMMPS interface
# run: |
# cd build_lammps
# cp Makefile.gnu Makefile
# make lammps_factories
# make atomistica
- name: Compile Fortran unit tests
run: |
cd build_unittests
cp Makefile.gnu Makefile
make unittests
- name: Compile and install Python bindings
run: |
python3 -m pip install .
- name: Compile standalone code
run: |
cd build_standalone
cp Makefile.gnu Makefile
make factories
make mdcore
- name: Fetch Slater-Koster databases for tests
run: |
curl https://dftb.org/fileadmin/DFTB/public/slako/mio/mio-1-1.tar.xz | tar -Jx
curl https://dftb.org/fileadmin/DFTB/public/slako/3ob/3ob-3-1.tar.xz | tar -Jx
- name: Run Fortran unit tests
run: |
cd build_unittests
./unittests
- name: Run Python binding tests
run: |
cd tests
MIO='../mio-1-1' DFTB3='../3ob-3-1' pytest -s --verbose
- name: Run standalone examples
run: |
for i in `ls -1 $GITHUB_WORKSPACE/examples/STANDALONE`; do
if [ -d "$GITHUB_WORKSPACE/examples/STANDALONE/$i" ]; then
echo "=== $i ==="
cd $GITHUB_WORKSPACE/examples/STANDALONE/$i
TBPARAM=$GITHUB_WORKSPACE/mio-1-1 $GITHUB_WORKSPACE/build_standalone/mdcore-*
fi
done