Skip to content

Commit adfc551

Browse files
authored
Fix build-mdbook CI failure (#5574)
## Description `build-mdbook` was failing on multiple PRs with ``` Run cargo install --locked --debug --path ./forc error: binary `forc` already exists in destination Add --force to overwrite ``` https://github.com/FuelLabs/sway/actions/runs/7819113568/attempts/1?pr=5569 https://github.com/FuelLabs/sway/actions/runs/7816891674/job/21336246772?pr=5565 `cargo install` keeps track of which binaries it has installed in ~/.cargo/crates.toml and ~/.cargo.crates2.json. By using the entire cached `cargo` directory, cargo is able to tell that it has previously installed the binaries and install correctly. ## Checklist - [ ] I have linked to any relevant issues. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [ ] I have requested a review from the relevant team or maintainers.
1 parent 1123118 commit adfc551

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

.github/workflows/ci.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,7 @@ jobs:
152152
- uses: buildjet/cache@v3
153153
with:
154154
path: |
155-
~/.cargo/bin/
156-
~/.cargo/registry/index/
157-
~/.cargo/registry/cache/
158-
~/.cargo/git/db/
155+
~/.cargo/
159156
target/
160157
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
161158
- name: Install Forc
@@ -376,10 +373,7 @@ jobs:
376373
- uses: buildjet/cache@v3
377374
with:
378375
path: |
379-
~/.cargo/bin/
380-
~/.cargo/registry/index/
381-
~/.cargo/registry/cache/
382-
~/.cargo/git/db/
376+
~/.cargo/
383377
target/
384378
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
385379
- name: Build All Tests

0 commit comments

Comments
 (0)