Skip to content

Commit 8a3a3e4

Browse files
committed
.github/workflows: Take care of both ./Cargo.lock and fuzz/Cargo.lock
1 parent bec2cb6 commit 8a3a3e4

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

.github/workflows/CICD.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,14 @@ jobs:
190190
unset CARGO_FEATURES_OPTION
191191
if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi
192192
outputs CARGO_FEATURES_OPTION
193-
- name: Confirm MinSRV compatible 'Cargo.lock'
193+
- name: Confirm MinSRV compatible '*/Cargo.lock'
194194
shell: bash
195195
run: |
196-
## Confirm MinSRV compatible 'Cargo.lock'
197-
# * 'Cargo.lock' is required to be in a format that `cargo` of MinSRV can interpret (eg, v1-format for MinSRV < v1.38)
198-
cargo fetch --locked --quiet || { echo "::error file=Cargo.lock::Incompatible (or out-of-date) 'Cargo.lock' file; update using \`cargo +${{ env.RUST_MIN_SRV }} update\`" ; exit 1 ; }
196+
## Confirm MinSRV compatible '*/Cargo.lock'
197+
# * '*/Cargo.lock' is required to be in a format that `cargo` of MinSRV can interpret (eg, v1-format for MinSRV < v1.38)
198+
for dir in "." "fuzz"; do
199+
( cd "$dir" && cargo fetch --locked --quiet ) || { echo "::error file=$dir/Cargo.lock::Incompatible (or out-of-date) '$dir/Cargo.lock' file; update using \`cd '$dir' && cargo +${{ env.RUST_MIN_SRV }} update\`" ; exit 1 ; }
200+
done
199201
- name: Install/setup prerequisites
200202
shell: bash
201203
run: |
@@ -246,7 +248,9 @@ jobs:
246248
run: |
247249
## `cargo update` testing
248250
# * convert any errors/warnings to GHA UI annotations; ref: <https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message>
249-
cargo fetch --locked --quiet || { echo "::error file=Cargo.lock::'Cargo.lock' file requires update (use \`cargo +${{ env.RUST_MIN_SRV }} update\`)" ; exit 1 ; }
251+
for dir in "." "fuzz"; do
252+
( cd "$dir" && cargo fetch --locked --quiet ) || { echo "::error file=$dir/Cargo.lock::'$dir/Cargo.lock' file requires update (use \`cd '$dir' && cargo +${{ env.RUST_MIN_SRV }} update\`)" ; exit 1 ; }
253+
done
250254
251255
build_makefile:
252256
name: Build/Makefile

.github/workflows/FixPR.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ jobs:
4343
- name: Ensure updated 'Cargo.lock'
4444
shell: bash
4545
run: |
46-
# Ensure updated 'Cargo.lock'
47-
# * 'Cargo.lock' is required to be in a format that `cargo` of MinSRV can interpret (eg, v1-format for MinSRV < v1.38)
48-
cargo fetch --locked --quiet || cargo +${{ steps.vars.outputs.RUST_MIN_SRV }} update
46+
# Ensure updated '*/Cargo.lock'
47+
# * '*/Cargo.lock' is required to be in a format that `cargo` of MinSRV can interpret (eg, v1-format for MinSRV < v1.38)
48+
for dir in "." "fuzz"; do
49+
( cd "$dir" && (cargo fetch --locked --quiet || cargo +${{ steps.vars.outputs.RUST_MIN_SRV }} update) )
50+
done
4951
- name: Info
5052
shell: bash
5153
run: |
@@ -71,8 +73,8 @@ jobs:
7173
with:
7274
new_branch: ${{ env.BRANCH_TARGET }}
7375
default_author: github_actions
74-
message: "maint ~ refresh 'Cargo.lock'"
75-
add: Cargo.lock
76+
message: "maint ~ refresh 'Cargo.lock' 'fuzz/Cargo.lock'"
77+
add: Cargo.lock fuzz/Cargo.lock
7678
env:
7779
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7880

0 commit comments

Comments
 (0)