@@ -22,13 +22,12 @@ jobs:
2222 if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
2323 strategy :
2424 matrix :
25+ workspace : ['Cargo.toml', 'fuzz/Cargo.toml']
2526 os : [ubuntu-latest, macOS-latest, windows-latest]
2627 rustalias : [stable, nightly, msrv]
2728 feature_flag :
2829 - " --all-features"
2930 - " --no-default-features"
30- - " --no-default-features --features deflate-flate2-zlib-rs"
31- - " --no-default-features --features deflate-zopfli"
3231 - " "
3332 include :
3433 - rustalias : stable
@@ -37,24 +36,34 @@ jobs:
3736 rust : ' 1.83'
3837 - rustalias : nightly
3938 rust : nightly
39+ # Break out a separate test shard for specific dependencies on their own.
40+ - feature_flag : " --no-default-features --features deflate-flate2-zlib-rs"
41+ workspace : ' Cargo.toml'
42+ - feature_flag : " --no-default-features --features deflate-zopfli"
43+ workspace : ' Cargo.toml'
4044 name : ' Build and test ${{ matrix.feature_flag }}: ${{ matrix.os }}, ${{ matrix.rustalias }}'
4145 runs-on : ${{ matrix.os }}
4246 steps :
4347 - uses : actions/checkout@v5
4448 - run : rustup toolchain add ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
4549
46- - run : cargo check --all ${{ matrix.feature_flag }} --bins --examples
47- - run : cargo test --all ${{ matrix.feature_flag }}
50+ - run : cargo check --manifest-path ${{ github.workspace }}/${{ matrix.workspace }} -- all ${{ matrix.feature_flag }} --bins --examples
51+ - run : cargo test --manifest-path ${{ github.workspace }}/${{ matrix.workspace }} -- all ${{ matrix.feature_flag }}
4852 miri :
4953 if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
5054 strategy :
5155 matrix :
56+ workspace : ['Cargo.toml', 'fuzz/Cargo.toml']
5257 feature_flag :
5358 - " --all-features"
5459 - " --no-default-features"
55- - " --no-default-features --features deflate-flate2-zlib-rs"
56- - " --no-default-features --features deflate-zopfli"
5760 - " "
61+ include :
62+ # Break out a separate test shard for specific dependencies on their own.
63+ - feature_flag : " --no-default-features --features deflate-flate2-zlib-rs"
64+ workspace : ' Cargo.toml'
65+ - feature_flag : " --no-default-features --features deflate-zopfli"
66+ workspace : ' Cargo.toml'
5867 name : ' Miri ${{ matrix.feature_flag }}'
5968 runs-on : ubuntu-latest
6069 steps :
@@ -64,18 +73,21 @@ jobs:
6473 - run : rustup toolchain add --force-non-host stable-s390x-unknown-linux-gnu
6574 - run : rustup target add s390x-unknown-linux-gnu --toolchain stable-s390x-unknown-linux-gnu
6675 - run : rustup component add --toolchain nightly-x86_64-unknown-linux-gnu miri
67- - run : cargo +nightly miri test --target s390x-unknown-linux-gnu --all ${{ matrix.feature_flag }} --bins --examples
76+ - run : cargo +nightly miri test --manifest-path ${{ github.workspace }}/${{ matrix.workspace }} -- target s390x-unknown-linux-gnu --all ${{ matrix.feature_flag }} --bins --examples
6877 cargo_semver :
6978 if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
7079 strategy :
7180 matrix :
81+ # Only do semver checks on the released library.
82+ workspace : ['Cargo.toml']
7283 feature_group : ["all-features", "default-features", "only-explicit-features"]
7384 name : ' Semver checks: ${{ matrix.feature_group }}'
7485 runs-on : ubuntu-latest
7586 steps :
7687 - uses : actions/checkout@v5
7788 - uses : obi1kenobi/cargo-semver-checks-action@v2
7889 with :
90+ manifest-path : ${{ github.workspace }}/${{ matrix.workspace }}
7991 feature-group : ${{ matrix.feature_group }}
8092 cargo_fmt :
8193 if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
@@ -86,38 +98,41 @@ jobs:
8698 - run : rustup toolchain add nightly && rustup default nightly && rustup component add rustfmt
8799 - name : fmt
88100 run : cargo fmt --all -- --check
89- - name : fmt fuzz_read
90- run : cargo fmt --manifest-path fuzz_read/Cargo.toml -- --check
91- - name : fmt fuzz_write
92- run : cargo fmt --manifest-path fuzz_write/Cargo.toml -- --check
101+ - name : fmt fuzz
102+ run : cargo fmt --all --manifest-path ${{ github.workspace }}/fuzz/Cargo.toml -- --check
93103
94104 check_minimal_versions :
95105 if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
106+ strategy :
107+ matrix :
108+ # Only check minimal versions for the released library.
109+ workspace : ['Cargo.toml']
96110 runs-on : ubuntu-latest
97111
98112 steps :
99113 - uses : actions/checkout@v5
100114 - run : rustup toolchain add nightly && rustup default nightly
101115
102116 - name : resolve minimal versions
103- run : cargo -Z minimal-versions update
117+ run : cargo -Z minimal-versions update --manifest-path ${{ github.workspace }}/${{ matrix.workspace }}
104118 - name : check
105- run : cargo check --all-features
119+ run : cargo check --all-features --manifest-path ${{ github.workspace }}/${{ matrix.workspace }}
106120 - name : test
107- run : cargo test --all-features
121+ run : cargo test --all-features --manifest-path ${{ github.workspace }}/${{ matrix.workspace }}
108122
109123 style_and_docs :
110124 if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
111125 strategy :
112126 matrix :
127+ workspace : ['Cargo.toml', 'fuzz/Cargo.toml']
113128 feature_flag : ["--all-features", "--no-default-features", ""]
114129 runs-on : ubuntu-latest
115130 steps :
116131 - uses : actions/checkout@v5
117132 - run : rustup toolchain add nightly && rustup default nightly && rustup component add clippy
118133
119- - run : cargo clippy --all-targets ${{ matrix.feature_flag }} -- -D warnings
120- - run : cargo doc --no-deps ${{ matrix.feature_flag }}
134+ - run : cargo clippy --workspace ${{ matrix.feature_flag }} --manifest-path ${{ github.workspace }}/${{ matrix.workspace }} -- -D warnings
135+ - run : cargo doc --no-deps --workspace ${{ matrix.feature_flag }} --manifest-path ${{ github.workspace }}/${{ matrix.workspace }}
121136
122137 fuzz_read :
123138 runs-on : ubuntu-latest
@@ -136,16 +151,16 @@ jobs:
136151 - name : cargo afl system-config
137152 run : cargo afl system-config
138153 - name : clippy
139- run : cargo afl clippy --all-features -- manifest-path ${{ github.workspace }}/fuzz_read /Cargo.toml -- -D warnings
154+ run : cargo afl clippy --all-features -p fuzz_read -- manifest-path ${{ github.workspace }}/fuzz /Cargo.toml -- -D warnings
140155 - name : compile fuzz
141- run : cargo afl build --all-features -- manifest-path ${{ github.workspace }}/fuzz_read /Cargo.toml
156+ run : cargo afl build --all-features -p fuzz_read -- manifest-path ${{ github.workspace }}/fuzz /Cargo.toml
142157 - name : run fuzz
143158 timeout-minutes : 130
144- run : cargo afl fuzz -i ${{ github.workspace }}/fuzz_read/ in -o out -V 7200 -- ${{ github.workspace }}/fuzz_read /target/debug/fuzz_read
159+ run : cargo afl fuzz -i ${{ github.workspace }}/fuzz/read/ in -o out -V 7200 -- ${{ github.workspace }}/fuzz /target/debug/fuzz_read
145160 - name : Minimize corpus
146- run : cargo afl cmin -i out/default/queue -o out_cmin -- ${{ github.workspace }}/fuzz_read /target/debug/fuzz_read
161+ run : cargo afl cmin -i out/default/queue -o out_cmin -- ${{ github.workspace }}/fuzz /target/debug/fuzz_read
147162 - name : Report coverage
148- run : cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_read /target/debug/fuzz_read
163+ run : cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz /target/debug/fuzz_read
149164 - run : sudo apt install rename
150165 if : always()
151166 - name : Rename files
@@ -188,14 +203,14 @@ jobs:
188203 - name : cargo afl system-config
189204 run : cargo afl system-config
190205 - name : clippy
191- run : cargo afl clippy --no-default-features -- manifest-path ${{ github.workspace }}/fuzz_read /Cargo.toml -- -D warnings
206+ run : cargo afl clippy --no-default-features -p fuzz_read -- manifest-path ${{ github.workspace }}/fuzz /Cargo.toml -- -D warnings
192207 - name : compile fuzz
193- run : cargo afl build -- manifest-path ${{ github.workspace }}/fuzz_read /Cargo.toml
208+ run : cargo afl build -p fuzz_read -- manifest-path ${{ github.workspace }}/fuzz /Cargo.toml
194209 - name : run fuzz
195210 timeout-minutes : 130
196- run : cargo afl fuzz -i ${{ github.workspace }}/fuzz_read/ in -o out -V 7200 -- ${{ github.workspace }}/fuzz_read /target/debug/fuzz_read
211+ run : cargo afl fuzz -i ${{ github.workspace }}/fuzz/read/ in -o out -V 7200 -- ${{ github.workspace }}/fuzz /target/debug/fuzz_read
197212 - name : Report coverage
198- run : cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_read /target/debug/fuzz_read
213+ run : cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz /target/debug/fuzz_read
199214 - run : sudo apt install rename
200215 if : always()
201216 - name : Rename files
@@ -233,16 +248,16 @@ jobs:
233248 - name : cargo afl system-config
234249 run : cargo afl system-config
235250 - name : clippy
236- run : cargo afl clippy --all-features -- manifest-path ${{ github.workspace }}/fuzz_write /Cargo.toml -- -D warnings
251+ run : cargo afl clippy --all-features -p fuzz_write -- manifest-path ${{ github.workspace }}/fuzz /Cargo.toml -- -D warnings
237252 - name : compile fuzz
238- run : cargo afl build --all-features -- manifest-path ${{ github.workspace }}/fuzz_write /Cargo.toml
253+ run : cargo afl build --all-features -p fuzz_write -- manifest-path ${{ github.workspace }}/fuzz /Cargo.toml
239254 - name : run fuzz
240255 timeout-minutes : 130
241- run : cargo afl fuzz -i ${{ github.workspace }}/fuzz_write/ in -o out -V 7200 -x ${{ github.workspace }}/fuzz_write/ fuzz.dict -- ${{ github.workspace }}/fuzz_write /target/debug/fuzz_write
256+ run : cargo afl fuzz -i ${{ github.workspace }}/fuzz/write/ in -o out -V 7200 -x ${{ github.workspace }}/fuzz/write/ fuzz.dict -- ${{ github.workspace }}/fuzz /target/debug/fuzz_write
242257 - name : Minimize corpus
243- run : cargo afl cmin -i out/default/queue -o out_cmin -- ${{ github.workspace }}/fuzz_write /target/debug/fuzz_write
258+ run : cargo afl cmin -i out/default/queue -o out_cmin -- ${{ github.workspace }}/fuzz /target/debug/fuzz_write
244259 - name : Report coverage
245- run : cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_write /target/debug/fuzz_write
260+ run : cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz /target/debug/fuzz_write
246261 - run : sudo apt install rename
247262 if : always()
248263 - name : Rename files
@@ -285,14 +300,14 @@ jobs:
285300 - name : cargo afl system-config
286301 run : cargo afl system-config
287302 - name : clippy
288- run : cargo afl clippy --no-default-features -- manifest-path ${{ github.workspace }}/fuzz_write /Cargo.toml -- -D warnings
303+ run : cargo afl clippy --no-default-features -p fuzz_write -- manifest-path ${{ github.workspace }}/fuzz /Cargo.toml -- -D warnings
289304 - name : compile fuzz
290- run : cargo afl build --all-features -- manifest-path ${{ github.workspace }}/fuzz_write /Cargo.toml
305+ run : cargo afl build --all-features -p fuzz_write -- manifest-path ${{ github.workspace }}/fuzz /Cargo.toml
291306 - name : run fuzz
292307 timeout-minutes : 130
293- run : cargo afl fuzz -i ${{ github.workspace }}/fuzz_write/ in -o out -V 7200 -x ${{ github.workspace }}/fuzz_write/ fuzz.dict -- ${{ github.workspace }}/fuzz_write /target/debug/fuzz_write
308+ run : cargo afl fuzz -i ${{ github.workspace }}/fuzz/write/ in -o out -V 7200 -x ${{ github.workspace }}/fuzz/write/ fuzz.dict -- ${{ github.workspace }}/fuzz /target/debug/fuzz_write
294309 - name : Report coverage
295- run : cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_write /target/debug/fuzz_write
310+ run : cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz /target/debug/fuzz_write
296311 - run : sudo apt install rename
297312 if : always()
298313 - name : Rename files
0 commit comments