Skip to content

autobuild HDF5 if needed #21

autobuild HDF5 if needed

autobuild HDF5 if needed #21

Workflow file for this run

name: build
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
CTEST_NO_TESTS_ACTION: error
FC: gfortran-12
on:
push:
paths:
- "scripts/CMakeLists.txt"
- "cmake/libraries.json"
- ".github/workflows/ci_build.yml"
jobs:
linux_mac:
timeout-minutes: 20
strategy:
matrix:
os: [ubuntu-latest]
shared: [true, false]
include:
- os: macos-latest
shared: false
runs-on: ${{ matrix.os}}
steps:
- name: prereqs (Linux)
if: runner.os == 'Linux'
run: sudo apt install --no-install-recommends ninja-build
- name: prereqs (MacOS)
if: runner.os == 'macOS'
run: brew install ninja
- uses: actions/checkout@v4
- name: Configure HDF5 library
run: >-
cmake
-GNinja
-S scripts -B scripts/build
--install-prefix ${{ runner.temp }}
-DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }}
- name: Build/install HDF5
run: cmake --build scripts/build
- name: configure h5fortran
run: >-
cmake --preset default
--install-prefix ${{ runner.temp }}
-DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }}
-DCMAKE_PREFIX_PATH=${{ runner.temp }}
- name: build / test h5fortran
run: cmake --workflow --preset default
- name: install h5fortran
run: cmake --install build
- name: configure examples
run: >-
cmake --preset default
-DCMAKE_PREFIX_PATH:PATH=${{ runner.temp }}
working-directory: example
- name: build / test examples
run: cmake --workflow --preset default
working-directory: example