Ramon Roche 8552465408 ci(workflows): shallow checkout and fail-fast in checks
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>
2026-04-09 15:57:34 -06:00

67 lines
2.0 KiB
YAML

name: ITCM check
permissions:
contents: read
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check_itcm:
name: Checking ${{ matrix.target }}
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
container:
image: ghcr.io/px4/px4-dev:v1.17.0-rc2
strategy:
fail-fast: false
matrix:
include:
- target: px4_fmu-v5x
scripts: >
boards/px4/fmu-v5x/nuttx-config/scripts/itcm_gen_functions.ld
boards/px4/fmu-v5x/nuttx-config/scripts/itcm_static_functions.ld
- target: px4_fmu-v6xrt
scripts: >
boards/px4/fmu-v6xrt/nuttx-config/scripts/itcm_functions_includes.ld
boards/px4/fmu-v6xrt/nuttx-config/scripts/itcm_static_functions.ld
- target: nxp_tropic-community
scripts: >
boards/nxp/tropic-community/nuttx-config/scripts/itcm_functions_includes.ld
boards/nxp/tropic-community/nuttx-config/scripts/itcm_static_functions.ld
- target: nxp_mr-tropic
scripts: >
boards/nxp/mr-tropic/nuttx-config/scripts/itcm_functions_includes.ld
boards/nxp/mr-tropic/nuttx-config/scripts/itcm_static_functions.ld
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Git ownership workaround
run: git config --system --add safe.directory '*'
- name: Build Target
run: make ${{ matrix.target }}
- name: Copy built ELF
run: cp ./build/**/*.elf ./built.elf
- name: Install itcm-check dependencies
run: pip3 install -r Tools/setup/optional-requirements.txt --break-system-packages
- name: Execute the itcm-check
run: python3 Tools/itcm_check.py --elf-file built.elf --script-files ${{ matrix.scripts }}