From 80b92dd6e8778d880029153cd8817d10dd245a8e Mon Sep 17 00:00:00 2001 From: Robert Pincus Date: Wed, 7 Dec 2022 13:43:34 -0500 Subject: [PATCH 1/5] Update to Ubuntu 22.04 --- .github/workflows/continuous-integration.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index b3844b2..db64207 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -3,17 +3,18 @@ on: [push, pull_request] jobs: CI: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 defaults: run: shell: bash -l {0} strategy: matrix: - fortran-compiler: [gfortran-9, gfortran-10] + gnu-compiler-version: [10, 11, 12] + rte-kernels: [default, openacc] env: - FC: ${{ matrix.fortran-compiler }} + FC: gfortran-${{ matrix.gnu-compiler-version }} + CC: gcc-${{ matrix.gnu-compiler-version }} FCFLAGS: "-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -finit-real=nan -g -DRTE_USE_CBOOL" - CC: gcc NCHOME: /home/runner/netcdf-c NFHOME: /home/runner/netcdf-fortran RFMIP_DIR: /home/runner/rfmip-files @@ -23,14 +24,10 @@ jobs: ############################################################################ # # Compilers.... - # - # Gfortran 10 not available in Github CI stack, so install - # - - name: gfortran-10 setup compiler - if: contains(matrix.fortran-compiler, 'gfortran-10') + # # + - name: install compilers run: | - sudo apt-get install gfortran-10 gcc-10 - echo "CC=gcc-10" >> $GITHUB_ENV + sudo apt-get install gfortran-${{ matrix.gnu-compiler-version }} gcc-${{ gnu-compiler-version }} ############################################################################ # From b008a6e7c3198919f95cb886dcb9805d5926d86a Mon Sep 17 00:00:00 2001 From: Robert Pincus Date: Wed, 7 Dec 2022 13:45:27 -0500 Subject: [PATCH 2/5] YML syntax? --- .github/workflows/continuous-integration.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index db64207..0196e37 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -26,8 +26,7 @@ jobs: # Compilers.... # # - name: install compilers - run: | - sudo apt-get install gfortran-${{ matrix.gnu-compiler-version }} gcc-${{ gnu-compiler-version }} + run: sudo apt-get install gfortran-${{ matrix.gnu-compiler-version }} gcc-${{ gnu-compiler-version }} ############################################################################ # From db8d0df2a0559734bed06fa9a19610d4e76a95cb Mon Sep 17 00:00:00 2001 From: Robert Pincus Date: Wed, 7 Dec 2022 13:46:12 -0500 Subject: [PATCH 3/5] YML variables --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 0196e37..785791e 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -26,7 +26,7 @@ jobs: # Compilers.... # # - name: install compilers - run: sudo apt-get install gfortran-${{ matrix.gnu-compiler-version }} gcc-${{ gnu-compiler-version }} + run: sudo apt-get install gfortran-${{ matrix.gnu-compiler-version }} gcc-${{ matrix.gnu-compiler-version }} ############################################################################ # From c95ffd73a23856131a05ff594e078c057d67fb02 Mon Sep 17 00:00:00 2001 From: Robert Pincus Date: Wed, 7 Dec 2022 13:51:11 -0500 Subject: [PATCH 4/5] No kernel variants here, also: can we install netcdf-c rather than building? --- .github/workflows/continuous-integration.yml | 29 ++------------------ 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 785791e..aba93ad 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -10,14 +10,11 @@ jobs: strategy: matrix: gnu-compiler-version: [10, 11, 12] - rte-kernels: [default, openacc] env: FC: gfortran-${{ matrix.gnu-compiler-version }} CC: gcc-${{ matrix.gnu-compiler-version }} FCFLAGS: "-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -finit-real=nan -g -DRTE_USE_CBOOL" - NCHOME: /home/runner/netcdf-c NFHOME: /home/runner/netcdf-fortran - RFMIP_DIR: /home/runner/rfmip-files steps: - name: Update system packages run: sudo apt-get update @@ -34,30 +31,8 @@ jobs: # - name: Install HDF5 library run: | - sudo apt-get install libhdf5-dev libcurl4-gnutls-dev hdf5-helpers - dpkg -L libhdf5-dev - - # Skipping this for now - netCDF configure doesn't see the HDF libararies - - name: cache-netcdf-c - id: cache-netcdf-c - uses: actions/cache@v3 - with: - path: /home/runner/netcdf-c - key: netcdf-c-4.7.4a-${{ runner.os }}-${{ matrix.fortran-compiler }} - - - name: Install netcdf C library from source - if: steps.cache-netcdf-c.outputs.cache-hit != 'true' - env: - CPPFLAGS: -I/usr/include/hdf5/serial - LDFLAGS: -L/usr/lib/x86_64-linux-gnu/hdf5/serial/ - run: | - ${CC} --version - git clone https://github.com/Unidata/netcdf-c.git --branch v4.7.4 - cd netcdf-c - ls /usr/include - ./configure --prefix=${NCHOME} - make -j - sudo make install + sudo apt-get install libhdf5-dev libcurl4-gnutls-dev hdf5-helpers libnetcdf-dev + dpkg -L libhdf5-dev libnetcdf-dev # Would be great to encode version info - name: cache-netcdf-fortran From dfa7e04c33999579d2a5afbb2451c682d251585e Mon Sep 17 00:00:00 2001 From: Robert Pincus Date: Wed, 7 Dec 2022 13:56:47 -0500 Subject: [PATCH 5/5] Force rebuild of netCDF Fortran to test local install of HDF, netcdf-c --- .github/workflows/continuous-integration.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index aba93ad..e0e08ab 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -40,14 +40,10 @@ jobs: uses: actions/cache@v3 with: path: /home/runner/netcdf-fortran - key: netcdf-fortran-4.5.3-${{ runner.os }}-${{ matrix.fortran-compiler }} + key: netcdf-fortran-4.5.3-${{ runner.os }}-${{ matrix.fortran-compiler }}-1 - name: Build NetCDF Fortran library - # Here too it would be nice to use the environment to specify netcdf-c location env: - CPPFLAGS: -I/home/runner/netcdf-c/include - LDFLAGS: -L/home/runner/netcdf-c/lib - LD_LIBRARY_PATH: /home/runner/netcdf-c/lib FCFLAGS: -fPIC if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true' run: |