Skip to content

Commit cf1ffae

Browse files
authored
ci: Fix python versions on release-checks (#1239)
- Use python 3.10 when testing the lowest possible dependencies (fixes an error with pytket not being found for py3.14) - Get the cached tket-c-api before calling `maturin build` CI run: https://github.com/CQCL/tket2/actions/runs/19262256076
1 parent 71d4ee9 commit cf1ffae

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

.github/workflows/release-checks.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ env:
1616
RUSTC_WRAPPER: "sccache"
1717
# Pinned version for the uv package manager
1818
UV_VERSION: "0.9.7"
19-
# The highest and lowest supported Python versions, used for testing
20-
PYTHON_HIGHEST: "3.14"
21-
PYTHON_LOWEST: "3.10"
19+
20+
# Path to the cached tket-c-api library
21+
# When this envvar is set, the `./.github/actions/tket-c-api` action **must** be run to fetch the artifacts
22+
# This config is not required, but speeds up the build by caching the tket-c-api library
23+
# The alternative is to install conan and remove the env var
24+
TKET_C_API_PATH: "${{ github.workspace }}/tket-c-api"
25+
LD_LIBRARY_PATH: ${{ github.workspace }}/tket-c-api/lib
2226

2327
jobs:
2428
py-release:
25-
name: Check `tket-py`compatibility with ${{ matrix.resolution }} dependencies
29+
name: Check `tket-py`compatibility with ${{ matrix.target.resolution }} dependencies
2630
runs-on: ubuntu-latest
2731
# Check if we are running on a release PR.
2832
#
@@ -31,24 +35,30 @@ jobs:
3135
strategy:
3236
fail-fast: false
3337
matrix:
34-
resolution:
35-
- "highest"
36-
- "lowest-direct"
38+
target:
39+
- resolution: "highest"
40+
python: "3.14"
41+
- resolution: "lowest-direct"
42+
python: "3.10"
3743
steps:
3844
- uses: actions/checkout@v5
3945
- uses: mozilla-actions/[email protected]
46+
- name: Install tket-c-api library
47+
uses: ./.github/actions/tket-c-api
48+
with:
49+
install-path: ${{ env.TKET_C_API_PATH }}
4050
- name: Set up uv
4151
uses: astral-sh/setup-uv@v7
4252
with:
4353
version: ${{ env.UV_VERSION }}
4454
enable-cache: true
45-
- name: Install Python ${{ env.PYTHON_HIGHEST }}
55+
- name: Install Python ${{ matrix.target.python }}
4656
run: |
47-
uv python install ${{ env.PYTHON_HIGHEST }}
48-
uv python pin ${{ env.PYTHON_HIGHEST }}
57+
uv python install ${{ matrix.target.python }}
58+
uv python pin ${{ matrix.target.python }}
4959
- name: Setup `tket-py` with only pypi deps
5060
env:
51-
UV_RESOLUTION: ${{ matrix.resolution }}
61+
UV_RESOLUTION: ${{ matrix.target.resolution }}
5262
run: |
5363
uv lock --no-sources -U
5464
uv sync --no-sources --no-install-workspace

0 commit comments

Comments
 (0)