Skip to content

Commit 12a24a6

Browse files
committed
[CI] Ensure toolchain set before caching applied
1 parent 1c8f8ed commit 12a24a6

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/test_and_deploy.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,21 @@ jobs:
4040
with:
4141
python-version: ${{ matrix.python-version }}
4242

43-
# Configure Rust for 32-bit builds
44-
# NOTE: install_loader/rust-toolchain.toml now used to set toolchain and target architecture
43+
# To get around setup-rust-toolchain@v1 not detecting install_loader/rust-toolchain.toml
44+
# since it is in a subfolder, copy it out to the root directory
45+
- name: Copy rust-toolchain.toml for actions-rust-lang/setup-rust-toolchain
46+
run: cp ./install_loader/rust-toolchain.toml .
4547

46-
# Caching for Rust
47-
- name: Cache rust builds
48-
uses: Swatinem/rust-cache@v2
49-
with:
50-
workspaces: install_loader
48+
# Configure Rust for 32-bit builds
49+
#
50+
# NOTE: Refer to install_loader/rust-toolchain.toml for the installed toolchain and target architecture
51+
# Please use fixed versions of rust so that installs build consistently
52+
# (So they don't randomly trigger Windows Defender)
53+
#
54+
# CACHE NOTE: This action also provides Github Actions caching of rust builds (uses Swatinem/rust-cache internally)
55+
- name: Install and configure rust for 32-bit builds
56+
uses: actions-rust-lang/setup-rust-toolchain@v1
57+
working-directory: ./install_loader
5158

5259
# Run Python Deploy Script
5360
# This also installs and scans .exe with virustotal on Windows (to try prevent .exe virus false positives)

0 commit comments

Comments
 (0)