From f163d41e898ff0d955fe64510e94b70859aee33a Mon Sep 17 00:00:00 2001 From: milancurcic Date: Fri, 30 Aug 2024 22:34:36 -0400 Subject: [PATCH] Add cmake builds to CI --- .github/workflows/ci.yml | 54 +++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0df37f11..62f7c8e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,52 +14,50 @@ on: - "fpm.toml" - "**.f90" -env: - FPM_FFLAGS: -I/usr/include/hdf5/serial - FPM_LDFLAGS: -L/usr/lib/x86_64-linux-gnu/hdf5/serial - jobs: - build_and_test_debug_profile: + gnu-cmake-debug: name: Build and test in debug mode runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Compile + run: cmake -DCMAKE_BUILD_TYPE=Debug -DSERIAL=1 . && make + - name: Test + run: make test + gnu-cmake-release: + name: Build and test in release mode + runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + - name: Compile + run: cmake -DCMAKE_BUILD_TYPE=Release -DSERIAL=1 . && make + - name: Test + run: make test - - uses: fortran-lang/setup-fpm@v4 + gnu-fpm-debug: + name: Build and test in debug mode + runs-on: ubuntu-latest + steps: + - uses: fortran-lang/setup-fpm@v5 with: - fpm-version: "v0.6.0" - - - name: Install HDF5 - run: | - sudo apt update - sudo apt install --no-install-recommends libhdf5-dev - - uses: actions/checkout@v2 - + fpm-version: "v0.10.1" + - uses: actions/checkout@v4 - name: Compile run: fpm build --profile debug - - name: Test run: fpm test --profile debug - build_and_test_release_profile: + gnu-fpm-release: name: Build and test in release mode runs-on: ubuntu-latest - steps: - - - uses: fortran-lang/setup-fpm@v4 + - uses: fortran-lang/setup-fpm@v5 with: - fpm-version: "v0.6.0" - - - name: Install HDF5 - run: | - sudo apt update - sudo apt install --no-install-recommends libhdf5-dev - - uses: actions/checkout@v2 - + fpm-version: "v0.10.1" + - uses: actions/checkout@v4 - name: Compile run: fpm build --profile release - - name: Test run: fpm test --profile release