Skip to content

Commit

Permalink
Add CIBW_BEFORE_ALL_MACOS to build HDF5
Browse files Browse the repository at this point in the history
The brew installed version has a too new min os version
  • Loading branch information
cjh1 committed Sep 13, 2024
1 parent e3581be commit 0f43498
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 13 additions & 0 deletions .github/scripts/install_hdf5_macos.sh
Original file line number Diff line number Diff line change
@@ -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
6 changes: 5 additions & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@ 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

CIBW_TEST_COMMAND: pytest {project}/tests

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:
Expand Down

0 comments on commit 0f43498

Please sign in to comment.