Skip to content

Commit 362b6b7

Browse files
committed
book.yml: Set default toolchain globally
setup-rust-toolchain sets installed toolchain as default only for current directory. `mdbook test` creates a dir in /tmp and executes `rustdoc` there, leading to issues due to different toolchains being used. Until it is fixed in the action or in mdbook, we need to manually set stable toolchain as global default.
1 parent 729fedc commit 362b6b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/book.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ jobs:
3131
with:
3232
# We can't use cache here, or mdbook will complain about multiple candidates for dependency.
3333
cache: false
34+
# This is a workaround for https://github.com/actions-rust-lang/setup-rust-toolchain/issues/79
35+
# and https://github.com/rust-lang/mdBook/issues/2501
36+
# When either mdbook or setup-rust-toolchain fix the issue, we can remove this.
37+
- name: Set default toolchain globally
38+
run: rustup default stable
3439
- name: Install mdbook
3540
uses: taiki-e/install-action@v2
3641
with:

0 commit comments

Comments
 (0)