File tree 4 files changed +33
-23
lines changed
4 files changed +33
-23
lines changed Original file line number Diff line number Diff line change 47
47
token : ${{ secrets.GITHUB_TOKEN }}
48
48
args : --all --all-targets --all-features --tests -- --verbose
49
49
50
- build :
50
+ tests :
51
+
52
+ strategy :
53
+ matrix :
54
+ conf :
55
+ - tests
56
+ - bench-resampler
57
+ - bench-resampler-sse
51
58
52
59
env :
53
60
SPEEX_DIR : speex-dir
@@ -62,18 +69,32 @@ jobs:
62
69
git clone https://github.com/xiph/speexdsp.git
63
70
cd speexdsp
64
71
./autogen.sh
65
- ./configure --prefix=$HOME/$SPEEX_DIR
72
+ CONF=${{ matrix.conf }}
73
+ if [ ${CONF} = "bench-resampler" ]
74
+ then
75
+ ./configure --disable-sse --prefix=$HOME/$SPEEX_DIR
76
+ else
77
+ ./configure --prefix=$HOME/$SPEEX_DIR
78
+ fi
66
79
make -j4 install
67
80
68
81
- name : Set environment variables
69
82
run : |
70
83
echo "::set-env name=PKG_CONFIG_PATH::$HOME/$SPEEX_DIR/lib/pkgconfig"
71
84
echo "::set-env name=LD_LIBRARY_PATH::$HOME/$SPEEX_DIR/lib"
72
85
86
+ - name : Run benchmark
87
+ if : matrix.conf != 'tests'
88
+ run : |
89
+ cargo bench -q --features sys -- resampler_c
90
+ cargo bench -q -- resampler_rust
91
+
73
92
- name : Run no-default-features tests
93
+ if : matrix.conf == 'tests'
74
94
run : |
75
95
cargo test --all --no-default-features
76
96
77
97
- name : Run all-features tests
98
+ if : matrix.conf == 'tests'
78
99
run : |
79
100
cargo test --all --all-features
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -68,5 +68,9 @@ pub fn criterion_benchmark(c: &mut Criterion) {
68
68
c. bench_function ( "resampler_c" , |b| b. iter ( || resample_c ( ) ) ) ;
69
69
}
70
70
71
- criterion_group ! ( benches, criterion_benchmark) ;
71
+ criterion_group ! {
72
+ name = benches;
73
+ config = Criterion :: default ( ) . sample_size( 10 ) ;
74
+ targets = criterion_benchmark
75
+ }
72
76
criterion_main ! ( benches) ;
Original file line number Diff line number Diff line change @@ -54,5 +54,9 @@ pub fn criterion_benchmark(c: &mut Criterion) {
54
54
c. bench_function ( "resampler_rust" , |b| b. iter ( || resample_rs ( ) ) ) ;
55
55
}
56
56
57
- criterion_group ! ( benches, criterion_benchmark) ;
57
+ criterion_group ! {
58
+ name = benches;
59
+ config = Criterion :: default ( ) . sample_size( 10 ) ;
60
+ targets = criterion_benchmark
61
+ }
58
62
criterion_main ! ( benches) ;
You can’t perform that action at this time.
0 commit comments