Skip to content

Commit 34aa458

Browse files
fix CI after workspace splitting
1 parent 2aa66d5 commit 34aa458

File tree

1 file changed

+37
-30
lines changed

1 file changed

+37
-30
lines changed

.github/workflows/ci.yaml

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ 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:
@@ -43,12 +44,13 @@ jobs:
4344
- uses: actions/checkout@v5
4445
- run: rustup toolchain add ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
4546

46-
- run: cargo check --all ${{ matrix.feature_flag }} --bins --examples
47-
- run: cargo test --all ${{ matrix.feature_flag }}
47+
- run: cargo check --manifest-path ${{ github.workspace }}/${{ matrix.workspace }} --all ${{ matrix.feature_flag }} --bins --examples
48+
- run: cargo test --manifest-path ${{ github.workspace }}/${{ matrix.workspace }} --all ${{ matrix.feature_flag }}
4849
miri:
4950
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
5051
strategy:
5152
matrix:
53+
workspace: ['Cargo.toml', 'fuzz/Cargo.toml']
5254
feature_flag:
5355
- "--all-features"
5456
- "--no-default-features"
@@ -64,18 +66,21 @@ jobs:
6466
- run: rustup toolchain add --force-non-host stable-s390x-unknown-linux-gnu
6567
- run: rustup target add s390x-unknown-linux-gnu --toolchain stable-s390x-unknown-linux-gnu
6668
- 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
69+
- run: cargo +nightly miri test --manifest-path ${{ github.workspace }}/${{ matrix.workspace }} --target s390x-unknown-linux-gnu --all ${{ matrix.feature_flag }} --bins --examples
6870
cargo_semver:
6971
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
7072
strategy:
7173
matrix:
74+
# Only do semver checks on the released library.
75+
workspace: ['Cargo.toml']
7276
feature_group: ["all-features", "default-features", "only-explicit-features"]
7377
name: 'Semver checks: ${{ matrix.feature_group }}'
7478
runs-on: ubuntu-latest
7579
steps:
7680
- uses: actions/checkout@v5
7781
- uses: obi1kenobi/cargo-semver-checks-action@v2
7882
with:
83+
manifest-path: ${{ github.workspace }}/${{ matrix.workspace }}
7984
feature-group: ${{ matrix.feature_group }}
8085
cargo_fmt:
8186
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
@@ -86,38 +91,40 @@ jobs:
8691
- run: rustup toolchain add nightly && rustup default nightly && rustup component add rustfmt
8792
- name: fmt
8893
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
94+
- name: fmt fuzz
95+
run: cargo fmt --manifest-path ${{ github.workspace }}/fuzz/Cargo.toml -- --check
9396

9497
check_minimal_versions:
9598
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
99+
matrix:
100+
# Only check minimal versions for the released library.
101+
workspace: ['Cargo.toml']
96102
runs-on: ubuntu-latest
97103

98104
steps:
99105
- uses: actions/checkout@v5
100106
- run: rustup toolchain add nightly && rustup default nightly
101107

102108
- name: resolve minimal versions
103-
run: cargo -Z minimal-versions update
109+
run: cargo -Z minimal-versions update --manifest-path ${{ github.workspace }}/${{ matrix.workspace }}
104110
- name: check
105-
run: cargo check --all-features
111+
run: cargo check --all-features --manifest-path ${{ github.workspace }}/${{ matrix.workspace }}
106112
- name: test
107-
run: cargo test --all-features
113+
run: cargo test --all-features --manifest-path ${{ github.workspace }}/${{ matrix.workspace }}
108114

109115
style_and_docs:
110116
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
111117
strategy:
112118
matrix:
119+
workspace: ['Cargo.toml', 'fuzz/Cargo.toml']
113120
feature_flag: ["--all-features", "--no-default-features", ""]
114121
runs-on: ubuntu-latest
115122
steps:
116123
- uses: actions/checkout@v5
117124
- run: rustup toolchain add nightly && rustup default nightly && rustup component add clippy
118125

119-
- run: cargo clippy --all-targets ${{ matrix.feature_flag }} -- -D warnings
120-
- run: cargo doc --no-deps ${{ matrix.feature_flag }}
126+
- run: cargo clippy --all-targets ${{ matrix.feature_flag }} --manifest-path ${{ github.workspace }}/${{ matrix.workspace }} -- -D warnings
127+
- run: cargo doc --no-deps ${{ matrix.feature_flag }} --manifest-path ${{ github.workspace }}/${{ matrix.workspace }}
121128

