Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
MATURIN_TEST_CLEANUP: 1

build_and_test:
&BUILD_AND_TEST # only run tasks on pull request or github merge queue branches
Expand All @@ -14,7 +15,8 @@ build_and_test:
build_script:
- cargo build
test_script:
- cargo test
- curl -LsSf https://get.nexte.st/latest/freebsd | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
- cargo nextest run

freebsd_task:
name: Test (x86_64 FreeBSD)
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ tags
test-crates/targets/
test-crates/venvs/
test-crates/wheels/
test-crates/case-packages/
venv*/
6 changes: 2 additions & 4 deletions guide/src/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,8 @@ You need to install `cffi` and `virtualenv` (`pip install cffi virtualenv`) to r
You can set the `MATURIN_TEST_PYTHON` environment variable to run the tests against a specific Python version,
for example `MATURIN_TEST_PYTHON=python3.11 cargo test` will run the tests against Python 3.11.

There are some optional hacks that can speed up the tests (over 80s to 17s on my machine).
1. By running `cargo build --release --manifest-path test-crates/cargo-mock/Cargo.toml` you can activate a cargo cache avoiding to rebuild the pyo3 test crates with every python version.
2. Delete `target/test-cache` to clear the cache (e.g. after changing a test crate) or remove `test-crates/cargo-mock/target/release/cargo` to deactivate it.
3. By running the tests with the `faster-tests` feature, binaries are stripped and wheels are only stored and not compressed.
There is one optional hack that can speed up the tests.
1. By running the tests with the `faster-tests` feature, binaries are stripped and wheels are only stored and not compressed.

## Releasing

Expand Down
157 changes: 0 additions & 157 deletions test-crates/cargo-mock/Cargo.lock

This file was deleted.

14 changes: 0 additions & 14 deletions test-crates/cargo-mock/Cargo.toml

This file was deleted.

151 changes: 0 additions & 151 deletions test-crates/cargo-mock/src/main.rs

This file was deleted.

1 change: 1 addition & 0 deletions test-crates/cffi-mixed-implicit/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python/cffi_mixed_implicit/some_rust/rust/
7 changes: 7 additions & 0 deletions test-crates/cffi-mixed-implicit/Cargo.lock

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

9 changes: 9 additions & 0 deletions test-crates/cffi-mixed-implicit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "cffi-mixed-implicit"
version = "0.1.0"
authors = ["Armin Ronacher <armin.ronacher@active-4.com>"]
edition = "2021"

[lib]
name = "cffi_mixed_implicit"
crate-type = ["cdylib"]
17 changes: 17 additions & 0 deletions test-crates/cffi-mixed-implicit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# cffi-mixed-implicit

This fixture exercises a mixed cffi/python package with an implicit namespace package
and a Rust-backed submodule.

```bash
pip install .
```

```python
import cffi_mixed_implicit.some_rust as some_rust

point = some_rust.lib.get_origin()
assert some_rust.lib.is_in_range(point, 0.0)
```

The install smoke test lives in `check_installed/check_installed.py`.
Loading
Loading