-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (70 loc) · 2.29 KB
/
ci.yml
File metadata and controls
94 lines (70 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
rust:
name: Rust (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace -- -D warnings
- name: Run tests
run: cargo test --workspace
python:
name: Python (ruff + pytest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- uses: astral-sh/setup-uv@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Ruff lint
run: uvx ruff check python/
- name: Ruff format
run: uvx ruff format --check python/
- name: Run tests
run: uv run --extra dev pytest -x -q
diagnostics-verification:
name: Diagnostics correctness harness
needs: python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- uses: astral-sh/setup-uv@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build extension (release)
# `uv run` resolves the dev extras; maturin develop --release builds
# the optimized extension into the project's venv so the harness can
# import it.
run: uv run --extra dev maturin develop --release
- name: Run diagnostics verification harness
# The harness exits non-zero on any invariant failure, which fails
# the build. statsmodels is part of the `dev` extra (pyproject.toml),
# so cross-validation checks run automatically; the harness also
# gracefully skips them if statsmodels is unavailable.
run: uv run --extra dev python benchmarks/verify_diagnostics_correctness.py