Skip to content

Commit 80db89c

Browse files
committed
update ci
1 parent 87844d8 commit 80db89c

3 files changed

Lines changed: 27 additions & 5 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
test:
2727
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }}
2828
runs-on: ${{ matrix.platform.os }}
29+
continue-on-error: ${{ startsWith(matrix.python-version, '3.15') }} # remove once 3.15 releases
2930
needs: [lint, check-msrv, examples]
3031
strategy:
3132
fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }}
@@ -40,6 +41,8 @@ jobs:
4041
"3.13",
4142
"3.14",
4243
"3.14t",
44+
"3.15",
45+
"3.15t",
4346
"pypy-3.11",
4447
]
4548
platform:
@@ -78,31 +81,46 @@ jobs:
7881
# no 32 bit windows PyPy
7982
- python-version: pypy-3.11
8083
platform: { os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" }
84+
# free-threaded on 32bit only supported on 3.15+
85+
- python-version: 3.14t
86+
platform: { os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" }
87+
8188
steps:
8289
- uses: actions/checkout@v6
8390
- name: Set up Python ${{ matrix.python-version }}
8491
uses: actions/setup-python@v6
8592
with:
8693
python-version: ${{ matrix.python-version }}
8794
architecture: ${{ matrix.platform.python-architecture }}
95+
allow-prereleases: ${{ startsWith(matrix.python-version, '3.15') }} # remove once 3.15 releases
96+
- name: Set up UV
97+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
8898
- name: Install Rust
8999
uses: dtolnay/rust-toolchain@stable
90100
with:
91101
targets: ${{ matrix.platform.rust-target }}
92102
- name: Test
93-
run: |
94-
pip install "numpy" ml_dtypes
95-
cargo test --all-features
96103
# Not on PyPy, because no embedding API
97104
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
105+
run: |
106+
uv pip install "numpy" ml_dtypes
107+
cargo test --all-features
108+
- name: Test abi3t
109+
if: ${{ matrix.python-version == '3.15t' }}
110+
run: |
111+
cargo test --all-features -F pyo3/abi3t
98112
- name: Test example
99113
run: |
100-
pip install nox
101-
nox -f examples/simple/noxfile.py
114+
uvx nox -f examples/simple/noxfile.py
102115
env:
103116
CARGO_TERM_VERBOSE: true
104117
CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }}
105118
RUST_BACKTRACE: 1
119+
UV_SYSTEM_PYTHON: true
120+
UV_PRERELEASE: ${{ startsWith(matrix.python-version, '3.15') && 'allow' || 'disallow' }} # remove once numpy 2.6 releases
121+
UV_NO_BUILD_PACKAGE: "numpy"
122+
UV_INDEX: ${{ startsWith(matrix.python-version, '3.15') && 'https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/' || '' }} # remove once numpy 2.6 releases
123+
NOX_DEFAULT_VENV_BACKEND: "uv"
106124

107125
test-numpy1:
108126
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }} numpy1

‎src/lib.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,6 @@ macro_rules! pyarray {
181181
$crate::IntoPyArray::into_pyarray($crate::array![$($x,)*], $py)
182182
}};
183183
}
184+
185+
#[cfg(all(not(Py_3_15), Py_GIL_DISABLED, target_pointer_width = "32"))]
186+
compile_error!("free-threaded Python on 32bit platforms is only supported from 3.15+");

‎src/strings.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ mod tests {
205205
use super::*;
206206

207207
#[test]
208+
#[allow(clippy::byte_char_slices)]
208209
fn format_fixed_string() {
209210
assert_eq!(
210211
PyFixedString([b'f', b'o', b'o', 0, 0, 0]).to_string(),

0 commit comments

Comments
 (0)