File tree 3 files changed +36
-0
lines changed
3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 88
88
run : sudo apt-get install libopenblas-dev gfortran
89
89
- run : ./scripts/all-tests.sh "$FEATURES" ${{ matrix.rust }}
90
90
91
+ miri :
92
+ runs-on : ubuntu-latest
93
+ name : miri
94
+ steps :
95
+ - uses : actions/checkout@v4
96
+ - uses : dtolnay/rust-toochain@nightly
97
+ with :
98
+ components : miri
99
+ - uses : Swatinem/rust-cache@v2
100
+ - name : Install openblas
101
+ run : sudo apt-get install libopenblas-dev gfortran
102
+ - run : ./scripts/miri-tests.sh
103
+
91
104
cross_test :
92
105
# if: ${{ github.event_name == 'merge_group' }}
93
106
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ fn oversampling_without_replacement_should_panic()
57
57
}
58
58
59
59
quickcheck ! {
60
+ #[ cfg_attr( miri, ignore) ] // Takes an insufferably long time
60
61
fn oversampling_with_replacement_is_fine( m: u8 , n: u8 ) -> TestResult {
61
62
let ( m, n) = ( m as usize , n as usize ) ;
62
63
let a = Array :: random( ( m, n) , Uniform :: new( 0. , 2. ) ) ;
@@ -84,6 +85,7 @@ quickcheck! {
84
85
}
85
86
}
86
87
88
+ #[ cfg_attr( miri, ignore) ]
87
89
#[ cfg( feature = "quickcheck" ) ]
88
90
quickcheck ! {
89
91
fn sampling_behaves_as_expected( m: u8 , n: u8 , strategy: SamplingStrategy ) -> TestResult {
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -x
4
+ set -e
5
+
6
+ # We rely on layout-dependent casts, which should be covered with #[repr(transparent)]
7
+ # This should catch if we missed that
8
+ RUSTFLAGS=" -Zrandomize-layout"
9
+
10
+ # General tests
11
+ cargo miri test -v --no-default-features
12
+ cargo miri test -v -p ndarray -p ndarray-rand --lib --tests
13
+
14
+ # BLAS tests
15
+ cargo miri test -p ndarray --lib -v --features blas
16
+ cargo miri test -p blas-mock-tests -v
17
+ cargo miri test -p blas-tests -v --features blas-tests/openblas-system
18
+ cargo miri test -p numeric-tests -v --features numeric-tests/test_blas
19
+
20
+ # Examples
21
+ cargo miri test --examples
You can’t perform that action at this time.
0 commit comments