Skip to content

readd C++ standard update #32

readd C++ standard update

readd C++ standard update #32

Workflow file for this run

name: Run LAMMPS-Python tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
torch-version: [1.11.0]
nequip-branch: ["main"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
TORCH: "${{ matrix.torch-version }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pip install --upgrade pip
pip install torch==${TORCH} -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install pytest
pip install pytest-xdist[psutil]
pip install mkl-include
- name: Install NequIP
env:
NEQUIP: "${{ matrix.nequip-branch }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install --upgrade-strategy only-if-needed "https://github.com/mir-group/nequip/archive/${NEQUIP}.zip"
- name: Fetch and build LAMMPS
run: |
mkdir lammps_dir/
cd lammps_dir/
git clone --depth 1 "https://github.com/lammps/lammps"
cd ..
./patch_lammps.sh lammps_dir/lammps/
cd lammps_dir/lammps/
mkdir build/
cd build/
cmake ../cmake -DCMAKE_PREFIX_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` -DMKL_INCLUDE_DIR=`python -c "import sysconfig;from pathlib import Path;print(Path(sysconfig.get_paths()[\"include\"]).parent)"`
make -j$(nproc)
echo "LAMMPS in dir"
pwd
ls lmp
cd ../../..
echo "Now in dir"
pwd
- name: Run tests with pytest
run: |
# See https://github.com/pytest-dev/pytest/issues/1075
PYTHONHASHSEED=0 LAMMPS=`pwd`/lammps_dir/lammps/build/lmp pytest -n auto tests/