Skip to content

Commit

Permalink
ci: build macOS wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
jrs65 committed Mar 21, 2022
1 parent 22d5749 commit e26286f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/install_hdf5.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
HDF5_VERSION=$1

# Download and install HDF5 $HDF5_VERSION from source for building wheels
curl https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VERSION%.*}/hdf5-$HDF5_VERSION/src/hdf5-$HDF5_VERSION.tar.gz --output hdf5-$HDF5_VERSION.tar.gz --silent
tar -xvf hdf5-$HDF5_VERSION.tar.gz
curl https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VERSION%.*}/hdf5-$HDF5_VERSION/src/hdf5-$HDF5_VERSION.tar.gz -O -s
tar -xzf hdf5-$HDF5_VERSION.tar.gz
cd hdf5-$HDF5_VERSION
chmod +x autogen.sh
./autogen.sh
CFLAGS=-std=c99 ./configure --prefix=/usr/local
make -j 6
./configure --prefix=/usr/local
make -j 2
make install
cd ..
19 changes: 7 additions & 12 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,30 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest]
hdf5: ["1.10.7"]

steps:
# Checkout bitshuffle
- uses: actions/checkout@v2

# Used to host cibuildwheel
- uses: actions/setup-python@v2

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.3.1

# Build wheels for linux and x86 platforms
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse-hdf5-${{ matrix.hdf5 }}
uses: pypa/[email protected]
with:
output-dir: ./wheelhouse-hdf5-${{ matrix.hdf5}}
env:
CIBW_PLATFORM: linux
CIBW_BUILD: "cp*manylinux*"
CIBW_SKIP: "pp* *musllinux*"
CIBW_ARCHS_LINUX: "x86_64"
CIBW_BEFORE_ALL_LINUX: |
CIBW_BEFORE_ALL: |
chmod +x .github/workflows/install_hdf5.sh
.github/workflows/install_hdf5.sh ${{ matrix.hdf5 }}
git submodule update --init
CIBW_ENVIRONMENT: |
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ENABLE_ZSTD=1
CIBW_TEST_REQUIRES: pytest
# Install different version of HDF5 for unit tests to ensure the
# wheels are indepedent of HDF5 installation
# wheels are independent of HDF5 installation
# CIBW_BEFORE_TEST: |
# chmod +x .github/workflows/install_hdf5.sh
# .github/workflows/install_hdf5.sh 1.8.11
Expand Down

0 comments on commit e26286f

Please sign in to comment.