diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f7353157..ec6ef81c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -62,16 +62,21 @@ default: fmt: stage: quick-checks - # Explicit timeout so a stuck runner hits job_execution_timeout (retryable) - # instead of GitLab's 60m server_timeout_running (not matched by any retry keyword). + # Use pre-baked /root/.cargo from the Docker image so there is no GitLab CI + # cache download before the script. Cache downloads happen before any log + # output and can silently hang on flaky runners, producing server_timeout_running. + # cargo fmt --check does not compile — it only needs rustfmt, not the registry. + variables: + CARGO_HOME: /root/.cargo + before_script: [] + cache: [] timeout: 10m + # server_timeout_running is not matched by any GitLab retry keyword; use + # `always` so infrastructure failures retry on a different runner. A real + # format violation is deterministic and fails all retries — max: 2 limits waste. retry: max: 2 - when: - - stuck_or_timeout_failure - - runner_system_failure - - unknown_failure - - job_execution_timeout + when: always script: - cargo fmt --all -- --check