Skip to content

Commit 450a241

Browse files
committed
use uv in ci
1 parent 050aefe commit 450a241

1 file changed

Lines changed: 22 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
- release-*
8+
- ci-*
89
pull_request:
910

1011
concurrency:
@@ -26,22 +27,12 @@ jobs:
2627
test:
2728
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }}
2829
runs-on: ${{ matrix.platform.os }}
29-
needs: [lint, check-msrv, examples]
30+
# needs: [lint, check-msrv, examples]
3031
strategy:
3132
fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }}
3233
matrix:
33-
python-version:
34-
[
35-
"3.8",
36-
"3.9",
37-
"3.10",
38-
"3.11",
39-
"3.12",
40-
"3.13",
41-
"3.14",
42-
"3.14t",
43-
"pypy-3.11",
44-
]
34+
# python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "pypy-3.11"]
35+
python-version: ["3.14", "3.14t", "3.15", "3.15t", "pypy-3.11"]
4536
platform:
4637
[
4738
{
@@ -85,24 +76,37 @@ jobs:
8576
with:
8677
python-version: ${{ matrix.python-version }}
8778
architecture: ${{ matrix.platform.python-architecture }}
79+
allow-prereleases: ${{ startsWith(matrix.python-version, '3.15') }}
80+
- name: Set up UV
81+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
82+
with:
83+
enable-cache: false
8884
- name: Install Rust
8985
uses: dtolnay/rust-toolchain@stable
9086
with:
9187
targets: ${{ matrix.platform.rust-target }}
9288
- name: Test
93-
run: |
94-
pip install "numpy" ml_dtypes
95-
cargo test --all-features
9689
# Not on PyPy, because no embedding API
9790
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
91+
run: |
92+
uv pip install "numpy" ml_dtypes
93+
cargo test --all-features
94+
- name: Test abi3t
95+
if: ${{ matrix.python-version == '3.15t' }}
96+
run: |
97+
cargo test --all-features -F pyo3/abi3t
9898
- name: Test example
9999
run: |
100-
pip install nox
101-
nox -f examples/simple/noxfile.py
100+
uvx nox -f examples/simple/noxfile.py
102101
env:
103102
CARGO_TERM_VERBOSE: true
104103
CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }}
105104
RUST_BACKTRACE: 1
105+
UV_SYSTEM_PYTHON: true
106+
UV_PRERELEASE: ${{ startsWith(matrix.python-version, '3.15') && 'allow' || 'disallow' }}
107+
UV_NO_BUILD_PACKAGE: "numpy"
108+
UV_INDEX: ${{ startsWith(matrix.python-version, '3.15') && 'https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/' || '' }}
109+
NOX_DEFAULT_VENV_BACKEND: "uv"
106110

107111
test-numpy1:
108112
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }} numpy1

0 commit comments

Comments
 (0)