diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 261602ae..e0297fc4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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