-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Mac builds | ||
|
||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
build_and_publish: | ||
strategy: | ||
matrix: | ||
# macos-13 is an intel runner, macos-14+ is apple silicon | ||
os: [macos-13, macos-14, macos-15] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Build Wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CXXFLAGS: -Wno-enum-constexpr-conversion | ||
CFLAGS: -Wno-enum-constexpr-conversion | ||
CIBW_BUILD: cp311-* cp312-* cp313-* | ||
CIBW_PROJECT_REQUIRES_PYTHON: '>=3.10' | ||
MACOSX_DEPLOYMENT_TARGET: 15.2 | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: pygeoda-${{ matrix.os }} | ||
path: wheelhouse/ | ||
|
||
- name: Publish to Pypi | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python3 -m venv venv | ||
source venv/bin/activate | ||
python3 -m pip install --upgrade --upgrade-strategy eager twine setuptools | ||
python3 -m twine upload wheelhouse/*.whl | ||
- name: Publish source to Pypi | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
source venv/bin/activate | ||
python3 setup.py sdist | ||
python3 -m twine upload dist/*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters