File tree 5 files changed +235
-168
lines changed
5 files changed +235
-168
lines changed Original file line number Diff line number Diff line change 36
36
- name : test
37
37
if : ${{ matrix.rust != '1.67.1' }}
38
38
run : cargo test -v && cargo doc -v
39
+ - name : bench
40
+ if : ${{ matrix.rust == 'nightly' }}
41
+ run : cargo bench -v --features _benchmarks
39
42
40
43
test_big_endian :
41
44
# github actions does not support big endian systems directly, but it does support QEMU.
@@ -67,23 +70,11 @@ jobs:
67
70
clippy :
68
71
runs-on : ubuntu-latest
69
72
steps :
70
- - name : install-dependencies
71
- run : sudo apt update && sudo apt install ninja-build meson nasm
72
73
- uses : actions/checkout@v4
73
74
- uses : dtolnay/rust-toolchain@stable
74
75
with :
75
76
components : clippy
76
77
- run : cargo clippy --all-features -- -D warnings
77
- env :
78
- SYSTEM_DEPS_DAV1D_BUILD_INTERNAL : always
79
-
80
- build_benchmarks :
81
- runs-on : ubuntu-latest
82
- steps :
83
- - uses : actions/checkout@v4
84
- - uses : dtolnay/rust-toolchain@nightly
85
- - name : build
86
- run : cargo build -v --benches
87
78
88
79
rustfmt :
89
80
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -21,3 +21,6 @@ paste = "1.0.14"
21
21
png = " 0.17.12"
22
22
rand = " 0.8.5"
23
23
webp = " 0.3.0"
24
+
25
+ [features ]
26
+ _benchmarks = []
Original file line number Diff line number Diff line change 4
4
#![ deny( missing_docs) ]
5
5
// Increase recursion limit for the `quick_error!` macro.
6
6
#![ recursion_limit = "256" ]
7
+ // Enable nightly benchmark functionality if "_benchmarks" feature is enabled.
8
+ #![ cfg_attr( all( test, feature = "_benchmarks" ) , feature( test) ) ]
9
+ #[ cfg( all( test, feature = "_benchmarks" ) ) ]
10
+ extern crate test;
7
11
8
12
pub use self :: decoder:: { DecodingError , LoopCount , WebPDecoder } ;
9
13
pub use self :: encoder:: { ColorType , EncodingError , WebPEncoder } ;
You can’t perform that action at this time.
0 commit comments