diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index b3844b2..e0e08ab 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -3,34 +3,27 @@ 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] 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 steps: - name: Update system packages run: sudo apt-get update ############################################################################ # # Compilers.... - # - # Gfortran 10 not available in Github CI stack, so install - # - - name: gfortran-10 setup compiler - if: contains(matrix.fortran-compiler, 'gfortran-10') - run: | - sudo apt-get install gfortran-10 gcc-10 - echo "CC=gcc-10" >> $GITHUB_ENV + # # + - name: install compilers + run: sudo apt-get install gfortran-${{ matrix.gnu-compiler-version }} gcc-${{ matrix.gnu-compiler-version }} ############################################################################ # @@ -38,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 @@ -69,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: |