| 1 |
name: build |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
jobs: |
| 6 |
|
| 7 |
style: |
| 8 |
runs-on: ubuntu-latest |
| 9 |
steps: |
| 10 |
- uses: actions/checkout@v4 |
| 11 |
- name: Style |
| 12 |
run: | |
| 13 |
shopt -s globstar && |
| 14 |
! grep -E '.{80}' **/*.py |
| 15 |
|
| 16 |
build: |
| 17 |
strategy: |
| 18 |
matrix: |
| 19 |
os: [ubuntu-latest, macos-latest, windows-latest] |
| 20 |
pytag: [cp38, cp39, cp310, cp311, cp312, cp313] |
| 21 |
fail-fast: false |
| 22 |
runs-on: ${{ matrix.os }} |
| 23 |
steps: |
| 24 |
- uses: actions/checkout@v4 |
| 25 |
- uses: docker/setup-qemu-action@v3 |
| 26 |
if: runner.os == 'Linux' |
| 27 |
- uses: pypa/[email protected] |
| 28 |
env: |
| 29 |
CIBW_BUILD: '${{ matrix.pytag }}-*' |
| 30 |
CIBW_SKIP: '*-musllinux_*' |
| 31 |
|
| 32 |
CIBW_TEST_SKIP: '*-macosx_universal2:arm64 cp313-win_amd64' |
| 33 |
CIBW_ARCHS_LINUX: 'x86_64 aarch64' |
| 34 |
CIBW_ARCHS_MACOS: 'x86_64 universal2' |
| 35 |
CIBW_ARCHS_WINDOWS: 'AMD64' |
| 36 |
CIBW_TEST_REQUIRES: pytest |
| 37 |
CIBW_TEST_COMMAND: python -I -mpytest --pyargs hmmlearn.tests {project}/doc |
| 38 |
- uses: actions/upload-artifact@v4 |
| 39 |
with: |
| 40 |
name: wheel-${{ matrix.os }}-${{ matrix.pytag }} |
| 41 |
path: wheelhouse/*.whl |
| 42 |
if: ${{ always() }} |
| 43 |
|
| 44 |
merge-wheels: |
| 45 |
runs-on: ubuntu-latest |
| 46 |
needs: build |
| 47 |
steps: |
| 48 |
- uses: actions/upload-artifact/merge@v4 |
| 49 |
with: |
| 50 |
name: wheels |