-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (44 loc) · 1.55 KB
/
build-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Ubuntu and Mac builds
on: [push, workflow_dispatch]
jobs:
build_and_publish:
strategy:
matrix:
# macos-13 is an intel runner, macos-14+ is apple silicon
os: [ubuntu-latest, 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: Install dependencies on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y build-essential libc6-dev
- 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 setup.py sdist
python3 -m twine upload dist/*.tar.gz
python3 -m twine upload wheelhouse/*.whl