Build #54
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: | |
| create: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| schedule: | |
| - cron: "0 8 * * *" | |
| jobs: | |
| test: | |
| name: test ${{ matrix.py }} - ubuntu | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| py: | |
| - 3.13 | |
| - 3.12 | |
| - 3.11 | |
| - "3.10" | |
| - 3.9 | |
| - pypy-3.10 | |
| steps: | |
| - name: Setup Python for test ${{ matrix.py }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.py }} | |
| - uses: actions/checkout@v4 | |
| - name: Install Testing Dependencies | |
| run: pip install -r developer_requirements.txt | |
| - name: Run Tests | |
| run: SKIP_BLACK="1" ./run-tests.sh | |
| - name: Upload coverage to Codecov | |
| uses: codecov/[email protected] | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| build-wheels: | |
| name: build wheels on ubuntu ${{ matrix.py }} ${{ matrix.qemu }} ${{ matrix.libc }} | |
| runs-on: ubuntu-latest | |
| needs: test | |
| strategy: | |
| matrix: | |
| py: | |
| - 39 | |
| - 310 | |
| - 311 | |
| - 312 | |
| - 313 | |
| qemu: | |
| - x86_64 | |
| - aarch64 | |
| libc: | |
| - "manylinux" | |
| - "musllinux" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Install Cython | |
| run: pip install -r developer_requirements.txt | |
| - name: Cythonize | |
| run: | | |
| make clean | |
| make all | |
| - name: Build wheels | |
| uses: pypa/[email protected] | |
| env: | |
| CIBW_ARCHS_LINUX: ${{ matrix.qemu }} | |
| CIBW_BUILD: "*${{ matrix.py }}*${{ matrix.libc }}*" | |
| - name: Archive all wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-wheels-${{ matrix.py }}-${{ matrix.qemu }}-${{ matrix.libc }} | |
| path: | | |
| ./wheelhouse/*.whl | |
| if-no-files-found: error | |
| release: | |
| name: release | |
| runs-on: ubuntu-latest | |
| needs: build-wheels | |
| steps: | |
| - name: Make release | |
| if: ${{ github.event_name == 'create' && github.event.ref_type == 'tag' }} | |
| continue-on-error: true | |
| run: | | |
| curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{github.repository}}/releases -d '{"tag_name": "${{github.event.ref}}"}' | |
| - name: Get release id | |
| if: ${{ github.event_name == 'create' && github.event.ref_type == 'tag' }} | |
| id: get_release_id | |
| run: | | |
| release_id=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{github.repository}}/releases/tags/${{github.event.ref}} | jq -r '.id') | |
| echo ${release_id} | |
| echo "release_id=${release_id}" >> $GITHUB_ENV | |
| - name: Download distributions | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: linux-wheels-* | |
| merge-multiple: true | |
| path: dist | |
| - name: Upload binaries to release | |
| uses: svenstaro/upload-release-action@v2 | |
| if: ${{ github.event_name == 'create' && github.event.ref_type == 'tag' }} | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ./dist/*linux*.whl | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| file_glob: true |