File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,6 +158,13 @@ jobs:
158158 restore-keys : |
159159 ${{ runner.os }}-cargo-${{ runner.arch }}-
160160 ${{ runner.os }}-cargo-
161+ - name : Restore tracked cargo config (cache may carry a pre-migration copy)
162+ run : |
163+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
164+ if git -C "$GITHUB_WORKSPACE" ls-files --error-unmatch app/rust/.cargo/config.toml >/dev/null 2>&1; then
165+ git -C "$GITHUB_WORKSPACE" checkout -- app/rust/.cargo/config.toml
166+ echo "Restored app/rust/.cargo/config.toml from checkout (a stale Rust cache can overwrite it with a pre-migration copy)."
167+ fi
161168 - name : clippy
162169 run : |
163170 cd ./app/rust
@@ -182,6 +189,13 @@ jobs:
182189 restore-keys : |
183190 ${{ runner.os }}-cargo-${{ runner.arch }}-
184191 ${{ runner.os }}-cargo-
192+ - name : Restore tracked cargo config (cache may carry a pre-migration copy)
193+ run : |
194+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
195+ if git -C "$GITHUB_WORKSPACE" ls-files --error-unmatch app/rust/.cargo/config.toml >/dev/null 2>&1; then
196+ git -C "$GITHUB_WORKSPACE" checkout -- app/rust/.cargo/config.toml
197+ echo "Restored app/rust/.cargo/config.toml from checkout (a stale Rust cache can overwrite it with a pre-migration copy)."
198+ fi
185199 - name : run rust tests
186200 run : |
187201 cd ./app/rust
You can’t perform that action at this time.
0 commit comments