Skip to content

Commit 4227baa

Browse files
committed
use uv in ci
1 parent 4ef0102 commit 4227baa

1 file changed

Lines changed: 58 additions & 24 deletions

File tree

.github/workflows/ci.yml

Lines changed: 58 additions & 24 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:
@@ -30,18 +31,7 @@ jobs:
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"]
4535
platform:
4636
[
4737
{
@@ -67,31 +57,55 @@ jobs:
6757
]
6858
include:
6959
- python-version: 3.8
70-
platform: { os: "macos-15-intel", python-architecture: "x64", rust-target: "x86_64-apple-darwin" }
60+
platform:
61+
{
62+
os: "macos-15-intel",
63+
python-architecture: "x64",
64+
rust-target: "x86_64-apple-darwin",
65+
}
7166
- python-version: 3.9
72-
platform: { os: "macos-15-intel", python-architecture: "x64", rust-target: "x86_64-apple-darwin" }
67+
platform:
68+
{
69+
os: "macos-15-intel",
70+
python-architecture: "x64",
71+
rust-target: "x86_64-apple-darwin",
72+
}
7373
exclude:
7474
- python-version: 3.8
75-
platform: { os: "macOS-latest", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" }
75+
platform:
76+
{
77+
os: "macOS-latest",
78+
python-architecture: "arm64",
79+
rust-target: "aarch64-apple-darwin",
80+
}
7681
- python-version: 3.9
77-
platform: { os: "macOS-latest", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" }
82+
platform:
83+
{
84+
os: "macOS-latest",
85+
python-architecture: "arm64",
86+
rust-target: "aarch64-apple-darwin",
87+
}
7888
# no 32 bit windows PyPy
7989
- python-version: pypy-3.11
80-
platform: { os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" }
90+
platform:
91+
{
92+
os: "windows-latest",
93+
python-architecture: "x86",
94+
rust-target: "i686-pc-windows-msvc",
95+
}
8196
steps:
82-
- uses: actions/checkout@v6
97+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
8398
- name: Set up Python ${{ matrix.python-version }}
8499
uses: actions/setup-python@v6
85100
with:
86101
python-version: ${{ matrix.python-version }}
87-
architecture: ${{ matrix.platform.python-architecture }}
88102
- name: Install Rust
89103
uses: dtolnay/rust-toolchain@stable
90104
with:
91105
targets: ${{ matrix.platform.rust-target }}
92106
- name: Test
93107
run: |
94-
pip install "numpy" ml_dtypes
108+
uv pip install "numpy" ml_dtypes
95109
cargo test --all-features
96110
# Not on PyPy, because no embedding API
97111
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
@@ -137,14 +151,34 @@ jobs:
137151
]
138152
include:
139153
- python-version: 3.8
140-
platform: { os: "macos-15-intel", python-architecture: "x64", rust-target: "x86_64-apple-darwin" }
154+
platform:
155+
{
156+
os: "macos-15-intel",
157+
python-architecture: "x64",
158+
rust-target: "x86_64-apple-darwin",
159+
}
141160
- python-version: 3.9
142-
platform: { os: "macos-15-intel", python-architecture: "x64", rust-target: "x86_64-apple-darwin" }
161+
platform:
162+
{
163+
os: "macos-15-intel",
164+
python-architecture: "x64",
165+
rust-target: "x86_64-apple-darwin",
166+
}
143167
exclude:
144168
- python-version: 3.8
145-
platform: { os: "macOS-latest", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" }
169+
platform:
170+
{
171+
os: "macOS-latest",
172+
python-architecture: "arm64",
173+
rust-target: "aarch64-apple-darwin",
174+
}
146175
- python-version: 3.9
147-
platform: { os: "macOS-latest", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" }
176+
platform:
177+
{
178+
os: "macOS-latest",
179+
python-architecture: "arm64",
180+
rust-target: "aarch64-apple-darwin",
181+
}
148182
steps:
149183
- uses: actions/checkout@v6
150184
- name: Set up Python ${{ matrix.python-version }}

0 commit comments

Comments
 (0)