@@ -3,6 +3,8 @@ permissions:
33 contents : read
44
55env :
6+ # The preinstalled rustup proxies use these runner-owned locations.
7+ CARGO_HOME : /home/runner/.cargo
68 RUSTUP_HOME : /home/runner/.rustup
79
810on :
2628 timeout-minutes : 20
2729 env :
2830 CARGO_BUILD_JOBS : " 6"
29- RUSTFLAGS : " -C link-arg=-fuse-ld=lld"
3031 steps :
3132 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3233 with :
3637 with :
3738 toolchain : " 1.97"
3839 components : rustfmt,clippy
39- - name : Install lld linker
40- run : sudo apt-get update && sudo apt-get install -y --no-install-recommends lld
40+ - name : Select Rust toolchain binaries
41+ run : |
42+ toolchain_bin="$(dirname "$(rustup which rustc)")"
43+ echo "$toolchain_bin" >> "$GITHUB_PATH"
44+ echo "RUSTC=$toolchain_bin/rustc" >> "$GITHUB_ENV"
45+ echo "RUSTDOC=$toolchain_bin/rustdoc" >> "$GITHUB_ENV"
46+ echo "CARGO_BUILD_RUSTDOC=$toolchain_bin/rustdoc" >> "$GITHUB_ENV"
4147 - uses : Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
4248 with :
4349 # A failing lint run still primes the cache for the next one; the
4854 - run : |
4955 cargo clippy --locked -p preloop-gha-protocol -p preloop-gha-parser -p preloop-gha-expressions -p preloop-cache -p preloop-artifacts -p runner-watch -p preloop-conformance --all-targets -- -D warnings
5056 cargo clippy --locked -p preloop-runner -p preloop-runner-server -p preloop-runner-client -p preloop-dap --all-targets
51- # nextest does not run doctests; keep them on the lint job (seconds).
52- - run : cargo test --locked --workspace --doc
53- env :
54- RUSTFLAGS : " -A warnings -C link-arg=-fuse-ld=lld"
5557
5658 rust-test :
5759 # Sharded unit/integration suite. Each shard runs 1/4 of the tests (split
7072 CARGO_BUILD_JOBS : " 6"
7173 PROPTEST_CASES : " 8"
7274 RUST_TEST_THREADS : " 6"
73- RUSTFLAGS : " -C link-arg=-fuse-ld=lld"
7475 steps :
7576 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
7677 with :
@@ -108,8 +109,13 @@ jobs:
108109 with :
109110 toolchain : " 1.97"
110111 components : rustfmt,clippy
111- - name : Install lld linker
112- run : sudo apt-get update && sudo apt-get install -y --no-install-recommends lld
112+ - name : Select Rust toolchain binaries
113+ run : |
114+ toolchain_bin="$(dirname "$(rustup which rustc)")"
115+ echo "$toolchain_bin" >> "$GITHUB_PATH"
116+ echo "RUSTC=$toolchain_bin/rustc" >> "$GITHUB_ENV"
117+ echo "RUSTDOC=$toolchain_bin/rustdoc" >> "$GITHUB_ENV"
118+ echo "CARGO_BUILD_RUSTDOC=$toolchain_bin/rustdoc" >> "$GITHUB_ENV"
113119 - uses : Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
114120 with :
115121 # All four shards build the same workspace and differ only in which
@@ -150,7 +156,7 @@ jobs:
150156 echo "$HOME/.local/bin" >> "$GITHUB_PATH"
151157 - run : cargo nextest run --locked --workspace --partition hash:${{ matrix.shard }}/4
152158 env :
153- RUSTFLAGS : " -A warnings -C link-arg=-fuse-ld=lld "
159+ RUSTFLAGS : " -A warnings"
154160
155161 property-tests-fast :
156162 runs-on : [self-hosted, preloop-cpane]
@@ -163,6 +169,13 @@ jobs:
163169 - uses : dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
164170 with :
165171 toolchain : " 1.97"
172+ - name : Select Rust toolchain binaries
173+ run : |
174+ toolchain_bin="$(dirname "$(rustup which rustc)")"
175+ echo "$toolchain_bin" >> "$GITHUB_PATH"
176+ echo "RUSTC=$toolchain_bin/rustc" >> "$GITHUB_ENV"
177+ echo "RUSTDOC=$toolchain_bin/rustdoc" >> "$GITHUB_ENV"
178+ echo "CARGO_BUILD_RUSTDOC=$toolchain_bin/rustdoc" >> "$GITHUB_ENV"
166179 - uses : Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
167180 with :
168181 cache-on-failure : true
@@ -262,6 +275,13 @@ jobs:
262275 - uses : dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
263276 with :
264277 toolchain : " 1.97"
278+ - name : Select Rust toolchain binaries
279+ run : |
280+ toolchain_bin="$(dirname "$(rustup which rustc)")"
281+ echo "$toolchain_bin" >> "$GITHUB_PATH"
282+ echo "RUSTC=$toolchain_bin/rustc" >> "$GITHUB_ENV"
283+ echo "RUSTDOC=$toolchain_bin/rustdoc" >> "$GITHUB_ENV"
284+ echo "CARGO_BUILD_RUSTDOC=$toolchain_bin/rustdoc" >> "$GITHUB_ENV"
265285
266286 - uses : Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
267287 with :
0 commit comments