MAINT: Build abi3 wheels and use native arm64 Linux #142
Workflow file for this run
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - "*" | |
| pull_request: | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-sdist: | |
| name: Build sdist | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build sdist | |
| run: pipx run build -s | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: source-dist | |
| path: ./dist/*.tar.gz | |
| build-wheel: | |
| name: Build wheel for ${{ matrix.buildplat[1] }} | |
| runs-on: ${{ matrix.buildplat[0] }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| buildplat: | |
| - [ubuntu-latest, musllinux_x86_64] | |
| - [ubuntu-latest, manylinux_x86_64] | |
| - [ubuntu-24.04-arm64, manylinux_aarch64] | |
| - [macos-latest, macosx_arm64] | |
| - [macos-15-intel, macosx_x86_64] | |
| - [windows-latest, win_amd64] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build wheel(s) | |
| uses: pypa/[email protected] | |
| env: | |
| CIBW_BUILD: "cp*-${{ matrix.buildplat[1] }}" | |
| CIBW_SKIP: "cp312-* cp313-* cp314-*" | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }}-dist | |
| path: ./wheelhouse/*.whl | |
| test-sdist: | |
| name: Test sdist | |
| needs: [build-sdist] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| name: source-dist | |
| path: ./dist | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Display Python version | |
| run: python -c "import sys; print(sys.version)" | |
| - name: Install sdist | |
| run: pip install dist/*.tar.gz | |
| - run: python -c 'import nitime; print(nitime.__version__)' | |
| - name: Install pytest | |
| run: pip install pytest | |
| - name: Run tests | |
| run: pytest -v --pyargs nitime | |
| pre-publish: | |
| runs-on: ubuntu-latest | |
| needs: [test-sdist, build-wheel] | |
| steps: | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| path: dist/ | |
| pattern: '*-dist' | |
| merge-multiple: true | |
| - run: ls -lR dist/ | |
| - run: pipx run twine check dist/* | |
| publish: | |
| runs-on: ubuntu-latest | |
| environment: "Package deployment" | |
| needs: [pre-publish] | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| path: dist/ | |
| pattern: '*-dist' | |
| merge-multiple: true | |
| - run: ls -lR dist/ | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} |