chore(deps): bump actions/checkout from 4.3.1 to 7.0.0 #8
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: Python wheels | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-14 | |
| target: aarch64-apple-darwin | |
| manylinux: 'off' | |
| - os: macos-13 | |
| target: x86_64-apple-darwin | |
| manylinux: 'off' | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| manylinux: '2_28' | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: '3.11' | |
| - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| manylinux: ${{ matrix.manylinux }} | |
| command: build | |
| args: --release --locked --out dist | |
| - name: Fresh wheel smoke | |
| shell: bash | |
| run: | | |
| python -m venv wheel-venv | |
| wheel-venv/bin/pip install dist/*.whl | |
| wheel-venv/bin/python -c 'import rosalind; print(rosalind.__version__)' | |
| wheel-venv/bin/rosalind --version | |
| mkdir -p wheel-smoke | |
| wheel-venv/bin/rosalind sort \ | |
| --input examples/data/illumina_toy/alignments.bam \ | |
| --output wheel-smoke/sorted.bam | |
| wheel-venv/bin/rosalind reference build \ | |
| --fasta examples/data/illumina_toy/reference.fa \ | |
| --output wheel-smoke/reference.rref | |
| wheel-venv/bin/python - <<'PY' | |
| import rosalind | |
| run = rosalind.iter_features( | |
| "wheel-smoke/reference.rref", | |
| "wheel-smoke/sorted.bam", | |
| workdir="wheel-smoke/python", | |
| ) | |
| rows = sum(batch.num_rows for batch in run.batches()) | |
| assert rows > 0 | |
| assert run.result is not None and run.result.returncode == 0 | |
| receipt = rosalind.inspect_receipt(run.result.manifest_path) | |
| assert receipt.params["feature.schema"] == "1" | |
| PY | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: wheel-${{ matrix.target }} | |
| path: dist/*.whl | |
| if-no-files-found: error | |
| publish-testpypi: | |
| if: github.event_name == 'release' && github.event.release.prerelease | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| pattern: wheel-* | |
| path: dist | |
| merge-multiple: true | |
| - uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| packages-dir: dist | |
| publish-pypi: | |
| if: github.event_name == 'release' && !github.event.release.prerelease | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| pattern: wheel-* | |
| path: dist | |
| merge-multiple: true | |
| - uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1 | |
| with: | |
| packages-dir: dist |