Skip to content

Commit 772faa1

Browse files
committed
fix: dev: update release workflow for new platform wheels
* also cleanup sphinx workflow Signed-off-by: Stephen Arnold <[email protected]>
1 parent 4a38e78 commit 772faa1

File tree

2 files changed

+57
-31
lines changed

2 files changed

+57
-31
lines changed

.github/workflows/release.yml

Lines changed: 48 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,23 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
os: [ubuntu-22.04, macos-latest, windows-latest]
15+
include:
16+
- os: "ubuntu-22.04"
17+
arch: "x86_64"
18+
- os: "ubuntu-22.04"
19+
arch: "aarch64"
20+
- os: "macos-13"
21+
arch: "x86_64"
22+
macosx_deployment_target: "13.0"
23+
- os: "macos-14"
24+
arch: "arm64"
25+
macosx_deployment_target: "14.0"
26+
- os: "windows-latest"
27+
arch: "auto64"
28+
triplet: "x64-windows"
29+
- os: "windows-latest"
30+
arch: "auto32"
31+
triplet: "x86-windows"
1632

1733
steps:
1834
- uses: actions/checkout@v4
@@ -22,43 +38,41 @@ jobs:
2238
- uses: actions/setup-python@v5
2339
name: Install Python
2440
with:
25-
python-version: '3.8'
41+
python-version: '3.9'
2642

27-
- name: Prepare compiler environment for Windows
28-
if: runner.os == 'Windows'
29-
uses: ilammy/msvc-dev-cmd@v1
43+
- name: Set up QEMU
44+
if: runner.os == 'Linux'
45+
uses: docker/setup-qemu-action@v3
3046
with:
31-
arch: amd64
32-
33-
- name: Install cibuildwheel
34-
run: |
35-
python -m pip install --upgrade pip
36-
python -m pip install -r requirements-cibw.txt
47+
platforms: all
3748

3849
- name: Build wheels
50+
uses: pypa/[email protected]
3951
env:
40-
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2010_x86_64:latest
41-
CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2010_i686:latest
42-
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
43-
CIBW_SKIP: "*-win32"
52+
# configure cibuildwheel to build native archs ('auto'), and some
53+
# emulated ones, plus cross-compile on macos
54+
CIBW_ARCHS: ${{ matrix.arch }}
55+
CIBW_TEST_SKIP: "*_arm64 *universal2:arm64 *linux_i686"
56+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
57+
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
58+
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-*
59+
CIBW_SKIP: "*musllinux* *i686"
4460
CIBW_BEFORE_ALL_LINUX: >
45-
yum -y -q --enablerepo=extras install epel-release
46-
&& yum install -y re2-devel ninja-build
47-
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel show {wheel} && auditwheel repair -w {dest_dir} {wheel}"
61+
yum -y update && yum -y install epel-release && yum install -y re2-devel ninja-build
4862
CIBW_BEFORE_ALL_MACOS: >
49-
brew install re2 pybind11 ninja
50-
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.09
51-
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "pip uninstall -y delocate && pip install git+https://github.com/Chia-Network/delocate.git && delocate-listdeps {wheel} && delocate-wheel -w {dest_dir} -v {wheel}"
63+
brew install re2 pybind11
64+
# macos target should be at least 10.13 to get full c++17
65+
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=${{ matrix.macosx_deployment_target }}
5266
CIBW_BEFORE_ALL_WINDOWS: >
53-
vcpkg install re2:x64-windows
67+
vcpkg install pkgconf:${{ matrix.triplet }} re2:${{ matrix.triplet }}
5468
&& vcpkg integrate install
5569
CIBW_ENVIRONMENT_WINDOWS: 'CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake'
56-
CIBW_TEST_COMMAND: python -c "import re2"
57-
run: |
58-
python -m cibuildwheel --output-dir wheelhouse
70+
CIBW_TEST_REQUIRES: ""
71+
CIBW_TEST_COMMAND: ""
5972

6073
- uses: actions/upload-artifact@v4
6174
with:
75+
name: wheels-${{ matrix.os }}-${{ matrix.arch }}
6276
path: ./wheelhouse/*.whl
6377

6478
build_sdist:
@@ -70,12 +84,12 @@ jobs:
7084
- uses: actions/setup-python@v5
7185
name: Install Python
7286
with:
73-
python-version: '3.8'
87+
python-version: '3.9'
7488

7589
- name: Build sdist
7690
run: |
77-
pip install pep517
78-
python -m pep517.build -s .
91+
pip install build
92+
python -m build -s .
7993
8094
- uses: actions/upload-artifact@v4
8195
with:
@@ -99,10 +113,13 @@ jobs:
99113
- uses: actions/setup-python@v5
100114
name: Install Python
101115
with:
102-
python-version: 3.7
116+
python-version: 3.9
103117

104-
# download all artifacts to project dir
118+
# download all artifacts to artifacts dir
105119
- uses: actions/download-artifact@v4
120+
with:
121+
merge-multiple: true
122+
path: artifacts
106123

107124
- name: Generate changes file
108125
uses: sarnold/gitchangelog-action@master
@@ -121,7 +138,7 @@ jobs:
121138
draft: false
122139
prerelease: false
123140
# uncomment below to upload wheels to github releases
124-
files: dist/cibw-wheels/pyre2*.whl
141+
files: artifacts/pyre2*
125142

126143
- uses: pypa/gh-action-pypi-publish@master
127144
if: ${{ github.actor == github.repository_owner && github.ref == 'refs/heads/master' }}

.github/workflows/sphinx.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
push:
66
branches:
77
- master
8+
permissions:
9+
contents: write
810

911
jobs:
1012
build:
@@ -15,6 +17,11 @@ jobs:
1517
with:
1618
fetch-depth: 0
1719

20+
- name: Install Ubuntu build deps
21+
run: |
22+
sudo apt-get -qq update
23+
sudo apt-get install -y libre2-dev
24+
1825
- uses: actions/setup-python@v5
1926
with:
2027
python-version: '3.9'
@@ -46,4 +53,6 @@ jobs:
4653
if: ${{ github.event_name == 'push' }}
4754
uses: JamesIves/github-pages-deploy-action@v4
4855
with:
56+
branch: gh-pages
4957
folder: docs/_build/html/
58+
single-commit: true

0 commit comments

Comments
 (0)