PhotoCraft: An open-source, photo editor written by scratch in pure Rust
CI: run the Windows tests on two runners instead of three
Ivane5bf9c22c92a
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex dfe21e149..823232cb3 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -56,12 +56,13 @@ jobs:run: |# No macOS on PRs or main: the org's 5 macOS slots are kept for release builds, and# release.yml builds and tests macOS (a failing release is fixed and rebuilt).- # Windows tests run as three legs in parallel: the unit tests, and the integration tests- # split in two (nextest --partition). As one job they took ~28 min on the Windows runner;- # the legs take ~13, ~10 and ~11.+ # 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.linux='{"os":"ubuntu-latest","part":"all"}'win() { printf '{"os":"windows-latest","part":"%s"}' "$1"; }- all="[$linux,$(win unit),$(win integration-1),$(win integration-2)]"+ all="[$linux,$(win unit),$(win integration)]"if [ "$EVENT" != pull_request ] || [ "$FULL" = true ]; thenecho "legs=$all" >> "$GITHUB_OUTPUT"echo "web=true" >> "$GITHUB_OUTPUT"@@ -116,11 +117,11 @@ jobs:# Only main saves caches; PRs restore main's. Every PR used to save its own set (up to# 3.8 GB), usable by that PR only, so the repo's 10 GB cache budget kept evicting main's.# A failing test still saves: the cache holds compiled dependencies, not test results.- # The Windows legs share one key (same dependencies); the integration-2 leg saves it,+ # The Windows legs share one key (same dependencies); the integration leg saves it,# because it also runs Clippy and so leaves Clippy's dependency metadata in it.- uses: Swatinem/rust-cache@v2with:- save-if: ${{ github.ref == 'refs/heads/main' && (matrix.part == 'all' || matrix.part == 'integration-2') }}+ save-if: ${{ github.ref == 'refs/heads/main' && (matrix.part == 'all' || matrix.part == 'integration') }}cache-on-failure: true# sccache caches the workspace crates' compiled libraries, which rust-cache leaves out:@@ -158,9 +159,9 @@ jobs:# never run (Clippy's `--all-targets` still checks they compile). nextest skips doctests, so# they get their own step.#- # On Windows the unit leg runs `--lib --bins` and the integration legs `--test '*'` (every- # integration-test target), half of the tests each; the feature selection stays the same, so- # all legs share the dependency cache. The `ci` profile retries the GPU tests+ # On Windows the unit leg runs `--lib --bins` and the integration leg `--test '*'` (every+ # integration-test target); the feature selection stays the same, so both legs share the+ # dependency cache. The `ci` profile retries the GPU tests# (.config/nextest.toml).- name: Testenv:@@ -168,8 +169,7 @@ jobs:run: |case "$PART" inunit) targets=(--lib --bins) ;;- integration-1) targets=(--test '*' --partition count:1/2) ;;- integration-2) targets=(--test '*' --partition count:2/2) ;;+ integration) targets=(--test '*') ;;*) targets=(--lib --bins --tests) ;;esaccargo nextest run --profile ci --workspace --locked --features heif "${targets[@]}" --no-fail-fast@@ -180,11 +180,11 @@ jobs:run: cargo test --workspace --locked --features heif --doc- name: Clippy- if: matrix.part == 'all' || matrix.part == 'integration-2'+ if: matrix.part == 'all' || matrix.part == 'integration'run: cargo clippy --workspace --all-targets --locked --features heif -- -D warnings- name: Dependency layering- if: matrix.part == 'all' || matrix.part == 'integration-2'+ if: matrix.part == 'all' || matrix.part == 'integration'run: cargo xtask layers# docs/scorecard.md must match its sources (checklists, budgets, baseline, corpus floors,