| 1 |
name: Build secondary wheels |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
tags: |
| 6 |
- v* |
| 7 |
pull_request: |
| 8 |
paths: |
| 9 |
- '**' |
| 10 |
|
| 11 |
jobs: |
| 12 |
build_wheels: |
| 13 |
name: Build secondary wheels on ${{ matrix.os }} |
| 14 |
runs-on: ${{ matrix.os }} |
| 15 |
strategy: |
| 16 |
matrix: |
| 17 |
include: |
| 18 |
- os: ubuntu-latest |
| 19 |
cibw_archs: "aarch64" |
| 20 |
- os: windows-latest |
| 21 |
cibw_archs: "ARM64" |
| 22 |
- os: macos-14 |
| 23 |
cibw_archs: "native" |
| 24 |
- os: macos-13 |
| 25 |
cibw_archs: "x86_64" |
| 26 |
|
| 27 |
steps: |
| 28 |
- name: Set up QEMU |
| 29 |
if: matrix.cibw_archs == 'aarch64' |
| 30 |
uses: docker/setup-qemu-action@v2 |
| 31 |
with: |
| 32 |
platforms: arm64 |
| 33 |
|
| 34 |
- uses: actions/checkout@v3 |
| 35 |
|
| 36 |
- name: Build wheels |
| 37 |
uses: pypa/[email protected] |
| 38 |
env: |
| 39 |
CIBW_ARCHS: ${{ matrix.cibw_archs }} |
| 40 |
CIBW_SKIP: "cp311-* cp312-* pp*" |
| 41 |
CIBW_TEST_REQUIRES: pytest |
| 42 |
CIBW_TEST_COMMAND: > |
| 43 |
python -X faulthandler {package}/test/debug.py && |
| 44 |
python -X faulthandler -m pytest -p no:faulthandler -s {package} |
| 45 |
|
| 46 |
- uses: actions/upload-artifact@v3 |
| 47 |
with: |
| 48 |
path: ./wheelhouse/*.whl |
| 49 |
|
| 50 |
build_sdist: |
| 51 |
name: Build sdist |
| 52 |
runs-on: ubuntu-latest |
| 53 |
|
| 54 |
steps: |
| 55 |
- uses: actions/checkout@v3 |
| 56 |
|
| 57 |
- name: Build sdist |
| 58 |
run: pipx run build --sdist |
| 59 |
|
| 60 |
- name: Copy sdist package |
| 61 |
run: cp dist/frozendict-*.tar.gz dist/frozendict.tar.gz |
| 62 |
|
| 63 |
- name: Build wheels |
| 64 |
uses: pypa/[email protected] |
| 65 |
|
| 66 |
env: |
| 67 |
CIBW_ARCHS: native |
| 68 |
CIBW_BUILD: "cp310-*" |
| 69 |
CIBW_SKIP: "*-musllinux_*" |
| 70 |
CIBW_TEST_REQUIRES: pytest |
| 71 |
CIBW_TEST_COMMAND: > |
| 72 |
python -X faulthandler {package}/test/debug.py && |
| 73 |
python -X faulthandler -m pytest -p no:faulthandler -s {package} |
| 74 |
with: |
| 75 |
package-dir: dist/frozendict.tar.gz |
| 76 |
|
| 77 |
- name: Remove test sdist package |
| 78 |
run: rm dist/frozendict.tar.gz |
| 79 |
|
| 80 |
- name: Upload sdist artifact |
| 81 |
uses: actions/upload-artifact@v3 |
| 82 |
with: |
| 83 |
path: dist/*.tar.gz |