From 59fe3de50518e5391de6f8191864ff77c0f4230e Mon Sep 17 00:00:00 2001 From: Evgeny Posenitskiy <45995097+q-posev@users.noreply.github.com> Date: Fri, 5 May 2023 16:21:09 +0200 Subject: [PATCH] [wheel build] Fix MacOS CI, part 2 --- .github/workflows/actions.yml | 16 +++++++++++++--- .github/workflows/build-wheels.yml | 9 +++------ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 4897de0..4af11b8 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -112,8 +112,8 @@ jobs: run: make maintainer-clean trexio_macos: - name: x86 MacOS 11 - runs-on: macos-11 + name: x86 MacOS 12 + runs-on: macos-12 steps: - uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 @@ -121,8 +121,9 @@ jobs: - name: install dependencies run: | brew install emacs - brew install hdf5 + brew install hdf5@1.12 brew install automake + brew --prefix hdf5 - name: configure with autotools run: | @@ -134,6 +135,15 @@ jobs: - name: check TREXIO run: make -j3 check + + - name: compile Python API + run: | + export H5_CFLAGS="-I$(brew --prefix hdf5)/include" + export H5_LDFLAGS="-L$(brew --prefix hdf5)/lib" + make python-install + + - name: test Python API + run: make python-test - name: Archive test log file if: failure() diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index ffb1f7b..4a8a178 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -109,11 +109,6 @@ jobs: # ERROR: trexio-1.1.0-cp39-cp39-macosx_11_0_x86_64.whl is not a supported wheel on this platform. # This happens even with the MACOSX_DEPLOYMENT_TARGET trick. Perhaps it can be solved by configuring the build system # to produce the wheels for MacOS-11 from the very beginning - #exclude: - # - os: macos-11 - env: - H5_LDFLAGS: '-L/usr/local/Cellar/hdf5/1.12.1/lib' - H5_CFLAGS: '-I/usr/local/Cellar/hdf5/1.12.1/include' steps: - uses: actions/checkout@v3 @@ -126,7 +121,7 @@ jobs: run: python --version - name: Install HDF5 - run: brew install hdf5@1.10 + run: brew install hdf5@1.12 # This step is needed to produce wheels with the correct platform tag for MacOS-11 (Big Sur) #- name: Set MACOSX_DEPLOYMENT_TARGET environment variable @@ -158,6 +153,8 @@ jobs: run: | mkdir wheelhouse/ cd trexio-${{ env.PYTREXIO_VERSION }}/ + export H5_CFLAGS="-I$(brew --prefix hdf5)/include" + export H5_LDFLAGS="-L$(brew --prefix hdf5)/lib" python -m build --wheel --outdir=./ delocate-wheel trexio-*.whl mv trexio-*.whl ../wheelhouse/