-
-
Notifications
You must be signed in to change notification settings - Fork 87
160 lines (152 loc) · 5.56 KB
/
publish-packages.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Package Builder
on:
push:
tags:
- 'v*.*'
workflow_dispatch:
jobs:
build_manylinux2014:
name: Build wheels on manylinux2014
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pypa/[email protected]
env:
CIBW_BUILD: "*-manylinux_x86_64 *-manylinux_i686 *-manylinux_aarch64"
CIBW_SKIP: "cp36-* cp37-* cp38-* pp*"
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
CIBW_MANYLINUX_I686_IMAGE: "manylinux2014"
CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux2014"
CIBW_BEFORE_ALL_LINUX: >
yum install -y wget &&
wget https://github.com/qhull/qhull/archive/refs/tags/v8.0.2.tar.gz &&
tar -xf v8.0.2.tar.gz &&
cd qhull-8.0.2 &&
cmake -S . -B build &&
cmake --build build --target install
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_manylinux_2_28:
name: Build wheels on manylinux_2_28
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pypa/[email protected]
env:
CIBW_BUILD: "*-manylinux_x86_64 *-manylinux_aarch64"
CIBW_SKIP: "cp36-* cp37-* cp38-* pp*"
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28"
CIBW_MANYLINUX_I686_IMAGE: "manylinux_2_28"
CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux_2_28"
# See https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
CIBW_BEFORE_ALL_LINUX: >
rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux &&
yum install -y wget &&
wget https://github.com/qhull/qhull/archive/refs/tags/v8.0.2.tar.gz &&
tar -xf v8.0.2.tar.gz &&
cd qhull-8.0.2 &&
cmake -S . -B build &&
cmake --build build --target install
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_musllinux:
name: Build wheels on musllinux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pypa/[email protected]
env:
CIBW_BUILD: "*-musllinux_x86_64 *-musllinux_i686 *-musllinux_aarch64"
CIBW_SKIP: "cp36-* cp37-* cp38-* pp*"
CIBW_BEFORE_ALL_LINUX: >
apk update &&
apk add wget &&
wget https://github.com/qhull/qhull/archive/refs/tags/v8.0.2.tar.gz &&
tar -xf v8.0.2.tar.gz &&
cd qhull-8.0.2 &&
cmake -S . -B build &&
cmake --build build --target install
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_macos:
name: Build wheels on MacOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: pypa/[email protected]
env:
CIBW_SKIP: "cp36-* cp37-* cp38-* pp*"
CIBW_ARCHS_MACOS: "x86_64 universal2"
CIBW_BEFORE_ALL_MACOS: >
wget https://github.com/qhull/qhull/archive/refs/tags/v8.0.2.tar.gz &&
tar -xf v8.0.2.tar.gz &&
cd qhull-8.0.2 &&
cmake -DCMAKE_OSX_ARCHITECTURES='x86_64;arm64' -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_APPLICATIONS=OFF -S . -B build &&
sudo cmake --build build --target install
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_windows:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
name: Build wheels for Windows (${{ matrix.python-version }})
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- uses: johnwason/vcpkg-action@v6
with:
manifest-dir: ${{ github.workspace }}
triplet: x64-windows-static
token: ${{ github.token }}
github-binarycache: true
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install build dependencies (pip)
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel pip-tools ninja scikit_build_core
python -m piptools compile --resolver=backtracking -o requirements.txt pyproject.toml
pip install -r requirements.txt
- name: Build Python ${{ matrix.python-version }} wheel
run: python -m build -w
env:
CMAKE_GENERATOR: "Ninja"
CMAKE_TOOLCHAIN_FILE: "${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake"
SKBUILD_CMAKE_ARGS: "-DVCPKG_TARGET_TRIPLET=x64-windows-static;-DVCPKG_MANIFEST_MODE=OFF"
- uses: actions/upload-artifact@v3
with:
path: dist/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install python dependencies
run: pip install build
- name: Build sdist
run: python -m build -s
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload_pypi:
name: Upload wheel to PyPI
needs: [build_manylinux2014, build_manylinux_2_28, build_musllinux, build_macos, build_windows]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}