From ad2036ae68433f28bc1a7b2bc67b00e578ecadaf Mon Sep 17 00:00:00 2001 From: Alexander Soklev Date: Mon, 25 Nov 2024 12:58:30 +0200 Subject: [PATCH] Updating CICD with the new cmake build system --- .github/workflows/check-api.yml | 10 +++++--- .github/workflows/containerized-ci.yml | 24 +++++++++++++++++++- .github/workflows/continuous-integration.yml | 7 ------ environment-noplots.yml | 1 + 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/.github/workflows/check-api.yml b/.github/workflows/check-api.yml index dc6ff8094..42866440a 100644 --- a/.github/workflows/check-api.yml +++ b/.github/workflows/check-api.yml @@ -19,6 +19,7 @@ jobs: FCFLAGS: "-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -fmodule-private -fimplicit-none -finit-real=nan -g -DRTE_USE_CBOOL" RRTMGP_ROOT: ${{ github.workspace }} RTE_KERNELS: extern + RRTMGP_DATA_VERSION: v1.8.2 steps: # # Check out repository under $GITHUB_WORKSPACE @@ -31,6 +32,9 @@ jobs: - name: Build libraries run: | $FC --version - mkdir -p build_libs - cmake -S . -B build_libs -DCMAKE_Fortran_COMPILER=$FC - cmake --build build_libs --config Release -- -j8 + cmake -S . -B build \ + -DCMAKE_Fortran_COMPILER=$FC \ + -DCMAKE_Fortran_FLAGS="$FCFLAGS" \ + -DRRTMGP_DATA_VERSION=$RRTMGP_DATA_VERSION \ + -DRTE_KERNEL_MODE=$RTE_KERNELS + cmake --build build --config Release -- -j8 diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index f7f17a61c..460e63a36 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -61,6 +61,28 @@ jobs: steps: # + # Check out repository under $GITHUB_WORKSPACE + # + - name: Check out code + uses: actions/checkout@v4 + # + # Cmake setup + # + - name: Setup CMake + uses: jwlawson/actions-setup-cmake@v1 + with: + cmake-version: '3.20.0' # or any required version + # + # Synchronize the all package index + # + - name: Synchronize the package index + run: apt-get update + # + # Install NetCDF-Fortran (compatible with all compilers) + # + - name: Install NetCDF-Fortran + run: apt-get install -y libnetcdff-dev + # # Build libraries, examples and tests (expect success) # - name: Build libraries, examples and tests (expect success) @@ -83,7 +105,7 @@ jobs: - name: Run examples and tests if: steps.build-success.outcome != 'skipped' run: | - ctest -v --test-dir build + ctest -V --test-dir build # # Relax failure thresholds for single precision # diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 605cc514a..4c6006f24 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -48,13 +48,6 @@ jobs: # # Check out data # - - name: Check out data - uses: actions/checkout@v4 - with: - repository: earth-system-radiation/rrtmgp-data - path: rrtmgp-data - ref: v1.8.2 - # # Synchronize the package index # - name: Synchronize the package index diff --git a/environment-noplots.yml b/environment-noplots.yml index dfa6536fc..233bf3134 100644 --- a/environment-noplots.yml +++ b/environment-noplots.yml @@ -9,3 +9,4 @@ dependencies: - xarray - dask - numpy + - cmake