-
Notifications
You must be signed in to change notification settings - Fork 10
147 lines (124 loc) · 5.26 KB
/
wheels.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
name: Wheels Deploy
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-wheels:
name: Build cp${{matrix.python}}-${{ matrix.platform_id }}
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
- { os: macos-latest, python: 310, platform_id: macosx_universal2, cibw_archs: universal2 }
- { os: macos-latest, python: 311, platform_id: macosx_universal2, cibw_archs: universal2 }
- { os: macos-latest, python: 312, platform_id: macosx_universal2, cibw_archs: universal2 }
- { os: windows-latest, python: 310, platform_id: win_amd64, cibw_archs: AMD64 }
- { os: windows-latest, python: 311, platform_id: win_amd64, cibw_archs: AMD64 }
- { os: windows-latest, python: 312, platform_id: win_amd64, cibw_archs: AMD64 }
- { os: windows-latest, python: 310, platform_id: win_arm64, cibw_archs: ARM64 }
- { os: windows-latest, python: 311, platform_id: win_arm64, cibw_archs: ARM64 }
- { os: windows-latest, python: 312, platform_id: win_arm64, cibw_archs: ARM64 }
- { os: ubuntu-latest, python: 310, platform_id: manylinux_x86_64, cibw_archs: x86_64 }
- { os: ubuntu-latest, python: 311, platform_id: manylinux_x86_64, cibw_archs: x86_64 }
- { os: ubuntu-latest, python: 312, platform_id: manylinux_x86_64, cibw_archs: x86_64 }
- { os: ubuntu-latest, python: 310, platform_id: manylinux_aarch64, cibw_archs: aarch64 }
- { os: ubuntu-latest, python: 311, platform_id: manylinux_aarch64, cibw_archs: aarch64 }
- { os: ubuntu-latest, python: 312, platform_id: manylinux_aarch64, cibw_archs: aarch64 }
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up QEMU
if: matrix.cibw_archs == 'aarch64'
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Setup and install python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{matrix.cibw_archs}}
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_BEFORE_BUILD_LINUX: |
yum install -y zlib-devel openssl-devel freetype-devel freeglut-devel alsa-lib-devel mesa-libGL-devel xorg-x11-proto-devel \
xorg-x11-proto-devel libcurl-devel libpng-devel libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel \
libXrender-devel libXcomposite-devel libXinerama-devel libXcursor-devel
#CIBW_REPAIR_WHEEL_COMMAND_LINUX: |
# pip install auditwheel-symbols && (auditwheel repair -w {dest_dir} {wheel} || auditwheel-symbols --manylinux 2014 {wheel})
CIBW_TEST_SKIP: "*-manylinux_aarch64 *-macosx_universal2:arm64 *-win_arm64"
CIBW_BUILD_VERBOSITY: 3
- name: Upload all the dists
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: ./wheelhouse/*.whl
upload-test-pypi:
name: Publish Wheels To Test PyPI
needs: [build-wheels]
runs-on: ubuntu-latest
permissions:
id-token: write
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
merge-multiple: true
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
upload-pypi:
name: Publish Wheels To PyPI
needs: [upload-test-pypi]
runs-on: ubuntu-latest
permissions:
id-token: write
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
merge-multiple: true
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
github-release:
name: Sign And Upload Github Release
needs: [upload-pypi]
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
merge-multiple: true
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
inputs: ./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh release create '${{ github.ref_name }}' --repo '${{ github.repository }}' --notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}'