improved coverage #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build secondary wheels | |
on: | |
push: | |
tags: | |
- v* | |
pull_request: | |
paths: | |
- '**' | |
jobs: | |
build_wheels: | |
name: Build secondary wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
cibw_archs: "aarch64" | |
- os: windows-latest | |
cibw_archs: "ARM64" | |
- os: macos-latest | |
cibw_archs: "native x86_64" | |
steps: | |
- name: Set up QEMU | |
if: matrix.cibw_archs == 'aarch64' | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: arm64 | |
- uses: actions/checkout@v3 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
CIBW_SKIP: "cp311-* cp312-* pp*" | |
CIBW_TEST_REQUIRES: pytest | |
CIBW_TEST_COMMAND: > | |
python -X faulthandler {package}/test/debug.py && | |
python -X faulthandler -m pytest -p no:faulthandler -s {package} | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build sdist on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
cibw_archs: "native" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build sdist | |
run: pipx run build --sdist | |
- name: Copy sdist package | |
run: cp dist/frozendict-*.tar.gz dist/frozendict.tar.gz | |
- name: Prepare system for core dumps | |
run: | | |
sudo mkdir /cores && | |
sudo chmod 777 /cores && | |
sudo bash -c 'echo "/cores/%e.%p.%t" > /proc/sys/kernel/core_pattern' | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
CIBW_BUILD: "cp310-*" | |
CIBW_SKIP: "*-musllinux_*" | |
CIBW_TEST_REQUIRES: pytest | |
CIBW_TEST_COMMAND: > | |
ulimit -c unlimited && | |
python -X faulthandler {package}/test/debug.py && | |
python -X faulthandler -m pytest -p no:faulthandler -s {package} | |
with: | |
package-dir: dist/frozendict.tar.gz | |
- name: Remove test sdist package | |
run: rm dist/frozendict.tar.gz | |
- name: Upload sdist artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.tar.gz | |
- name: Upload core files | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: cores | |
path: /cores |