Fix more sccache problems on windows runners for external PRs (#48980)
Closes #ISSUE - [ ] Tests or screenshots needed? - [ ] Code Reviewed - [ ] Manual QA Release Notes: - N/A
This commit is contained in:
1 parent
2a1a6ec5ba
commit
d4e5afa6d9
4 files changed
+11
-8
No files matched your search
@@ -159,7 +159,7 @@ jobs:
|
||||
run: cargo nextest run --workspace --no-fail-fast
|
||||
shell: pwsh
|
||||
- name: steps::show_sccache_stats
|
||||
run: '& $env:RUSTC_WRAPPER --show-stats; exit 0'
|
||||
run: if ($env:RUSTC_WRAPPER) { & $env:RUSTC_WRAPPER --show-stats }; exit 0
|
||||
shell: pwsh
|
||||
- name: steps::cleanup_cargo_config
|
||||
if: always()
|
||||
@@ -278,7 +278,7 @@ jobs:
|
||||
run: ./script/clippy.ps1
|
||||
shell: pwsh
|
||||
- name: steps::show_sccache_stats
|
||||
run: '& $env:RUSTC_WRAPPER --show-stats; exit 0'
|
||||
run: if ($env:RUSTC_WRAPPER) { & $env:RUSTC_WRAPPER --show-stats }; exit 0
|
||||
shell: pwsh
|
||||
timeout-minutes: 60
|
||||
check_scripts:
|
||||
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
run: cargo nextest run --workspace --no-fail-fast
|
||||
shell: pwsh
|
||||
- name: steps::show_sccache_stats
|
||||
run: '& $env:RUSTC_WRAPPER --show-stats; exit 0'
|
||||
run: if ($env:RUSTC_WRAPPER) { & $env:RUSTC_WRAPPER --show-stats }; exit 0
|
||||
shell: pwsh
|
||||
- name: steps::cleanup_cargo_config
|
||||
if: always()
|
||||
@@ -110,7 +110,7 @@ jobs:
|
||||
run: ./script/clippy.ps1
|
||||
shell: pwsh
|
||||
- name: steps::show_sccache_stats
|
||||
run: '& $env:RUSTC_WRAPPER --show-stats; exit 0'
|
||||
run: if ($env:RUSTC_WRAPPER) { & $env:RUSTC_WRAPPER --show-stats }; exit 0
|
||||
shell: pwsh
|
||||
timeout-minutes: 60
|
||||
bundle_linux_aarch64:
|
||||
|
||||
@@ -176,7 +176,7 @@ jobs:
|
||||
run: ./script/clippy.ps1
|
||||
shell: pwsh
|
||||
- name: steps::show_sccache_stats
|
||||
run: '& $env:RUSTC_WRAPPER --show-stats; exit 0'
|
||||
run: if ($env:RUSTC_WRAPPER) { & $env:RUSTC_WRAPPER --show-stats }; exit 0
|
||||
shell: pwsh
|
||||
timeout-minutes: 60
|
||||
clippy_linux:
|
||||
@@ -303,7 +303,7 @@ jobs:
|
||||
run: cargo nextest run --workspace --no-fail-fast${{ needs.orchestrate.outputs.changed_packages && format(' -E "{0}"', needs.orchestrate.outputs.changed_packages) || '' }}
|
||||
shell: pwsh
|
||||
- name: steps::show_sccache_stats
|
||||
run: '& $env:RUSTC_WRAPPER --show-stats; exit 0'
|
||||
run: if ($env:RUSTC_WRAPPER) { & $env:RUSTC_WRAPPER --show-stats }; exit 0
|
||||
shell: pwsh
|
||||
- name: steps::cleanup_cargo_config
|
||||
if: always()
|
||||
|
||||
@@ -232,8 +232,11 @@ pub fn setup_sccache(platform: Platform) -> Step<Run> {
|
||||
pub fn show_sccache_stats(platform: Platform) -> Step<Run> {
|
||||
match platform {
|
||||
// Use $env:RUSTC_WRAPPER (absolute path) because GITHUB_PATH changes
|
||||
// don't take effect until the next step in PowerShell
|
||||
Platform::Windows => named::pwsh("& $env:RUSTC_WRAPPER --show-stats; exit 0"),
|
||||
// don't take effect until the next step in PowerShell.
|
||||
// Check if RUSTC_WRAPPER is set first (it won't be for fork PRs without secrets).
|
||||
Platform::Windows => {
|
||||
named::pwsh("if ($env:RUSTC_WRAPPER) { & $env:RUSTC_WRAPPER --show-stats }; exit 0")
|
||||
}
|
||||
Platform::Linux | Platform::Mac => named::bash("sccache --show-stats || true"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user