From 6b863dba759c10a009cd1d8cd571a3058ac6cab1 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:25:11 -0800 Subject: [PATCH] fix --- .github/workflows/build-wheels.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 231289bf1..0630e0423 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -258,22 +258,24 @@ jobs: name: Ensure openssl is installed on Github macOS runners. run: brew install openssl@${{ env.MACOS_OPENSSL_VERSION }} + - if: ${{ startsWith(inputs.platform-tag, 'macosx') }} + name: Ensure openssl is installed on Github macOS runners. + # - We use delocate to repair the wheel because it throws an error if + # the openssl library version is newer than the wheel's macOS version tag + # Linking the static libraries produces a warning for that same reason that but it doesn't throw an error. + # macOS wheel is only backwards compatible with the macOS major version it is built from + # - Use single dash for backwards compatibility with older sw_vers + run: echo MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d"." -f 1).0 >> $GITHUB_ENV + - if: ${{ inputs.platform-tag == 'macosx_arm64' }} name: Ensure that linker can find openssl + # On mac m1, openssl@3 installed via brew is not in the linker's default library path run: echo LIBRARY_PATH=$(brew --prefix openssl@${{ env.MACOS_OPENSSL_VERSION }}):$LIBRARY_PATH >> $GITHUB_ENV - name: Build wheel uses: pypa/cibuildwheel@v2.21.3 env: CIBW_ENVIRONMENT_PASS_LINUX: ${{ inputs.unoptimized && 'UNOPTIMIZED' || '' }} - # - We use delocate to repair the wheel because it throws an error if - # the openssl library version is newer than the wheel's macOS version tag - # Linking the static libraries produces a warning for that same reason that but it doesn't throw an error. - # macOS wheel is only backwards compatible with the macOS major version it is built from - # - Use single dash for backwards compatibility with older sw_vers - # - on mac m1, openssl@3 installed via brew is not in the linker's default library path - CIBW_ENVIRONMENT_MACOS: > - MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d"." -f 1).0 CIBW_BUILD: ${{ env.BUILD_IDENTIFIER }} CIBW_BUILD_FRONTEND: build CIBW_BEFORE_ALL_LINUX: >