oneAPI windows: for now always apply findhdf5 workaround #887
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-24.04, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - &checkout | |
| uses: actions/checkout@v6 | |
| - 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-new: | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04] | |
| gcc: [12, 13, 14] | |
| include: | |
| - os: macos-latest | |
| gcc: 15 | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| FC: gfortran-${{ matrix.gcc }} | |
| steps: | |
| - &checkout | |
| uses: actions/checkout@v6 | |
| - name: GCC (Linux) | |
| if: runner.os == 'Linux' | |
| run: echo "CC=gcc-${{ matrix.gcc }}" >> $GITHUB_ENV | |
| - &pkg | |
| uses: ./.github/workflows/composite-pkg | |
| - &unix | |
| uses: ./.github/workflows/composite-unix | |
| shared: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| env: | |
| CC: gcc-14 | |
| FC: gfortran-14 | |
| steps: | |
| - *checkout | |
| - 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 | |
| gcc-old: | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| gcc: [9, 10, 11] | |
| runs-on: ubuntu-22.04 | |
| env: | |
| CC: gcc-${{ matrix.gcc }} | |
| FC: gfortran-${{ matrix.gcc }} | |
| steps: | |
| - *checkout | |
| - name: GCC APT | |
| # GCC 9 was removed from Ubuntu 22.04 in May 2024 | |
| if: matrix.gcc < 10 | |
| run: | | |
| sudo apt update -y | |
| sudo apt install -y --no-install-recommends gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }} gfortran-${{ matrix.gcc }} | |
| - *pkg | |
| - *unix | |
| linux-flang: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| llvm-version: [21] | |
| env: | |
| CC: clang-${{ matrix.llvm-version }} | |
| CXX: 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 clang-${{ matrix.llvm-version }} 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-new | |
| 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-new | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - *checkout | |
| - uses: actions/setup-python@v6 | |
| 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 |