122129
fuzz_read:
123130
runs-on: ubuntu-latest
@@ -136,16 +143,16 @@ jobs:
136143
- name: cargo afl system-config
137144
run: cargo afl system-config
138145
- name: clippy
139-
run: cargo afl clippy --all-features --manifest-path ${{ github.workspace }}/fuzz_read/Cargo.toml -- -D warnings
146+
run: cargo afl clippy --all-features -p fuzz_read --manifest-path ${{ github.workspace }}/fuzz/Cargo.toml -- -D warnings
140147
- name: compile fuzz
141-
run: cargo afl build --all-features --manifest-path ${{ github.workspace }}/fuzz_read/Cargo.toml
148+
run: cargo afl build --all-features -p fuzz_read --manifest-path ${{ github.workspace }}/fuzz/Cargo.toml
142149
- name: run fuzz
143150
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
151+
run: cargo afl fuzz -i ${{ github.workspace }}/fuzz/read/in -o out -V 7200 -- ${{ github.workspace }}/fuzz/target/debug/fuzz_read
145152
- name: Minimize corpus
146-
run: cargo afl cmin -i out/default/queue -o out_cmin -- ${{ github.workspace }}/fuzz_read/target/debug/fuzz_read
153+
run: cargo afl cmin -i out/default/queue -o out_cmin -- ${{ github.workspace }}/fuzz/target/debug/fuzz_read
147154
- name: Report coverage
148-
run: cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_read/target/debug/fuzz_read
155+
run: cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz/target/debug/fuzz_read
149156
- run: sudo apt install rename
150157
if: always()
151158
- name: Rename files
@@ -188,14 +195,14 @@ jobs:
188195
- name: cargo afl system-config
189196
run: cargo afl system-config
190197
- name: clippy
191-
run: cargo afl clippy --no-default-features --manifest-path ${{ github.workspace }}/fuzz_read/Cargo.toml -- -D warnings
198+
run: cargo afl clippy --no-default-features -p fuzz_read --manifest-path ${{ github.workspace }}/fuzz/Cargo.toml -- -D warnings
192199
- name: compile fuzz
193-
run: cargo afl build --manifest-path ${{ github.workspace }}/fuzz_read/Cargo.toml
200+
run: cargo afl build -p fuzz_read --manifest-path ${{ github.workspace }}/fuzz/Cargo.toml
194201
- name: run fuzz
195202
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
203+
run: cargo afl fuzz -i ${{ github.workspace }}/fuzz/read/in -o out -V 7200 -- ${{ github.workspace }}/fuzz/target/debug/fuzz_read
197204
- name: Report coverage
198-
run: cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_read/target/debug/fuzz_read
205+
run: cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz/target/debug/fuzz_read
199206
- run: sudo apt install rename
200207
if: always()
201208
- name: Rename files
@@ -233,16 +240,16 @@ jobs:
233240
- name: cargo afl system-config
234241
run: cargo afl system-config
235242
- name: clippy
236-
run: cargo afl clippy --all-features --manifest-path ${{ github.workspace }}/fuzz_write/Cargo.toml -- -D warnings
243+
run: cargo afl clippy --all-features -p fuzz_write --manifest-path ${{ github.workspace }}/fuzz/Cargo.toml -- -D warnings
237244
- name: compile fuzz
238-
run: cargo afl build --all-features --manifest-path ${{ github.workspace }}/fuzz_write/Cargo.toml
245+
run: cargo afl build --all-features -p fuzz_write --manifest-path ${{ github.workspace }}/fuzz/Cargo.toml
239246
- name: run fuzz
240247
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
248+
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
242249
- name: Minimize corpus
243-
run: cargo afl cmin -i out/default/queue -o out_cmin -- ${{ github.workspace }}/fuzz_write/target/debug/fuzz_write
250+
run: cargo afl cmin -i out/default/queue -o out_cmin -- ${{ github.workspace }}/fuzz/target/debug/fuzz_write
244251
- name: Report coverage
245-
run: cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_write/target/debug/fuzz_write
252+
run: cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz/target/debug/fuzz_write
246253
- run: sudo apt install rename
247254
if: always()
248255
- name: Rename files
@@ -285,14 +292,14 @@ jobs:
285292
- name: cargo afl system-config
286293
run: cargo afl system-config
287294
- name: clippy
288-
run: cargo afl clippy --no-default-features --manifest-path ${{ github.workspace }}/fuzz_write/Cargo.toml -- -D warnings
295+
run: cargo afl clippy --no-default-features -p fuzz_write --manifest-path ${{ github.workspace }}/fuzz/Cargo.toml -- -D warnings
289296
- name: compile fuzz
290-
run: cargo afl build --all-features --manifest-path ${{ github.workspace }}/fuzz_write/Cargo.toml
297+
run: cargo afl build --all-features -p fuzz_write --manifest-path ${{ github.workspace }}/fuzz/Cargo.toml
291298
- name: run fuzz
292299
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
300+
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
294301
- name: Report coverage
295-
run: cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz_write/target/debug/fuzz_write
302+
run: cargo afl showmap -C -i out -o map -- ${{ github.workspace }}/fuzz/target/debug/fuzz_write
296303
- run: sudo apt install rename
297304
if: always()
298305
- name: Rename files

0 commit comments

Comments
 (0)