Fix neighbor list bug for non-orthogonal cells #23
This file contains hidden or 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: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| BUILD_TYPE: Release | |
| CPM_SOURCE_CACHE: ${{ github.workspace }}/.cpm_cache | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake ninja-build gcc g++ gfortran | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Cache CPM packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.CPM_SOURCE_CACHE }} | |
| key: cpm-${{ runner.os }}-${{ hashFiles('CMakeLists.txt') }} | |
| restore-keys: | | |
| cpm-${{ runner.os }}- | |
| - name: Cache build directory | |
| uses: actions/cache@v4 | |
| with: | |
| path: build | |
| key: build-${{ runner.os }}-${{ env.BUILD_TYPE }}-${{ hashFiles('CMakeLists.txt', 'src/**', 'include/**') }} | |
| restore-keys: | | |
| build-${{ runner.os }}-${{ env.BUILD_TYPE }}- | |
| - name: Configure CMake | |
| run: | | |
| cmake -B build -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
| -DMLIPCPP_BUILD_TESTS=ON \ | |
| -DMLIPCPP_BUILD_FORTRAN=ON \ | |
| -DMLIPCPP_BUILD_PYTHON=OFF \ | |
| -DCPM_SOURCE_CACHE=${{ env.CPM_SOURCE_CACHE }} | |
| - name: Build | |
| run: cmake --build build --config ${{ env.BUILD_TYPE }} -j $(nproc) | |
| # needed for test running | |
| - name: Convert PET-MAD | |
| run: | | |
| uv run scripts/convert_pet_mad.py --output pet-mad.gguf | |
| rm -f build/tests/pet-mad.gguf | |
| cp pet-mad.gguf build/tests/ | |
| - name: Run tests | |
| working-directory: build | |
| run: ctest -C ${{ env.BUILD_TYPE }} --output-on-failure -j $(nproc) |