Merge pull request #45 from Fraser-Birks/master #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |