File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,28 +91,28 @@ jobs:
9191 python :
9292 strategy :
9393 matrix :
94- runs-on :
95- - ubuntu-latest
96- - macos-14-large
97- - macos-14-xlarge
98- runs-on : ${{ matrix.runs-on }}
94+ target :
95+ - cp3*-manylinux_x86_64
96+ - cp3*-macosx_x86_64
97+ - cp3*-macosx_arm64
98+ runs-on : ${{ contains( matrix.target, 'macos') && 'macos-latest' || contains(matrix.target, 'win') && 'windows-latest' || 'ubuntu-latest' }}
9999 steps :
100100 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
101101 with :
102102 fetch-tags : true
103103 persist-credentials : false
104- - uses : astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
104+ - uses : pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
105105 with :
106- # Cache disabled to prevent cache-poisoning attacks on release artifacts.
107- enable-cache : false
108- - run : uv build --sdist --wheel
106+ package-dir : ./
107+ output-dir : dist/
108+ env :
109+ CIBW_BUILD : ${{ matrix.target }}
110+ CIBW_ARCHS : ${{ runner.os == 'macOS' && 'arm64 x86_64' || 'auto' }}
111+ CIBW_TEST_COMMAND : python -c "import s2geometry"
109112 - uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
110113 with :
111114 name : dist-${{ runner.os }}-${{ runner.arch }}
112115 path : ./dist/
113- - run : uv venv
114- - run : uv pip install ./dist/*.whl
115- - run : source .venv/bin/activate && python -c "import s2geometry"
116116 python-publish :
117117 if : (github.event_name == 'release') && (github.event.action == 'released')
118118 needs : [python]
You can’t perform that action at this time.
0 commit comments