Skip to content

chore(tket): πŸ¦€ release #4136

chore(tket): πŸ¦€ release

chore(tket): πŸ¦€ release #4136

# A check that ensures that `tket-py` works correctly with the latest release of `tket-exts` and `tket-eccs`.
#
# If this fails, it is likely that we either didn't update the dependency version in tket's pyproject,
# or the latest `tket-exts`/`tket-eccs` packages haven't been published to pypi.
name: 🚚 Release Checks
on:
pull_request:
branches:
- main
workflow_dispatch: {}
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
# Pinned version for the uv package manager
UV_VERSION: "0.11.15"
jobs:
py-release:
name: Check `tket-py`compatibility with ${{ matrix.target.resolution }} dependencies
runs-on: ubuntu-latest
# Check if we are running on a release PR.
#
# release-please always uses this branch name.
if: ${{ github.event_name == 'workflow_dispatch' || github.head_ref == 'release-please--branches--main--components--tket-py' }}
strategy:
fail-fast: false
matrix:
target:
- resolution: "highest"
python: "3.14"
- resolution: "lowest-direct"
python: "3.10"
steps:
- uses: actions/checkout@v7
- uses: mozilla-actions/sccache-action@v0.0.11
- uses: quantinuum/hugrverse-env/install-hugrenv-action@main
with:
packages: "tket"
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Install Python ${{ matrix.target.python }}
run: |
uv python install ${{ matrix.target.python }}
uv python pin ${{ matrix.target.python }}
- name: Setup `tket-py` with only pypi deps
env:
RES: ${{ matrix.target.resolution }}
run: |
UV_RESOLUTION="$RES" uv lock --no-sources -U
UV_RESOLUTION="$RES" uv sync --all-extras --no-sources --no-install-workspace
uv pip install --no-sources tket-exts
uv pip install --no-sources tket-eccs
uv run --no-sync maturin develop
echo "\nDone! Installed dependencies:"
uv pip list
- name: Type check with mypy
run: uv run --no-sync mypy tket/tket-py
- name: Lint with ruff
run: uv run --no-sync ruff check tket/tket-py
- name: Run python tests
run: uv run --no-sync pytest tket/tket-py