Skip to content

PES Generator bugfix, add new ChIMES-C parameters to calculator #99

PES Generator bugfix, add new ChIMES-C parameters to calculator

PES Generator bugfix, add new ChIMES-C parameters to calculator #99

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
gnu-build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
version: [11]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up environment (Linux)
if: contains(matrix.os, 'ubuntu')
run: |
echo "SOURCEDIR=${PWD}" >> $GITHUB_ENV
echo "WORKDIR=${PWD}" >> $GITHUB_ENV
echo "FC=gfortran" >> $GITHUB_ENV
echo "CC=gcc" >> $GITHUB_ENV
echo "CXX=g++" >> $GITHUB_ENV
sudo apt-get update
sudo apt-get install cmake ninja-build
# Note: xcode version 14.0 (default on macos-latest @ 2022-11-23) fails to link gfortran compiled
# code. Therefore, 14.1 is selected below (which seems to be installed.)
- name: Set up environment (OSX)
if: contains(matrix.os, 'macos')
run: |
xcversion select 14.1
echo "SOURCEDIR=${PWD}" >> $GITHUB_ENV
echo "WORKDIR=${PWD}" >> $GITHUB_ENV
echo "FC=gfortran-${{ matrix.version }}" >> $GITHUB_ENV
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
brew install ninja
- name: Configure build
run: |
mkdir ${WORKDIR}/_build
cd ${WORKDIR}/_build
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=${WORKDIR}/_install -DWITH_FORTRAN08_API=1 -DTEST_LABELS="minimal" ${SOURCEDIR}
cd -
- name: Build project
run: |
cd ${WORKDIR}/_build
ninja all
cd -
- name: Test project
run: |
cd ${WORKDIR}/_build
ctest
cd -
- name: Install project
run: |
cd ${WORKDIR}/_build
ninja install
cd -
- name: Run integration test
run: |
mkdir ${WORKDIR}/_build_integtest
cd ${WORKDIR}/_build_integtest
CMAKE_PREFIX_PATH=${WORKDIR}/_install cmake -G Ninja ${SOURCEDIR}/serial_interface/examples/fortran08
ninja all
LD_LIBRARY_PATH=${WORKDIR}/_install/lib ./test_chimescalc ${SOURCEDIR}/serial_interface/tests/force_fields/test_params.CHON.txt ${SOURCEDIR}/serial_interface/tests/configurations/CHON.testfile.000.xyz | grep "Energy (kcal/mol): -7.83714"