Skip to content

Commit

Permalink
Add GitHub workflow covering libxc 7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderhe committed Dec 6, 2024
1 parent 85b218c commit 88a3305
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ jobs:
matrix:
os: [ubuntu-latest]
mpi: [nompi, mpich]
libxc: [6, 7]
config: [Debug]
exclude:
- mpi: nompi
libxc: 6

steps:
- name: Checkout code
Expand Down Expand Up @@ -61,36 +65,44 @@ jobs:
- name: Install BLAS
run: mamba install openblas libopenblas

- name: Install libxc
- name: Install libxc (6.2.2)
if: contains(matrix.libxc, '6')
run: mamba install libxc=6.2.2

- name: Install libxc (7.0.0)
if: contains(matrix.libxc, '7')
run: mamba install libxc=7.0.0

- name: Set libxc search path
run: echo "CMAKE_PREFIX_PATH=${CONDA_PREFIX}/" >> $GITHUB_ENV

- name: Install requirements (conda)
run: mamba install cmake fypp numpy scipy

- name: Configure build
- name: Configure build (-DTEST_MPI_PROCS=1)
if: contains(matrix.mpi, 'nompi') || contains(matrix.libxc, '6')
run: |
cmake -B ${BUILD_DIR} -DWITH_MPI=${WITH_MPI} \
-DCMAKE_INSTALL_PREFIX=${PWD}/${BUILD_DIR}/${INSTALL_DIR} \
-DCMAKE_BUILD_TYPE=${{ matrix.config }} -DTEST_MPI_PROCS=1 .
- name: Configure build (-DTEST_MPI_PROCS=2)
if: !(contains(matrix.mpi, 'nompi') || contains(matrix.libxc, '6'))
run: |
cmake -B ${BUILD_DIR} -DWITH_MPI=${WITH_MPI} \
-DCMAKE_INSTALL_PREFIX=${PWD}/${BUILD_DIR}/${INSTALL_DIR} \
-DCMAKE_BUILD_TYPE=${{ matrix.config }} .
-DCMAKE_BUILD_TYPE=${{ matrix.config }} -DTEST_MPI_PROCS=2 .
- name: Build project
run: cmake --build ${BUILD_DIR}

- name: Run regression tests
if: contains(matrix.mpi, 'nompi') || contains(matrix.libxc, '6')
run: |
pushd ${BUILD_DIR}
ctest -j2 --output-on-failure
popd
- name: Configure build (TEST_MPI_PROCS=2)
if: contains(matrix.mpi, 'openmpi') || contains(matrix.mpi, 'mpich')
run: cmake -B ${BUILD_DIR} -DTEST_MPI_PROCS=2 .

- name: Run regression tests (TEST_MPI_PROCS=2)
if: contains(matrix.mpi, 'openmpi') || contains(matrix.mpi, 'mpich')
if: !(contains(matrix.mpi, 'nompi') || contains(matrix.libxc, '6'))
run: |
pushd ${BUILD_DIR}
ctest -j1 --output-on-failure
Expand Down

0 comments on commit 88a3305

Please sign in to comment.