Skip to content

ci(workflows): shallow checkout and fail-fast in checks#27032

Merged
mrpollo merged 1 commit intomainfrom
mrpollo/ci-checkout-hygiene
Apr 9, 2026
Merged

ci(workflows): shallow checkout and fail-fast in checks#27032
mrpollo merged 1 commit intomainfrom
mrpollo/ci-checkout-hygiene

Conversation

@mrpollo
Copy link
Copy Markdown
Contributor

@mrpollo mrpollo commented Apr 9, 2026

Ports checkout hygiene from the CI orchestrator branch (mrpollo/ci_orchestration, PR #26257) into current mainline workflows without merging the orchestrator itself. Every change here matches the corresponding job in ci-orchestrator.yml one-to-one, so the mainline workflows pick up the tuning from that branch incrementally while the orchestrator stays in its own long-lived branch.

  • checks.yml: enables fail-fast: true (the Checks workflow runs at ~99% success, so canceling siblings on the first failure reclaims runner time with negligible visibility cost), drops to fetch-depth: 1, and extracts git config --system --add safe.directory '*' into its own step to match the orchestrator's layout.
  • itcm_check.yml: drops to fetch-depth: 1 and removes submodules: recursive. Board targets bootstrap their submodules via the top-level Makefile (same approach the orchestrator's itcm-check job uses).
  • sitl_tests.yml, ros_integration_tests.yml, mavros_mission_tests.yml, mavros_offboard_tests.yml, python_checks.yml: fetch-depth: 1. None of these jobs use git history.

Workflows that legitimately need full history are left alone: clang-tidy.yml (base-ref diff for clang-tidy-diff), flash_analysis.yml (PR-head vs base bloat delta), failsafe_sim.yml, ros_translation_node.yml, ekf_functional_change_indicator.yml, ekf_update_change_indicator.yml, and build_all_targets.yml.

Follow-up: nuttx_env_config.yml has no orchestrator equivalent and the orchestrator drops the PX4_EXTRA_NUTTX_CONFIG validation entirely. Separate issue will track whether this workflow is still load-bearing.

Port checkout hygiene from the CI orchestrator branch
(mrpollo/ci_orchestration) to current workflows without merging the
orchestrator itself.

- checks.yml: enable fail-fast (99% success rate observed, cancel on
  first failure saves runner time), switch to fetch-depth 1, extract
  safe.directory to its own step
- itcm_check.yml: fetch-depth 1, drop submodules: recursive (the
  Makefile bootstraps submodules as a prerequisite of board targets)
- sitl_tests.yml, ros_integration_tests.yml, mavros_mission_tests.yml,
  mavros_offboard_tests.yml, python_checks.yml: fetch-depth 1

Each change matches the corresponding job in ci-orchestrator.yml on
mrpollo/ci_orchestration 1:1. Workflows that legitimately need history
(clang-tidy, flash_analysis, failsafe_sim, ros_translation_node,
ekf_*_change_indicator, build_all_targets) are left alone.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
mrpollo added a commit that referenced this pull request Apr 9, 2026
Port the checks.yml and python_checks.yml improvements from the CI
orchestrator branch (mrpollo/ci_orchestration, PR #26257) without
doing the full T1/T2 split.

checks.yml:
- Drop 5 matrix entries the orchestrator removed:
  tests_coverage, px4_fmu-v2_default stack_check,
  NO_NINJA_BUILD=1 px4_fmu-v5_default,
  NO_NINJA_BUILD=1 px4_sitl_default, px4_sitl_allyes.
- Remove the codecov/codecov-action@v1 step (deprecated, only ran
  for the dropped tests_coverage entry).
- Wire the setup-ccache / save-ccache composite actions around
  make tests (cache-key-prefix ccache-sitl, max-size 300M) so
  repeat runs reuse the SITL build tree. Matches the orchestrator
  basic-tests job 1:1.

python_checks.yml:
- Replace the apt-get install python3 + pip install
  --break-system-packages + hardcoded $HOME/.local/bin paths with
  actions/setup-python@v5 pinned to 3.10 and plain pip install.
- Linters now run from PATH instead of $HOME/.local/bin.

Stacks on top of mrpollo/ci-checkout-hygiene (#27032) which shipped
fail-fast: true, fetch-depth: 1, and the safe.directory step
extraction.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
@mrpollo mrpollo merged commit 8552465 into main Apr 9, 2026
79 checks passed
@mrpollo mrpollo deleted the mrpollo/ci-checkout-hygiene branch April 9, 2026 21:57
mrpollo added a commit that referenced this pull request Apr 9, 2026
Port the checks.yml and python_checks.yml improvements from the CI
orchestrator branch (mrpollo/ci_orchestration, PR #26257) without
doing the full T1/T2 split.

checks.yml:
- Drop 5 matrix entries the orchestrator removed:
  tests_coverage, px4_fmu-v2_default stack_check,
  NO_NINJA_BUILD=1 px4_fmu-v5_default,
  NO_NINJA_BUILD=1 px4_sitl_default, px4_sitl_allyes.
- Remove the codecov/codecov-action@v1 step (deprecated, only ran
  for the dropped tests_coverage entry).
- Wire the setup-ccache / save-ccache composite actions around
  make tests (cache-key-prefix ccache-sitl, max-size 300M) so
  repeat runs reuse the SITL build tree. Matches the orchestrator
  basic-tests job 1:1.

python_checks.yml:
- Replace the apt-get install python3 + pip install
  --break-system-packages + hardcoded $HOME/.local/bin paths with
  actions/setup-python@v5 pinned to 3.10 and plain pip install.
- Linters now run from PATH instead of $HOME/.local/bin.

Stacks on top of mrpollo/ci-checkout-hygiene (#27032) which shipped
fail-fast: true, fetch-depth: 1, and the safe.directory step
extraction.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
mrpollo added a commit that referenced this pull request Apr 9, 2026
Port the checks.yml and python_checks.yml improvements from the CI
orchestrator branch (mrpollo/ci_orchestration, PR #26257) without
doing the full T1/T2 split.

checks.yml:
- Drop 5 matrix entries the orchestrator removed:
  tests_coverage, px4_fmu-v2_default stack_check,
  NO_NINJA_BUILD=1 px4_fmu-v5_default,
  NO_NINJA_BUILD=1 px4_sitl_default, px4_sitl_allyes.
- Remove the codecov/codecov-action@v1 step (deprecated, only ran
  for the dropped tests_coverage entry).
- Wire the setup-ccache / save-ccache composite actions around
  make tests (cache-key-prefix ccache-sitl, max-size 300M) so
  repeat runs reuse the SITL build tree. Matches the orchestrator
  basic-tests job 1:1.

python_checks.yml:
- Replace the apt-get install python3 + pip install
  --break-system-packages + hardcoded $HOME/.local/bin paths with
  actions/setup-python@v5 pinned to 3.10 and plain pip install.
- Linters now run from PATH instead of $HOME/.local/bin.

Stacks on top of mrpollo/ci-checkout-hygiene (#27032) which shipped
fail-fast: true, fetch-depth: 1, and the safe.directory step
extraction.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
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.

1 participant