-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (43 loc) · 1.57 KB
/
build-python.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
# Builds Python wheels (including stubs) and creates a draft release
name: Build Python release
on: [workflow_dispatch]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-11, windows-2019]
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_BUILD_LINUX: "python3 -m pip install cmake"
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_BUILD: "cp310-macosx_x86_64 cp310-macosx_arm64 cp310-win_amd64 cp310-manylinux_x86_64 cp310-musllinux_x86_64 cp310-manylinux_aarch64 cp310-musllinux_aarch64 cp311-macosx_x86_64 cp311-macosx_arm64 cp311-win_amd64 cp311-manylinux_x86_64 cp311-musllinux_x86_64 cp311-manylinux_aarch64 cp311-musllinux_aarch64"
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- if: matrix.os == 'ubuntu-20.04'
name: Create stubs
run: |
python -m pip install wheel
python ./tools/generate-stubs.py ./wheelhouse linux pybiginteger
- name: Deploy
uses: softprops/action-gh-release@v1
with:
tag_name: Draft
name: Draft
draft: true
files: |
./wheelhouse/*.whl
env:
GITHUB_TOKEN: ${{ secrets.deploy }}