Skip to content

Commit

Permalink
CI: Set OS version
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpa committed May 14, 2024
1 parent 116eaf7 commit 5183422
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ jobs:
run: |
echo "PACKAGE_NAME=$( python -c "import toml; print(toml.load('pyproject.toml')['project']['name'])" )" | Out-File -FilePath $env:GITHUB_ENV ` -Append
echo "PACKAGE_VERSION=$( python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])" )" | Out-File -FilePath $env:GITHUB_ENV ` -Append
- name: Determine macOS version
if: startsWith(matrix.os, 'macos-')
run: |
macos_version=$(sw_vers -productVersion | awk -F '.' '{print $1".0"}')
echo "MACOSX_DEPLOYMENT_TARGET=${macos_version}" >> $GITHUB_ENV
- name: Build wheels
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
Expand All @@ -158,7 +165,7 @@ jobs:
CIBW_ARCHS_MACOS: ${{ matrix.arch }}

CIBW_ENVIRONMENT_MACOS: |
CMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} CMAKE_PREFIX_PATH=/usr/local MACOSX_DEPLOYMENT_TARGET=$( sw_vers -productVersion | awk -F '.' '{print $1".0"}' )
CMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} CMAKE_PREFIX_PATH=/usr/local
CIBW_BEFORE_ALL_MACOS: |
python -m pip install cmake ninja setuptools
Expand Down

0 comments on commit 5183422

Please sign in to comment.