millwright 2.2.1__tar.gz → 2.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- millwright-2.3.1/.github/SECURITY.md +27 -0
- {millwright-2.2.1 → millwright-2.3.1}/.github/workflows/ci.yml +148 -51
- millwright-2.3.1/.github/workflows/codeql.yml +40 -0
- millwright-2.3.1/.github/workflows/release.yml +383 -0
- {millwright-2.2.1 → millwright-2.3.1}/.gitignore +4 -0
- {millwright-2.2.1 → millwright-2.3.1}/CHANGELOG.md +116 -0
- {millwright-2.2.1 → millwright-2.3.1}/CONTRIBUTING.md +2 -0
- {millwright-2.2.1 → millwright-2.3.1}/Cargo.lock +880 -27
- {millwright-2.2.1 → millwright-2.3.1}/Cargo.toml +77 -2
- {millwright-2.2.1 → millwright-2.3.1}/GUIDE.md +1 -1
- {millwright-2.2.1 → millwright-2.3.1}/PKG-INFO +43 -6
- {millwright-2.2.1 → millwright-2.3.1}/README.md +42 -5
- millwright-2.3.1/RELEASING.md +132 -0
- millwright-2.3.1/benches/gpu_compute.rs +74 -0
- millwright-2.3.1/benches/gpu_inference.rs +62 -0
- {millwright-2.2.1 → millwright-2.3.1}/docs/deploy.html +24 -2
- {millwright-2.2.1 → millwright-2.3.1}/docs/index.html +6 -4
- {millwright-2.2.1 → millwright-2.3.1}/docs/insight.html +2 -1
- {millwright-2.2.1 → millwright-2.3.1}/docs/python.html +32 -1
- {millwright-2.2.1 → millwright-2.3.1}/examples/automl.rs +1 -1
- millwright-2.3.1/examples/gpu.rs +78 -0
- millwright-2.3.1/examples/gpu_compute.rs +59 -0
- {millwright-2.2.1 → millwright-2.3.1}/examples/portability.rs +2 -2
- {millwright-2.2.1 → millwright-2.3.1}/examples/workflow.rs +3 -3
- {millwright-2.2.1 → millwright-2.3.1}/guide.html +3 -3
- {millwright-2.2.1 → millwright-2.3.1}/index.html +12 -10
- millwright-2.3.1/millwright.pyi +179 -0
- {millwright-2.2.1 → millwright-2.3.1}/pyproject.toml +2 -1
- millwright-2.3.1/requirements/ci-python.txt +3 -0
- millwright-2.3.1/requirements/onnx-check.txt +1 -0
- millwright-2.3.1/requirements/test-python.txt +1 -0
- millwright-2.3.1/scripts/check-branch-coverage.py +26 -0
- millwright-2.3.1/scripts/check-lcov-coverage.py +45 -0
- {millwright-2.2.1 → millwright-2.3.1}/scripts/release.ps1 +1 -1
- {millwright-2.2.1 → millwright-2.3.1}/scripts/release.sh +4 -4
- {millwright-2.2.1 → millwright-2.3.1}/scripts/sync-version.py +1 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/anomaly.rs +108 -5
- millwright-2.3.1/src/automl.rs +889 -0
- millwright-2.3.1/src/automl_tests.rs +254 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/backends/smartcore.rs +92 -46
- {millwright-2.2.1 → millwright-2.3.1}/src/ensemble.rs +289 -33
- millwright-2.3.1/src/ensemble_tests.rs +235 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/evaluate.rs +37 -25
- millwright-2.3.1/src/gpu.rs +298 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/lib.rs +11 -2
- {millwright-2.2.1 → millwright-2.3.1}/src/logistic.rs +152 -4
- millwright-2.3.1/src/onnx.rs +1232 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/onnx_native.rs +423 -10
- {millwright-2.2.1 → millwright-2.3.1}/src/pipeline.rs +38 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/profile.rs +116 -170
- millwright-2.3.1/src/profile_alerts.rs +121 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/python.rs +559 -240
- millwright-2.3.1/src/python_estimators.rs +310 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/serve.rs +10 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/traits.rs +25 -0
- {millwright-2.2.1 → millwright-2.3.1}/tests/ensemble_zoo.rs +1 -2
- {millwright-2.2.1 → millwright-2.3.1}/tests/golden.rs +2 -2
- millwright-2.3.1/tests/gpu_compute.rs +161 -0
- millwright-2.3.1/tests/gpu_inference.rs +271 -0
- {millwright-2.2.1 → millwright-2.3.1}/tests/onnx_export.rs +121 -0
- millwright-2.3.1/tests/property_inputs.rs +66 -0
- millwright-2.3.1/tests/python/compat_smoke.py +14 -0
- millwright-2.3.1/tests/python/test_ensembles_and_automl.py +153 -0
- {millwright-2.2.1 → millwright-2.3.1}/tests/python/test_frame_and_profile.py +1 -1
- millwright-2.3.1/tests/python/typing_contract.py +15 -0
- millwright-2.2.1/.github/workflows/release-crate.yml +0 -50
- millwright-2.2.1/.github/workflows/release-python.yml +0 -133
- millwright-2.2.1/RELEASING.md +0 -99
- millwright-2.2.1/src/automl.rs +0 -574
- millwright-2.2.1/src/ensemble_tests.rs +0 -87
- millwright-2.2.1/src/onnx.rs +0 -349
- {millwright-2.2.1 → millwright-2.3.1}/.cargo/audit.toml +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/.github/dependabot.yml +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/CNAME +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/LICENSE +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/benches/throughput.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/deny.toml +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/docs/data.html +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/docs/pipelines.html +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/docs/site.css +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/examples/backends.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/examples/explore.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/examples/insight.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/examples/operations.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/examples/specialized.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/examples/spine.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/examples/trust.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/backends/chronos.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/backends/incremental.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/backends/linfa.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/backends/mod.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/balance.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/calibration.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/diagnostics.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/error.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/explain.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/frame.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/monitor.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/onnx_tests.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/profile_render.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/profile_tests.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/python_data.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/registry.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/rng.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/selection/cv.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/selection/mod.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/selection/scoring.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/selection/search.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/table.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/transform.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/transform_advanced.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/transform_tests.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/src/viz.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/tests/hero_snippet.rs +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/tests/python/conftest.py +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/tests/python/test_pipeline.py +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/tests/python/test_search_and_portability.py +0 -0
- {millwright-2.2.1 → millwright-2.3.1}/tests/real_data.rs +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported versions
|
|
4
|
+
|
|
5
|
+
Security fixes are provided for the latest published Millwright release. Users
|
|
6
|
+
should upgrade to the newest version available on crates.io or PyPI before
|
|
7
|
+
reporting an issue that may already have been corrected.
|
|
8
|
+
|
|
9
|
+
## Reporting a vulnerability
|
|
10
|
+
|
|
11
|
+
Please do not open a public issue for a suspected vulnerability. Use
|
|
12
|
+
[GitHub private vulnerability reporting](https://github.com/mi7plus/millwright/security/advisories/new)
|
|
13
|
+
to share the affected version, impact, reproduction steps, and any suggested
|
|
14
|
+
mitigation privately with the maintainers.
|
|
15
|
+
|
|
16
|
+
You should receive an acknowledgement within seven days. The maintainers will
|
|
17
|
+
then validate the report, coordinate a fix and release where necessary, and
|
|
18
|
+
agree on disclosure timing with the reporter. Please allow a reasonable
|
|
19
|
+
remediation window before publishing details.
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
Reports about the Rust crate, Python wheels, serialization and ONNX handling,
|
|
24
|
+
model registry, inference server, release artifacts, or build and publishing
|
|
25
|
+
pipeline are in scope. Vulnerabilities in an upstream dependency should also be
|
|
26
|
+
reported upstream when appropriate; please still notify Millwright privately if
|
|
27
|
+
the dependency creates a practical risk for Millwright users.
|
|
@@ -6,6 +6,9 @@ on:
|
|
|
6
6
|
pull_request:
|
|
7
7
|
workflow_dispatch:
|
|
8
8
|
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
9
12
|
# One in-flight run per ref; a new push cancels the previous.
|
|
10
13
|
concurrency:
|
|
11
14
|
group: ci-${{ github.ref }}
|
|
@@ -24,28 +27,29 @@ jobs:
|
|
|
24
27
|
name: version & links
|
|
25
28
|
runs-on: ubuntu-latest
|
|
26
29
|
steps:
|
|
27
|
-
- uses: actions/checkout@v7
|
|
28
|
-
- uses: actions/setup-python@v7
|
|
30
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
31
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
|
29
32
|
with:
|
|
30
33
|
python-version: "3.x"
|
|
31
34
|
- name: verify every public version marker
|
|
32
35
|
run: python scripts/sync-version.py --check
|
|
33
36
|
- name: check local and external HTML links
|
|
34
|
-
uses: lycheeverse/lychee-action@v2
|
|
37
|
+
uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2
|
|
35
38
|
with:
|
|
36
39
|
args: >-
|
|
37
40
|
--no-progress
|
|
38
41
|
--accept 200,204,206,429
|
|
39
42
|
--retry-wait-time 2
|
|
40
43
|
index.html guide.html docs/*.html README.md CONTRIBUTING.md RELEASING.md
|
|
44
|
+
.github/SECURITY.md
|
|
41
45
|
fail: true
|
|
42
46
|
|
|
43
47
|
fmt:
|
|
44
48
|
name: rustfmt
|
|
45
49
|
runs-on: ubuntu-latest
|
|
46
50
|
steps:
|
|
47
|
-
- uses: actions/checkout@v7
|
|
48
|
-
- uses: dtolnay/rust-toolchain@stable
|
|
51
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
52
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
49
53
|
with:
|
|
50
54
|
components: rustfmt
|
|
51
55
|
- run: cargo fmt --all --check
|
|
@@ -61,11 +65,11 @@ jobs:
|
|
|
61
65
|
- features: "" # default features
|
|
62
66
|
- features: "--features full"
|
|
63
67
|
steps:
|
|
64
|
-
- uses: actions/checkout@v7
|
|
65
|
-
- uses: dtolnay/rust-toolchain@stable
|
|
68
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
69
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
66
70
|
with:
|
|
67
71
|
components: clippy
|
|
68
|
-
- uses: Swatinem/rust-cache@v2
|
|
72
|
+
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
|
|
69
73
|
- run: cargo clippy --locked --all-targets ${{ matrix.features }}
|
|
70
74
|
|
|
71
75
|
docs:
|
|
@@ -74,9 +78,9 @@ jobs:
|
|
|
74
78
|
env:
|
|
75
79
|
RUSTDOCFLAGS: "-D warnings"
|
|
76
80
|
steps:
|
|
77
|
-
- uses: actions/checkout@v7
|
|
78
|
-
- uses: dtolnay/rust-toolchain@stable
|
|
79
|
-
- uses: Swatinem/rust-cache@v2
|
|
81
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
82
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
83
|
+
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
|
|
80
84
|
# `full` is every Rust-facing feature (python is a cdylib, doc'd separately
|
|
81
85
|
# by maturin/pyo3), so this exercises the whole documented surface.
|
|
82
86
|
- run: cargo doc --locked --no-deps --features full
|
|
@@ -113,12 +117,25 @@ jobs:
|
|
|
113
117
|
# Everything at once — the superset build, including both ndarray worlds.
|
|
114
118
|
- { name: "full", features: "--features full" }
|
|
115
119
|
steps:
|
|
116
|
-
- uses: actions/checkout@v7
|
|
117
|
-
- uses: dtolnay/rust-toolchain@stable
|
|
118
|
-
- uses:
|
|
120
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
121
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
122
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
|
123
|
+
if: matrix.name == 'full'
|
|
124
|
+
with:
|
|
125
|
+
python-version: "3.14"
|
|
126
|
+
- name: install the official ONNX checker
|
|
127
|
+
if: matrix.name == 'full'
|
|
128
|
+
run: python -m pip install --requirement requirements/onnx-check.txt
|
|
129
|
+
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
|
|
119
130
|
with:
|
|
120
131
|
key: ${{ matrix.name }}
|
|
121
132
|
- run: cargo test --locked ${{ matrix.features }}
|
|
133
|
+
if: matrix.name != 'full'
|
|
134
|
+
- name: test full feature set with external ONNX validation
|
|
135
|
+
if: matrix.name == 'full'
|
|
136
|
+
run: cargo test --locked ${{ matrix.features }}
|
|
137
|
+
env:
|
|
138
|
+
MILLWRIGHT_ONNX_CHECKER: python
|
|
122
139
|
|
|
123
140
|
# Cross-platform confidence on the default install, without multiplying the
|
|
124
141
|
# whole feature matrix across three operating systems.
|
|
@@ -130,28 +147,28 @@ jobs:
|
|
|
130
147
|
matrix:
|
|
131
148
|
os: [windows-latest, macos-latest]
|
|
132
149
|
steps:
|
|
133
|
-
- uses: actions/checkout@v7
|
|
134
|
-
- uses: dtolnay/rust-toolchain@stable
|
|
135
|
-
- uses: Swatinem/rust-cache@v2
|
|
150
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
151
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
152
|
+
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
|
|
136
153
|
- run: cargo test --locked
|
|
137
154
|
|
|
138
155
|
msrv:
|
|
139
156
|
name: minimum Rust 1.95
|
|
140
157
|
runs-on: ubuntu-latest
|
|
141
158
|
steps:
|
|
142
|
-
- uses: actions/checkout@v7
|
|
143
|
-
- uses: dtolnay/rust-toolchain@stable
|
|
159
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
160
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
144
161
|
with:
|
|
145
162
|
toolchain: "1.95"
|
|
146
|
-
- uses: Swatinem/rust-cache@v2
|
|
163
|
+
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
|
|
147
164
|
- run: cargo check --locked --all-targets --features full
|
|
148
165
|
|
|
149
166
|
supply-chain:
|
|
150
167
|
name: advisories
|
|
151
168
|
runs-on: ubuntu-latest
|
|
152
169
|
steps:
|
|
153
|
-
- uses: actions/checkout@v7
|
|
154
|
-
- uses: dtolnay/rust-toolchain@stable
|
|
170
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
171
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
155
172
|
- run: cargo install cargo-audit --locked
|
|
156
173
|
- run: cargo audit
|
|
157
174
|
|
|
@@ -159,20 +176,20 @@ jobs:
|
|
|
159
176
|
name: dependency policy
|
|
160
177
|
runs-on: ubuntu-latest
|
|
161
178
|
steps:
|
|
162
|
-
- uses: actions/checkout@v7
|
|
163
|
-
- uses: taiki-e/install-action@cargo-deny
|
|
179
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
180
|
+
- uses: taiki-e/install-action@bf681f3be21c0d2daea0ea20bbf590138fc96a2b # cargo-deny
|
|
164
181
|
- run: cargo deny check
|
|
165
182
|
|
|
166
183
|
coverage:
|
|
167
184
|
name: coverage
|
|
168
185
|
runs-on: ubuntu-latest
|
|
169
186
|
steps:
|
|
170
|
-
- uses: actions/checkout@v7
|
|
171
|
-
- uses: dtolnay/rust-toolchain@stable
|
|
187
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
188
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
172
189
|
with:
|
|
173
190
|
components: llvm-tools-preview
|
|
174
|
-
- uses: taiki-e/install-action@cargo-llvm-cov
|
|
175
|
-
- uses: Swatinem/rust-cache@v2
|
|
191
|
+
- uses: taiki-e/install-action@d630c3ba8c9bb0648bcefda869fb0d9b98c611d9 # cargo-llvm-cov
|
|
192
|
+
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
|
|
176
193
|
- name: measure full-feature Rust coverage
|
|
177
194
|
run: cargo llvm-cov --locked --features full --workspace --lcov --output-path lcov.info
|
|
178
195
|
- name: enforce coverage floor
|
|
@@ -181,7 +198,7 @@ jobs:
|
|
|
181
198
|
--fail-under-lines 82
|
|
182
199
|
--fail-under-functions 75
|
|
183
200
|
--fail-under-regions 84
|
|
184
|
-
- uses: actions/upload-artifact@v7
|
|
201
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
185
202
|
with:
|
|
186
203
|
name: rust-coverage
|
|
187
204
|
path: lcov.info
|
|
@@ -191,20 +208,22 @@ jobs:
|
|
|
191
208
|
name: branch coverage
|
|
192
209
|
runs-on: ubuntu-latest
|
|
193
210
|
steps:
|
|
194
|
-
- uses: actions/checkout@v7
|
|
211
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
195
212
|
# LLVM branch instrumentation remains a nightly-only cargo-llvm-cov mode.
|
|
196
|
-
- uses: dtolnay/rust-toolchain@nightly
|
|
213
|
+
- uses: dtolnay/rust-toolchain@7c8d7d138f5c09cef361f8214cf96882cd029cdb # nightly
|
|
197
214
|
with:
|
|
198
215
|
components: llvm-tools-preview
|
|
199
|
-
- uses: taiki-e/install-action@cargo-llvm-cov
|
|
200
|
-
- uses: Swatinem/rust-cache@v2
|
|
216
|
+
- uses: taiki-e/install-action@d630c3ba8c9bb0648bcefda869fb0d9b98c611d9 # cargo-llvm-cov
|
|
217
|
+
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
|
|
201
218
|
with:
|
|
202
219
|
key: branch-coverage
|
|
203
220
|
- name: measure decision coverage
|
|
204
221
|
run: >-
|
|
205
222
|
cargo +nightly llvm-cov --locked --features full --workspace --branch
|
|
206
223
|
--cobertura --output-path branch-coverage.xml
|
|
207
|
-
-
|
|
224
|
+
- name: enforce branch coverage floor
|
|
225
|
+
run: python scripts/check-branch-coverage.py branch-coverage.xml --minimum 65
|
|
226
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
208
227
|
with:
|
|
209
228
|
name: rust-branch-coverage
|
|
210
229
|
path: branch-coverage.xml
|
|
@@ -214,8 +233,8 @@ jobs:
|
|
|
214
233
|
name: public API compatibility
|
|
215
234
|
runs-on: ubuntu-latest
|
|
216
235
|
steps:
|
|
217
|
-
- uses: actions/checkout@v7
|
|
218
|
-
- uses: dtolnay/rust-toolchain@stable
|
|
236
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
237
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
219
238
|
- run: cargo install cargo-semver-checks --locked
|
|
220
239
|
- run: cargo semver-checks check-release
|
|
221
240
|
|
|
@@ -226,9 +245,9 @@ jobs:
|
|
|
226
245
|
name: examples & benches
|
|
227
246
|
runs-on: ubuntu-latest
|
|
228
247
|
steps:
|
|
229
|
-
- uses: actions/checkout@v7
|
|
230
|
-
- uses: dtolnay/rust-toolchain@stable
|
|
231
|
-
- uses: Swatinem/rust-cache@v2
|
|
248
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
249
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
250
|
+
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
|
|
232
251
|
- name: run every example
|
|
233
252
|
run: |
|
|
234
253
|
for ex in spine explore trust workflow backends insight portability operations specialized automl; do
|
|
@@ -243,8 +262,8 @@ jobs:
|
|
|
243
262
|
name: package (publish dry-run)
|
|
244
263
|
runs-on: ubuntu-latest
|
|
245
264
|
steps:
|
|
246
|
-
- uses: actions/checkout@v7
|
|
247
|
-
- uses: dtolnay/rust-toolchain@stable
|
|
265
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
266
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
248
267
|
# No rust-cache here: `cargo publish` builds a copy under target/package,
|
|
249
268
|
# which the cache action's post-step chokes on.
|
|
250
269
|
# Prove the crate packages and builds from its packaged form as it would on
|
|
@@ -252,19 +271,97 @@ jobs:
|
|
|
252
271
|
- run: cargo publish --dry-run --locked
|
|
253
272
|
|
|
254
273
|
python:
|
|
255
|
-
name: python wheel
|
|
274
|
+
name: python wheel (build & test)
|
|
256
275
|
runs-on: ubuntu-latest
|
|
257
276
|
steps:
|
|
258
|
-
- uses: actions/checkout@v7
|
|
259
|
-
- uses: dtolnay/rust-toolchain@stable
|
|
260
|
-
|
|
277
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
278
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
279
|
+
with:
|
|
280
|
+
components: llvm-tools-preview
|
|
281
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
|
261
282
|
with:
|
|
262
|
-
|
|
263
|
-
|
|
283
|
+
# pytest 9 contains the tmpdir security fix and requires Python 3.10+.
|
|
284
|
+
# The separate ABI matrix still smoke-tests the wheel on Python 3.9.
|
|
285
|
+
python-version: "3.10"
|
|
286
|
+
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
|
|
287
|
+
- uses: taiki-e/install-action@d630c3ba8c9bb0648bcefda869fb0d9b98c611d9 # cargo-llvm-cov
|
|
264
288
|
# The `python` feature can't be linked by `cargo test` (pyo3's
|
|
265
289
|
# extension-module defers libpython), so it is built the way it ships:
|
|
266
290
|
# as an abi3 wheel via maturin, then smoke-imported.
|
|
267
|
-
- run: pip install
|
|
268
|
-
-
|
|
269
|
-
|
|
270
|
-
|
|
291
|
+
- run: python -m pip install --requirement requirements/ci-python.txt
|
|
292
|
+
- name: build instrumented wheel and measure Python binding coverage
|
|
293
|
+
shell: bash
|
|
294
|
+
run: |
|
|
295
|
+
cargo llvm-cov clean --workspace
|
|
296
|
+
source <(cargo llvm-cov show-env --export-prefix)
|
|
297
|
+
maturin build --locked --out wheel
|
|
298
|
+
python -m pip install --force-reinstall wheel/*.whl
|
|
299
|
+
python -m pytest -q tests/python
|
|
300
|
+
cargo llvm-cov report --lcov --output-path python-bindings.lcov
|
|
301
|
+
python scripts/check-lcov-coverage.py python-bindings.lcov \
|
|
302
|
+
--minimum 45 --file src/python.rs --file src/python_data.rs
|
|
303
|
+
- run: python -m mypy --strict tests/python/typing_contract.py
|
|
304
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
305
|
+
with:
|
|
306
|
+
name: python-binding-coverage
|
|
307
|
+
path: python-bindings.lcov
|
|
308
|
+
if-no-files-found: error
|
|
309
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
310
|
+
with:
|
|
311
|
+
name: python-abi3-wheel
|
|
312
|
+
path: wheel/*.whl
|
|
313
|
+
if-no-files-found: error
|
|
314
|
+
|
|
315
|
+
python-compat:
|
|
316
|
+
name: python wheel (${{ matrix.python }})
|
|
317
|
+
needs: python
|
|
318
|
+
runs-on: ubuntu-latest
|
|
319
|
+
strategy:
|
|
320
|
+
fail-fast: false
|
|
321
|
+
matrix:
|
|
322
|
+
python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
323
|
+
steps:
|
|
324
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
325
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
|
326
|
+
with:
|
|
327
|
+
python-version: ${{ matrix.python }}
|
|
328
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
|
|
329
|
+
with:
|
|
330
|
+
name: python-abi3-wheel
|
|
331
|
+
path: wheel
|
|
332
|
+
- run: python -m pip install --no-deps wheel/*.whl
|
|
333
|
+
- run: python tests/python/compat_smoke.py
|
|
334
|
+
|
|
335
|
+
ci-success:
|
|
336
|
+
name: CI success
|
|
337
|
+
if: always()
|
|
338
|
+
needs:
|
|
339
|
+
- consistency
|
|
340
|
+
- fmt
|
|
341
|
+
- clippy
|
|
342
|
+
- docs
|
|
343
|
+
- test
|
|
344
|
+
- os
|
|
345
|
+
- msrv
|
|
346
|
+
- supply-chain
|
|
347
|
+
- dependency-policy
|
|
348
|
+
- coverage
|
|
349
|
+
- branch-coverage
|
|
350
|
+
- semver
|
|
351
|
+
- examples
|
|
352
|
+
- package
|
|
353
|
+
- python
|
|
354
|
+
- python-compat
|
|
355
|
+
runs-on: ubuntu-latest
|
|
356
|
+
steps:
|
|
357
|
+
- name: require every CI job to succeed
|
|
358
|
+
env:
|
|
359
|
+
RESULTS: ${{ toJSON(needs) }}
|
|
360
|
+
shell: bash
|
|
361
|
+
run: |
|
|
362
|
+
failures="$(jq -r 'to_entries[] | select(.value.result != "success") | "\(.key): \(.value.result)"' <<< "$RESULTS")"
|
|
363
|
+
if [ -n "$failures" ]; then
|
|
364
|
+
echo "::error::one or more CI jobs did not succeed"
|
|
365
|
+
printf '%s\n' "$failures"
|
|
366
|
+
exit 1
|
|
367
|
+
fi
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "17 4 * * 1"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
security-events: write
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: codeql-${{ github.ref }}
|
|
18
|
+
cancel-in-progress: true
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
analyze:
|
|
22
|
+
name: analyze (${{ matrix.language }})
|
|
23
|
+
runs-on: ubuntu-24.04
|
|
24
|
+
strategy:
|
|
25
|
+
fail-fast: false
|
|
26
|
+
matrix:
|
|
27
|
+
include:
|
|
28
|
+
- language: rust
|
|
29
|
+
build-mode: none
|
|
30
|
+
- language: python
|
|
31
|
+
build-mode: none
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
34
|
+
- name: initialize CodeQL
|
|
35
|
+
uses: github/codeql-action/init@4c0873ef8656cb3c50b3f42fb63bc1ade0cfa827 # v4
|
|
36
|
+
with:
|
|
37
|
+
languages: ${{ matrix.language }}
|
|
38
|
+
build-mode: ${{ matrix.build-mode }}
|
|
39
|
+
- name: analyze
|
|
40
|
+
uses: github/codeql-action/analyze@4c0873ef8656cb3c50b3f42fb63bc1ade0cfa827 # v4
|