mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
ci: let Cargo handle oversized Windows rustc commands
This commit is contained in:
1 parent
60c4d856dd
commit
cbcd62c8d1
1 file changed
+6
-20
@@ -174,8 +174,8 @@ jobs:
|
||||
# Windows tests run as two legs in parallel: the unit tests and the integration tests. As one job
|
||||
# they took ~28 min on the Windows runner; the legs take ~13 and ~15. Splitting the integration
|
||||
# tests over a third runner (nextest --partition) saved ~2 min of wall time but cost ~7
|
||||
# runner-minutes and one more Windows slot per PR. They stay outside the shared gate for sccache,
|
||||
# which needs its own action step.
|
||||
# runner-minutes and one more Windows slot per PR. Moving these legs into the shared gate is
|
||||
# tracked by storytold/craft-common-actions#212.
|
||||
windows:
|
||||
needs: platforms
|
||||
if: needs.platforms.outputs.windows == 'true'
|
||||
@@ -187,6 +187,10 @@ jobs:
|
||||
matrix:
|
||||
part: [unit, integration]
|
||||
env:
|
||||
# Released sccache expands Cargo's response files and exceeds Windows' rustc spawn limit
|
||||
# (#13543). Let Cargo handle long commands until a release includes mozilla/sccache#3026.
|
||||
# The dependency rust-cache below stays enabled; only compiler caching is disabled.
|
||||
RUSTC_WRAPPER: ""
|
||||
# No debuginfo on Windows: writing PDBs for ~200 test binaries cost 2.2 of ~21 build minutes.
|
||||
# A panic still names its file and line; only backtrace frames lose theirs (Linux keeps
|
||||
# line-tables-only, so a backtrace with lines is one OS away).
|
||||
@@ -236,24 +240,6 @@ jobs:
|
||||
save-if: ${{ github.ref == 'refs/heads/main' && matrix.part == 'integration' }}
|
||||
cache-on-failure: true
|
||||
|
||||
# sccache caches the workspace crates' compiled libraries, which rust-cache leaves out:
|
||||
# warm, each Windows leg built 4.5 min faster. Like rust-cache, only main writes (PRs read
|
||||
# main's entries); a full set is ~90 MB, so it barely touches the 10 GB budget (#2688).
|
||||
# Test executables can't be cached, so a PR still links its tests.
|
||||
- name: Install sccache
|
||||
uses: step-security/sccache-action@ae2d64c53dbae979f387673f0aae7ebb52087f6b # v0.0.11
|
||||
with:
|
||||
version: v0.18.0
|
||||
|
||||
- name: Use sccache
|
||||
env:
|
||||
MAIN: ${{ github.ref == 'refs/heads/main' }}
|
||||
run: |
|
||||
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
|
||||
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
|
||||
if [ "$MAIN" != true ]; then echo "SCCACHE_GHA_RW_MODE=READ_ONLY" >> "$GITHUB_ENV"; fi
|
||||
shell: bash
|
||||
|
||||
- name: Clippy
|
||||
if: matrix.part == 'integration'
|
||||
run: cargo clippy --workspace --all-targets --locked --features heif -- -D warnings
|
||||
|
||||
Reference in new issue
Block a user