diff --git a/.github/scripts/install.sh b/.github/scripts/install.sh index 1c2944b9..bed4f25a 100644 --- a/.github/scripts/install.sh +++ b/.github/scripts/install.sh @@ -6,5 +6,5 @@ pip install cibuildwheel if [[ $RUNNER_OS == "Windows" ]]; then git clone --recursive -b 3.3.9 --depth 1 https://gitlab.com/libeigen/eigen /c/eigen elif [[ $RUNNER_OS == "macOS" ]]; then - brew install eigen hdf5 ninja + brew install eigen ninja fi diff --git a/.github/scripts/install_hdf5_macos.sh b/.github/scripts/install_hdf5_macos.sh new file mode 100644 index 00000000..5c4dd056 --- /dev/null +++ b/.github/scripts/install_hdf5_macos.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -ev + +VERSION="1.14.4-3" +NAME="hdf5-$VERSION" +TARBALL="$NAME.tar.gz" +wget https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.4.3/$TARBALL +tar -xzf $TARBALL +mkdir build +cd build +cmake -GNinja ../$NAME -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF -DBUILD_TESTING:BOOL=OFF +ninja +sudo ninja install diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index dd6e66b0..6b25192b 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -24,7 +24,9 @@ env: USE_PYTHON_IN_PATH=1 # Get cmake to use python in the path... - CIBW_ENVIRONMENT_MACOS: USE_PYTHON_IN_PATH=1 + CIBW_ENVIRONMENT_MACOS: > + EXTRA_CMAKE_ARGS="-DHDF5_DIR=/usr/local/HDF_Group/HDF5/1.14.4/cmake " + USE_PYTHON_IN_PATH=1 CIBW_BEFORE_TEST: pip install -r {project}/tests/requirements.txt @@ -32,6 +34,8 @@ env: CIBW_ARCHS_MACOS: x86_64 arm64 + CIBW_BEFORE_ALL_MACOS: . .github/scripts/install_hdf5_macos.sh + # Use bash by default for the run command defaults: run: