Skip to content

ci: Fail fast on pre-commit violations - #23785

Merged
thewilsonator merged 1 commit into
dlang:masterfrom
gorsing:refactoring_github_actions_v3
Sep 5, 2026
Merged

ci: Fail fast on pre-commit violations#23785
thewilsonator merged 1 commit into
dlang:masterfrom
gorsing:refactoring_github_actions_v3

Conversation

@gorsing

@gorsing gorsing commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR refactors the CI workflows to improve efficiency and maintainability by extracting the pre-commit checks into a reusable workflow and making the main build matrix dependent on its success.

Motivation & Benefits

  1. Fail-Fast Mechanism: Currently, the heavy build matrix (Linux, macOS, Windows, FreeBSD with multiple compilers) starts immediately on every PR. If a PR fails a basic pre-commit check (e.g., changelog formatting), it wastes 20-60 minutes of CI time before failing. With this change, the main job is blocked (needs: call-precommit) until pre-commit checks pass, catching trivial errors in ~1 minute.
  2. Resource Efficiency: By preventing the heavy matrix from running on PRs that will inevitably fail basic linting/formatting rules, we save GitHub Actions minutes and reduce the CI queue load for other contributors.
  3. Zero Logic Change: This is purely an orchestration refactoring. The actual commands, tools, and validation rules remain exactly the same. The risk of regression is minimal.

@gorsing gorsing changed the title ref fast fail precommit ci: Fail fast on pre-commit violations Sep 4, 2026
@thewilsonator
thewilsonator merged commit 4ab9484 into dlang:master Sep 5, 2026
42 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants