diff --git a/.github/workflows/run_tests_linux.yml b/.github/workflows/run_tests_linux.yml index 19a22813..e56e9e3a 100644 --- a/.github/workflows/run_tests_linux.yml +++ b/.github/workflows/run_tests_linux.yml @@ -6,8 +6,8 @@ name: Run netCDF-Fortran Linux tests on: [pull_request, workflow_dispatch] -concurrency: - group: ${{ github.workflow}}-${{ github.head_ref }} +concurrency: + group: ${{ github.workflow}}-${{ github.head_ref }} cancel-in-progress: true jobs: @@ -23,7 +23,7 @@ jobs: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install System dependencies shell: bash -l {0} @@ -41,7 +41,7 @@ jobs: ### - name: Cache libhdf5-${{ matrix.hdf5 }}-${{ matrix.netcdf }} id: cache-hdf5 - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }} @@ -79,7 +79,7 @@ jobs: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install System dependencies shell: bash -l {0} @@ -98,7 +98,7 @@ jobs: ### - name: Cache libhdf5-${{ matrix.hdf5 }}-${{ matrix.netcdf }}-par id: cache-hdf5-par - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }}-par @@ -138,7 +138,7 @@ jobs: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install System dependencies shell: bash -l {0} @@ -153,14 +153,14 @@ jobs: - run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/lib" >> $GITHUB_ENV - run: echo "HDF5_PLUGIN_PATH=${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/lib" >> $GITHUB_ENV - run: echo "HDF5_PLUGIN_DIR=${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/lib" >> $GITHUB_ENV - + ### # Fetch Cache ### - name: Fetch HDF Cache id: cache-hdf - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }} @@ -225,7 +225,7 @@ jobs: nf-autotools-par: - needs: build-deps-par + needs: build-deps-par runs-on: ubuntu-latest strategy: @@ -235,7 +235,7 @@ jobs: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install System dependencies shell: bash -l {0} @@ -258,7 +258,7 @@ jobs: - name: Fetch HDF Cache id: cache-hdf-par - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }}-par @@ -320,7 +320,7 @@ jobs: #- name: Make Distcheck # shell: bash -l {0} # run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make distcheck -j - + nf-cmake: needs: build-deps @@ -333,7 +333,7 @@ jobs: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install System dependencies shell: bash -l {0} @@ -349,14 +349,14 @@ jobs: - run: echo "CMAKE_PREFIX_PATH=${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf}}" >> $GITHUB_ENV - run: echo "HDF5_PLUGIN_PATH=${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/lib" >> $GITHUB_ENV - run: echo "HDF5_PLUGIN_DIR=${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/lib" >> $GITHUB_ENV - + ### # Fetch Cache ### - name: Fetch HDF Cache id: cache-hdf5 - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }} @@ -385,36 +385,25 @@ jobs: - name: Perform out-of-directory build shell: bash -l {0} - run: | - mkdir build - cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} + run: LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake -Bbuild -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - name: Print Summary shell: bash -l {0} - run: | - cd build - cat libnetcdff.settings + run: cat build/libnetcdff.settings - name: Build All shell: bash -l {0} - run: | - cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j 12 + run: LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake --build build --parallel if: ${{ success() }} - name: Run Tests shell: bash -l {0} - run: | - cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 1 . + run: LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest --test-dir build if: ${{ success() }} - name: Look at LastTest.log if error shell: bash -l {0} run: | - cat /home/runner/work/netcdf-fortran/netcdf-fortran/build/Testing/Temporary/LastTest.log - cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest --rerun-failed --output-on-failure - + cat build/Testing/Temporary/LastTest.log + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest --test-dir build --rerun-failed --output-on-failure if: ${{ failure() }} diff --git a/.github/workflows/run_tests_macos.yml b/.github/workflows/run_tests_macos.yml index 2a1b6e83..81a5cb63 100644 --- a/.github/workflows/run_tests_macos.yml +++ b/.github/workflows/run_tests_macos.yml @@ -6,8 +6,8 @@ name: Run netCDF-Fortran MacOS tests on: [ workflow_dispatch ] -concurrency: - group: ${{ github.workflow}}-${{ github.head_ref }} +concurrency: + group: ${{ github.workflow}}-${{ github.head_ref }} cancel-in-progress: true jobs: @@ -23,7 +23,7 @@ jobs: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 ### # Set Environmental Variables @@ -38,13 +38,13 @@ jobs: - run: echo "DYLD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/lib" >> $GITHUB_ENV - run: echo "PATH=${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/bin:${PATH}" >> $GITHUB_ENV - - run: brew install automake libaec + - run: brew install automake libaec ### # Installing libhdf4 and libhdf5 ### - name: Cache libhdf5-${{ matrix.hdf5 }}-${{ matrix.netcdf }} id: cache-hdf5 - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }} @@ -83,7 +83,7 @@ jobs: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 ### # Set Environmental Variables ### @@ -92,14 +92,14 @@ jobs: - run: echo "FFLAGS=-I${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/include" >> $GITHUB_ENV - run: echo "CFLAGS=-I${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/include" >> $GITHUB_ENV - - run: echo "CPPFLAGS=-I${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/include" >> $GITHUB_ENV + - run: echo "CPPFLAGS=-I${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/include" >> $GITHUB_ENV - run: echo "LDFLAGS=-L${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/lib" >> $GITHUB_ENV - run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/lib" >> $GITHUB_ENV - run: echo "DYLD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/lib" >> $GITHUB_ENV - run: echo "PATH=${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/bin:${PATH}" >> $GITHUB_ENV - - run: brew install automake - + - run: brew install automake + ### # Fetch Cache @@ -107,7 +107,7 @@ jobs: - name: Fetch HDF Cache id: cache-hdf - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }} @@ -169,7 +169,7 @@ jobs: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 ### # Set Environmental Variables @@ -182,7 +182,7 @@ jobs: - run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }}/lib" >> $GITHUB_ENV - run: echo "CMAKE_PREFIX_PATH=${HOME}/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf}}" >> $GITHUB_ENV - - run: brew install automake + - run: brew install automake ### # Fetch Cache @@ -190,7 +190,7 @@ jobs: - name: Fetch HDF Cache id: cache-hdf5 - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/environments/${{ matrix.hdf5 }}-${{ matrix.netcdf }} key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}-${{ matrix.netcdf }} @@ -205,36 +205,26 @@ jobs: - name: Perform out-of-directory build shell: bash -l {0} - run: | - mkdir build - cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} + run: LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake -B build -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - name: Print Summary shell: bash -l {0} - run: | - cd build - cat libnetcdff.settings + run: cat build/libnetcdff.settings - name: Build All shell: bash -l {0} - run: | - cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j 12 + run: LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake --build build --parallel if: ${{ success() }} - name: Run Tests shell: bash -l {0} - run: | - cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 1 . + run: LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest --test-dir build if: ${{ success() }} - name: Look at LastTest.log if error shell: bash -l {0} run: | - cat /home/runner/work/netcdf-fortran/netcdf-fortran/build/Testing/Temporary/LastTest.log - cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest --rerun-failed --output-on-failure + cat build/Testing/Temporary/LastTest.log + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest --test-dir build --rerun-failed --output-on-failure if: ${{ failure() }}