From e26286ff8cc5bdd74b330f4ce5365d029f3c91b8 Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Sun, 27 Feb 2022 18:19:18 -0800 Subject: [PATCH] ci: build macOS wheels --- .github/workflows/install_hdf5.sh | 10 ++++------ .github/workflows/wheels.yml | 19 +++++++------------ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/.github/workflows/install_hdf5.sh b/.github/workflows/install_hdf5.sh index dc1d17a2..58b2bdb4 100644 --- a/.github/workflows/install_hdf5.sh +++ b/.github/workflows/install_hdf5.sh @@ -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 .. diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 973c0438..def84e0b 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -12,27 +12,22 @@ 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/cibuildwheel@v2.3.1 + 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 @@ -40,7 +35,7 @@ jobs: 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