Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 16 additions & 22 deletions .github/workflows/create_wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,54 +15,47 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: [37, 38, 39, 310, 311]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: all

- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Build wheels
uses: pypa/cibuildwheel@v2.11.3
uses: pypa/cibuildwheel@v3.0.0
env:
CIBW_BUILD: cp${{matrix.python-version}}-*
CIBW_BUILD: cp38-*
CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH" CARGO_TERM_COLOR="always"'
CIBW_ENVIRONMENT_WINDOWS: 'PATH="$UserProfile\.cargo\bin;$PATH"'

- name: Upload Binaries
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.os }}
path: wheelhouse

test-wheels:
needs: [build-wheels]
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: py_cpp_demangle_source
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: wheels
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
name: wheels-${{ matrix.os }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: 3.x
- name: Install wheel
run: |
pip install --force-reinstall --no-deps --no-index --find-links . cpp-demangle
Expand All @@ -76,17 +69,18 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/')"
needs: [test-wheels]
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: wheels
pattern: wheels-*
merge-multiple: true
- name: Create GitHub Release
uses: fnkr/[email protected]
env:
GHR_PATH: .
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.x
- name: Push to PyPi
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ cpp_demangle = "0.4.0"

[dependencies.pyo3]
version = "0.17.3"
features = ["extension-module"]
features = ["extension-module", "abi3"]
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# skip testing in the cibuildwheel phase, will install the wheels later
# and verify
test-command = ""
skip = ["pp*", "*musl*", "*-manylinux_i686", "*win32"]
skip = ["*musl*", "*-manylinux_i686", "*win32"]

[tool.cibuildwheel.macos]
archs = ["x86_64"]
[tool.cibuildwheel.macos.environment]
MACOSX_DEPLOYMENT_TARGET = "10.12"

[build-system]
requires = [
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ search = name = "py_cpp_demangle"
version = "{current_version}"
replace = name = "py_cpp_demangle"
version = "{new_version}"

[bdist_wheel]
py_limited_api=cp38