Skip to content

Commit 8b10705

Browse files
committed
ci: update cibuildwheel
This is an attempt to fix the macos has the wrong *.so part of the issue zxing-cpp#695, as well as macos builds don't use c++20.
1 parent f7c9de4 commit 8b10705

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

.github/workflows/publish-python.yml

+21-6
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,36 @@ jobs:
2626

2727
steps:
2828
- uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
2931

3032
- name: Set up Python
3133
uses: actions/setup-python@v5
3234
with:
3335
python-version: '3.12'
3436

3537
- name: Install cibuildwheel
36-
run: python3 -m pip install cibuildwheel==2.16.2
38+
run: python3 -m pip install cibuildwheel==2.16.5
3739

3840
- name: Build wheels
3941
run: python3 -m cibuildwheel --output-dir wheelhouse wrappers/python
4042
env:
41-
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-*
43+
# CIBW_BUILD: cp39-* cp310-* cp311-* cp312-*
44+
CIBW_BUILD: cp39-*
4245
CIBW_SKIP: "*musllinux*"
4346
# the default maylinux2014 image does not contain a c++20 compiler, see https://github.com/pypa/manylinux
4447
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
48+
# CIBW_ARCHS_MACOS: "x86_64 arm64"
4549
CIBW_ARCHS_MACOS: universal2
4650
CIBW_ENVIRONMENT_MACOS: CMAKE_OSX_ARCHITECTURES="arm64;x86_64"
51+
# the default macOS target version is 10.9 which does not support c++20 coroutines
52+
MACOSX_DEPLOYMENT_TARGET: "10.13"
53+
CIBW_BUILD_VERBOSITY: 1
4754

48-
- uses: actions/upload-artifact@v3 # v4 breaks the build, see https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md
55+
- name: Upload wheels
56+
uses: actions/upload-artifact@v4 # v4 breaks the build, see https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md
4957
with:
58+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
5059
path: ./wheelhouse/*.whl
5160

5261
build-sdist:
@@ -55,7 +64,7 @@ jobs:
5564
steps:
5665
- uses: actions/checkout@v4
5766
with:
58-
submodules: recursive
67+
fetch-depth: 0
5968

6069
- name: Set up Python
6170
uses: actions/setup-python@v5
@@ -70,8 +79,10 @@ jobs:
7079
working-directory: wrappers/python
7180
run: python3 setup.py sdist
7281

73-
- uses: actions/upload-artifact@v3
82+
- name: Upload sdist
83+
uses: actions/upload-artifact@v4
7484
with:
85+
name: cibw-sdist
7586
path: wrappers/python/dist/*.tar.gz
7687

7788
upload-pypi:
@@ -89,8 +100,12 @@ jobs:
89100
steps:
90101
- uses: actions/download-artifact@v4
91102
with:
92-
name: artifact
103+
pattern: cibw-*
93104
path: dist
105+
merge-multiple: true
106+
107+
- name: List wheels
108+
run: ls dist
94109

95110
- uses: pypa/gh-action-pypi-publish@release/v1
96111
# with:

0 commit comments

Comments
 (0)