Skip to content

Commit

Permalink
ci: Test minimum and maximum python versions (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
ABorgna authored Oct 30, 2024
1 parent 2efb687 commit ea36406
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ env:
MIRIFLAGS: '-Zmiri-permissive-provenance'
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
# Supported python version range
PYTHON_MIN_VERSION: 3.9
PYTHON_MAX_VERSION: 3.13

jobs:
# Computes if changes where made to each group of files, so we can run only the necessary checks.
Expand Down Expand Up @@ -90,7 +93,7 @@ jobs:
with:
enable-cache: true
- name: Install the project libraries
run: uv sync --locked
run: uv sync --frozen
- name: Check rust formatting
run: cargo fmt -p quizx_pybindings -- --check
- name: Run clippy
Expand Down Expand Up @@ -162,12 +165,14 @@ jobs:
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Install the project libraries
run: uv sync --locked
- name: Build pyo3 bindings
run: uv run maturin develop
- name: Test pyo3 bindings
run: uv run pytest
- name: Build pyo3 bindings for minimum supported python version
run: uv run --python ${{ env.PYTHON_MIN_VERSION }} maturin develop
- name: Test pyo3 bindings for minimum supported python version
run: uv run --python ${{ env.PYTHON_MIN_VERSION }} pytest
- name: Build pyo3 bindings for latest supported python version
run: uv run --python ${{ env.PYTHON_MAX_VERSION }} maturin develop
- name: Test pyo3 bindings for latest supported python version
run: uv run --python ${{ env.PYTHON_MAX_VERSION }} pytest

# This is a meta job to mark successful completion of the required checks,
# even if they are skipped due to no changes in the relevant files.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "quizx"
description = "Quantum Circuit Optimisation and Compilation using the ZX-calculus"
version = "0.1.0"
requires-python = ">=3.9,<3.14"
requires-python = ">=3.9"
license = { file = "LICENSE" }
readme = "pybindings/README.md"
authors = [{ name = "Aleks Kissinger", email = "[email protected]" }]
Expand Down
4 changes: 1 addition & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ea36406

Please sign in to comment.