correct HDF5 MPI feature checks #900
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| env: | |
| HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
| on: | |
| push: | |
| paths: | |
| - "**.c" | |
| - "**.cpp" | |
| - "**.f90" | |
| - "**.F90" | |
| - "**/CMakeLists.txt" | |
| - "**.cmake" | |
| - "CMakePresets.json" | |
| - ".github/workflows/**" | |
| - "!memcheck.cmake" | |
| - "!coverage.cmake" | |
| - "!scripts/**" | |
| workflow_dispatch: | |
| # avoid wasted runs | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-unix: | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - &checkout | |
| uses: actions/checkout@v7 | |
| - &gcc-macos | |
| name: GCC (macOS) | |
| if: runner.os == 'macos' | |
| run: | | |
| echo "CC=gcc-15" >> $GITHUB_ENV | |
| echo "FC=gfortran-15" >> $GITHUB_ENV | |
| - name: Build HDF5, h5fortran and test h5fortran | |
| run: cmake --workflow default | |
| - name: Upload log failure | |
| if: failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: main-${{ runner.os }}-CMakeConfigureLog.yaml | |
| path: build/CMakeFiles/CMakeConfigureLog.yaml | |
| - name: install package | |
| run: cmake --install build | |
| - name: example workflow | |
| working-directory: example | |
| run: cmake --workflow default | |
| - name: Upload log failure | |
| if: failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: example-${{ runner.os }}-CMakeConfigureLog.yaml | |
| path: example/build/CMakeFiles/CMakeConfigureLog.yaml | |
| gcc-linux: | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| gcc: [9, 10, 11, 12, 13, 14] | |
| include: | |
| - os: macos-latest | |
| gcc: 15 | |
| - os: ubuntu-26.04 | |
| gcc: 15 | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| CC: gcc-${{ matrix.gcc }} | |
| FC: gfortran-${{ matrix.gcc }} | |
| steps: | |
| - *checkout | |
| - &pkg | |
| uses: ./.github/workflows/composite-pkg | |
| - name: GCC APT (Ubuntu 24.04) | |
| if: ${{ runner.os == 'Linux' && matrix.gcc < 12 }} | |
| run: sudo apt install -y --no-install-recommends gfortran-${{ matrix.gcc }} | |
| - &unix | |
| uses: ./.github/workflows/composite-unix | |
| shared: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - *checkout | |
| - *gcc-macos | |
| - name: Build shared library | |
| run: cmake --workflow shared | |
| - name: install package | |
| run: cmake --install build-shared | |
| - name: example workflow | |
| working-directory: example | |
| run: cmake --workflow default | |
| linux-flang: | |
| runs-on: ubuntu-26.04 | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| llvm-version: [22] | |
| env: | |
| CC: clang-${{ matrix.llvm-version }} | |
| FC: flang-${{ matrix.llvm-version }} | |
| steps: | |
| # - name: Apt LLVM | |
| # run: | | |
| # wget https://apt.llvm.org/llvm.sh | |
| # chmod +x llvm.sh | |
| # sudo ./llvm.sh ${{ matrix.llvm-version }} | |
| # sudo apt-get update | |
| - name: install Flang | |
| run: sudo apt install --no-install-recommends flang-${{ matrix.llvm-version }} | |
| - *checkout | |
| - name: CMake build & test | |
| run: cmake --workflow default | |
| # not a meaningful need for this in a pure fortran program | |
| valgrind-memory: | |
| if: false | |
| runs-on: ubuntu-latest | |
| needs: gcc-linux | |
| timeout-minutes: 10 | |
| steps: | |
| - name: install valgrind | |
| run: | | |
| sudo apt update | |
| sudo apt install --no-install-recommends valgrind libhdf5-dev | |
| - *checkout | |
| - run: ctest -Dexclude_label="deflate|python" -S memcheck.cmake -VV | |
| # issue with python loading writer.inc | |
| linux-coverage: | |
| if: false | |
| needs: gcc-linux | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - *checkout | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: '3.x' | |
| - name: install hdf5 | |
| run: | | |
| sudo apt update | |
| sudo apt install --no-install-recommends libhdf5-dev | |
| - name: install Gcovr | |
| run: pip install gcovr | |
| - run: cmake --preset coverage | |
| - run: cmake --build --parallel --preset coverage | |
| - name: Code coverage | |
| run: cmake --build --parallel --preset run-coverage | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-report-html | |
| path: build-coverage/coverage/ | |
| cmake-older: | |
| timeout-minutes: 30 | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| cmake_version: ["3.25.3"] | |
| steps: | |
| - *checkout | |
| - name: prereqs | |
| run: | | |
| sudo apt-get update | |
| sudo apt install --no-install-recommends libhdf5-dev | |
| - uses: ./.github/workflows/composite-cmake | |
| - name: configure | |
| run: $CMAKE -Bbuild --install-prefix=${{ github.workspace }}/build/local --debug-find-pkg=HDF5 | |
| - name: build | |
| run: $CMAKE --build build | |
| - name: test | |
| run: $CTEST --test-dir build | |
| - name: install package | |
| run: $CMAKE --install build | |
| - name: example workflow | |
| run: cmake -S example -B example/build -DCMAKE_PREFIX_PATH=${{ github.workspace }}/build/local | |
| - name: Build examples | |
| run: cmake --build example/build | |
| - name: Test examples | |
| run: ctest --test-dir example/build -V |