@@ -73,7 +73,7 @@ inputs:
7373 vdev :
7474 required : false
7575 default : true
76- description : " Install vdev CLI tool via cargo binstall (uses VDEV_VERSION pinned in prepare.sh )."
76+ description : " Install vdev CLI tool via cargo binstall (version from vdev/Cargo.toml )."
7777
7878 # prepare.sh - npm
7979 markdownlint-cli2 :
@@ -134,8 +134,11 @@ runs:
134134 run : echo "::add-matcher::.github/matchers/rust.json"
135135 shell : bash
136136
137+ # Two steps so that the actions/cache post-step (which saves the cache) runs
138+ # directly from this composite, not a nested one — nested composites break
139+ # post-step input resolution (actions/runner#3514, #2030).
137140 - name : Cache Cargo registry, index, and git DB
138- if : ${{ inputs.cargo-cache == 'true' || env.NEEDS_RUST == 'true' }}
141+ if : ${{ ( inputs.cargo-cache == 'true' || env.NEEDS_RUST == 'true') && github.ref == 'refs/heads/master ' }}
139142 uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
140143 with :
141144 path : |
@@ -146,6 +149,18 @@ runs:
146149 restore-keys : |
147150 ${{ runner.os }}-cargo-
148151
152+ - name : Restore Cargo registry, index, and git DB
153+ if : ${{ (inputs.cargo-cache == 'true' || env.NEEDS_RUST == 'true') && github.ref != 'refs/heads/master' }}
154+ uses : actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
155+ with :
156+ path : |
157+ ~/.cargo/registry/index/
158+ ~/.cargo/registry/cache/
159+ ~/.cargo/git/db/
160+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
161+ restore-keys : |
162+ ${{ runner.os }}-cargo-
163+
149164 - name : Install mold
150165 if : ${{ runner.os == 'Linux' && env.DISABLE_MOLD != 'true' && inputs.mold == 'true' }}
151166 shell : bash
@@ -222,7 +237,7 @@ runs:
222237 - name : Install libsasl2
223238 if : ${{ inputs.libsasl2 == 'true' }}
224239 shell : bash
225- run : sudo apt-get update && sudo apt-get install -y libsasl2-dev
240+ run : timeout 30m sudo apt-get update && timeout 30m sudo apt-get install -y libsasl2-dev
226241
227242 - name : Cache cargo binaries
228243 id : cache-cargo-binaries
@@ -239,7 +254,7 @@ runs:
239254 ~/.cargo/bin/dd-rust-license-tool
240255 ~/.cargo/bin/wasm-pack
241256 ~/.cargo/bin/vdev
242- key : ${{ runner.os }}-cargo-binaries-${{ hashFiles('scripts/environment/*.sh') }}
257+ key : ${{ runner.os }}-cargo-binaries-${{ hashFiles('scripts/environment/*.sh', 'vdev/Cargo.toml' ) }}
243258 restore-keys : |
244259 ${{ runner.os }}-cargo-binaries-
245260
0 commit comments