Skip to content

Commit 6cc876a

Browse files
committed
fix PyPy publish workflow
1 parent d756080 commit 6cc876a

File tree

4 files changed

+36
-31
lines changed

4 files changed

+36
-31
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: Install Python package with C++ extension
3131
run: |
32-
pip install -v -e .
32+
pip install -e .
3333
python -c "import atomic_ops; supported, msg = atomic_ops.check_platform_support(); print(f'Platform support: {supported}, {msg}'); print('Extension location:', atomic_ops._atomic_ops_ext if hasattr(atomic_ops, '_atomic_ops_ext') else 'Not loaded')"
3434
3535
- name: Get Python executable path

.github/workflows/publish-pypi.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,19 @@ jobs:
3838
strategy:
3939
matrix:
4040
os: [ubuntu-latest, windows-latest, macos-latest]
41-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
4241

4342
steps:
4443
- uses: actions/checkout@v4
4544

46-
- name: Set up Python ${{ matrix.python-version }}
47-
uses: actions/setup-python@v5
48-
with:
49-
python-version: ${{ matrix.python-version }}
50-
51-
- name: Install build dependencies
52-
run: |
53-
python -m pip install --upgrade pip
54-
pip install build wheel setuptools
55-
56-
- name: Build wheel only
57-
run: python -m build --wheel
45+
- name: Build wheels
46+
uses: pypa/cibuildwheel@v2.22
47+
# Configuration is in pyproject.toml under [tool.cibuildwheel]
5848

5949
- name: Upload wheel artifacts
6050
uses: actions/upload-artifact@v4
6151
with:
62-
name: dist-wheel-${{ matrix.os }}-py${{ matrix.python-version }}
63-
path: dist/*.whl
52+
name: dist-wheel-${{ matrix.os }}
53+
path: wheelhouse/*.whl
6454

6555
publish-testpypi:
6656
name: Publish to TestPyPI

.github/workflows/publish-release.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,29 +40,19 @@ jobs:
4040
strategy:
4141
matrix:
4242
os: [ubuntu-latest, windows-latest, macos-latest]
43-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
4443

4544
steps:
4645
- uses: actions/checkout@v4
4746

48-
- name: Set up Python ${{ matrix.python-version }}
49-
uses: actions/setup-python@v5
50-
with:
51-
python-version: ${{ matrix.python-version }}
52-
53-
- name: Install build dependencies
54-
run: |
55-
python -m pip install --upgrade pip
56-
pip install build wheel setuptools
57-
58-
- name: Build wheel only
59-
run: python -m build --wheel
47+
- name: Build wheels
48+
uses: pypa/cibuildwheel@v2.22
49+
# Configuration is in pyproject.toml under [tool.cibuildwheel]
6050

6151
- name: Upload wheel artifacts
6252
uses: actions/upload-artifact@v4
6353
with:
64-
name: pypi-wheel-${{ matrix.os }}-py${{ matrix.python-version }}
65-
path: dist/*.whl
54+
name: pypi-wheel-${{ matrix.os }}
55+
path: wheelhouse/*.whl
6656
retention-days: 7
6757

6858
# Build Conda packages

pyproject.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,28 @@ py-modules = ["slick_queue_py", "atomic_ops"]
4242

4343
[tool.setuptools.dynamic]
4444
version = {attr = "slick_queue_py.__version__"}
45+
46+
[tool.cibuildwheel]
47+
# Build for CPython 3.8-3.14
48+
build = "cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
49+
# Skip musllinux builds (only build manylinux for Linux)
50+
skip = "*-musllinux_*"
51+
52+
# Test the wheels after building
53+
test-command = "python -c \"import slick_queue_py; import atomic_ops; print('Import successful')\""
54+
test-requires = []
55+
56+
# Build settings
57+
build-verbosity = 1
58+
59+
# Platform-specific settings
60+
[tool.cibuildwheel.linux]
61+
archs = ["x86_64"]
62+
# Use manylinux2014 for compatibility (RHEL 7+, Ubuntu 14.04+, Debian 8+)
63+
manylinux-x86_64-image = "manylinux2014"
64+
65+
[tool.cibuildwheel.windows]
66+
archs = ["AMD64"]
67+
68+
[tool.cibuildwheel.macos]
69+
archs = ["universal2"]

0 commit comments

Comments
 (0)