Advance to 0.9.6.8.dev development series #277
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: | |
| - main | |
| tags: | |
| - v** | |
| pull_request: | |
| types: [opened, synchronize] | |
| jobs: | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - name: Apply patches | |
| run: cat $(ls patches/*.patch | sort) | patch -p1 -N | |
| - name: Build sdist | |
| run: pip3 install build && python3 -m build -s . | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: dist/*.tar.gz | |
| name: sdist | |
| build_wheels: | |
| needs: [build_sdist] | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: sdist | |
| path: dist | |
| - name: Decompress sdist (windows) | |
| if: startsWith(matrix.os, 'windows-') | |
| run: tar --strip-components=1 -xf $(dir dist/*.tar.gz | % {$_.FullName}) | |
| - name: Decompress sdist | |
| if: "! startsWith(matrix.os, 'windows-')" | |
| run: tar --strip-components=1 -xf dist/*.tar.gz | |
| - name: Build wheel | |
| uses: pypa/[email protected] | |
| env: | |
| CIBW_SKIP: pp* *musllinux* | |
| CIBW_TEST_COMMAND: pytest --regression {package}/tests | |
| CIBW_BEFORE_TEST: pip install pytest dials-data | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
| path: ./wheelhouse/*.whl | |
| upload_pypi: | |
| needs: [build_wheels, build_sdist] | |
| runs-on: ubuntu-latest | |
| environment: PyPI | |
| permissions: | |
| id-token: write | |
| if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: sdist | |
| path: dist | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: cibw-* | |
| path: dist | |
| merge-multiple: true | |
| - uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc |