Skip to content

Commit 005be01

Browse files
authored
Merge pull request #1420 from rust-ndarray/ci
Update CI settings: Use PR check instead of Merge Queue, and check rustdoc
2 parents f7e4750 + f07b2fe commit 005be01

File tree

9 files changed

+27
-7
lines changed

9 files changed

+27
-7
lines changed

.github/workflows/ci.yaml

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
on:
22
pull_request:
33
merge_group:
4+
push:
5+
branches:
6+
- master
47

58
name: Continuous integration
69

@@ -86,7 +89,7 @@ jobs:
8689
- run: ./scripts/all-tests.sh "$FEATURES" ${{ matrix.rust }}
8790

8891
cross_test:
89-
if: ${{ github.event_name == 'merge_group' }}
92+
#if: ${{ github.event_name == 'merge_group' }}
9093
runs-on: ubuntu-latest
9194
strategy:
9295
matrix:
@@ -110,7 +113,7 @@ jobs:
110113
- run: ./scripts/cross-tests.sh "docs" ${{ matrix.rust }} ${{ matrix.target }}
111114

112115
cargo-careful:
113-
if: ${{ github.event_name == 'merge_group' }}
116+
#if: ${{ github.event_name == 'merge_group' }}
114117
runs-on: ubuntu-latest
115118
name: cargo-careful
116119
steps:
@@ -124,19 +127,21 @@ jobs:
124127
- run: cargo careful test -Zcareful-sanitizer --features="$FEATURES"
125128

126129
docs:
127-
if: ${{ github.event_name == 'merge_group' }}
130+
#if: ${{ github.event_name == 'merge_group' }}
128131
runs-on: ubuntu-latest
129132
strategy:
130133
matrix:
131134
rust:
132135
- stable
133136
name: docs/${{ matrix.rust }}
137+
env:
138+
RUSTDOCFLAGS: "-Dwarnings"
134139
steps:
135140
- uses: actions/checkout@v4
136141
- uses: dtolnay/rust-toolchain@master
137142
with:
138143
toolchain: ${{ matrix.rust }}
139-
- run: cargo doc
144+
- run: cargo doc --no-deps --all-features
140145

141146
conclusion:
142147
needs:

crates/blas-tests/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ edition = "2018"
77

88
[lib]
99
test = false
10+
doc = false
11+
doctest = false
1012

1113
[dependencies]
1214
ndarray = { workspace = true, features = ["approx"] }

crates/numeric-tests/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ edition = "2018"
77

88
[lib]
99
test = false
10+
doc = false
11+
doctest = false
1012

1113
[dependencies]
1214
ndarray = { workspace = true, features = ["approx"] }

crates/serialization-tests/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ edition = "2018"
77

88
[lib]
99
test = false
10+
doc = false
11+
doctest = false
1012

1113
[dependencies]
1214
ndarray = { workspace = true, features = ["serde"] }

src/dimension/broadcast.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ pub trait DimMax<Other: Dimension>
4141
}
4242

4343
/// Dimensions of the same type remain unchanged when co_broadcast.
44-
/// So you can directly use D as the resulting type.
45-
/// (Instead of <D as DimMax<D>>::BroadcastOutput)
44+
/// So you can directly use `D` as the resulting type.
45+
/// (Instead of `<D as DimMax<D>>::BroadcastOutput`)
4646
impl<D: Dimension> DimMax<D> for D
4747
{
4848
type Output = D;

src/doc/crate_feature_flags.rs

+3
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@
3030
//! - Enable the ``threading`` feature in the matrixmultiply package
3131
//!
3232
//! [`parallel`]: crate::parallel
33+
34+
#[cfg(doc)]
35+
use crate::parallel::par_azip;

src/doc/ndarray_for_numpy_users/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@
654654
//! convert `f32` array to `i32` array with ["saturating" conversion][sat_conv]; care needed because it can be a lossy conversion or result in non-finite values! See [the reference for information][as_typecast].
655655
//!
656656
//! </td></tr>
657-
//! <table>
657+
//! </table>
658658
//!
659659
//! [as_conv]: https://doc.rust-lang.org/rust-by-example/types/cast.html
660660
//! [sat_conv]: https://blog.rust-lang.org/2020/07/16/Rust-1.45.0.html#fixing-unsoundness-in-casts
@@ -677,6 +677,8 @@
677677
//! [.column()]: ArrayBase::column
678678
//! [.column_mut()]: ArrayBase::column_mut
679679
//! [concatenate()]: crate::concatenate()
680+
//! [concatenate!]: crate::concatenate!
681+
//! [stack!]: crate::stack!
680682
//! [::default()]: ArrayBase::default
681683
//! [.diag()]: ArrayBase::diag
682684
//! [.dim()]: ArrayBase::dim

src/doc/ndarray_for_numpy_users/rk_step.rs

+1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
//! ```
170170
//!
171171
//! [`.scaled_add()`]: crate::ArrayBase::scaled_add
172+
//! [`azip!()`]: crate::azip!
172173
//!
173174
//! ### SciPy license
174175
//!

src/slice.rs

+3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
// except according to those terms.
88
use crate::dimension::slices_intersect;
99
use crate::error::{ErrorKind, ShapeError};
10+
#[cfg(doc)]
11+
use crate::s;
1012
use crate::{ArrayViewMut, DimAdd, Dimension, Ix0, Ix1, Ix2, Ix3, Ix4, Ix5, Ix6, IxDyn};
13+
1114
#[cfg(not(feature = "std"))]
1215
use alloc::vec::Vec;
1316
use std::convert::TryFrom;

0 commit comments

Comments
 (0)