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 d86531d
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 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,46 @@ 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
- name: Run regression tests (-j2)
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')
- name: Run regression tests(-j1)
if: ! contains(matrix.mpi, 'nompi') || contains(matrix.libxc, '6')
run: |
pushd ${BUILD_DIR}
ctest -j1 --output-on-failure
Expand Down

0 comments on commit d86531d

Please sign in to comment.