mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
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>
64 lines
1.3 KiB
YAML
64 lines
1.3 KiB
YAML
name: Checks
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
image: ghcr.io/px4/px4-dev:v1.17.0-rc2
|
|
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
check: [
|
|
"check_format",
|
|
"check_newlines",
|
|
"tests",
|
|
"validate_module_configs",
|
|
"shellcheck_all",
|
|
"module_documentation",
|
|
]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Configure Git Safe Directory
|
|
run: git config --system --add safe.directory '*'
|
|
|
|
- uses: ./.github/actions/setup-ccache
|
|
id: ccache
|
|
if: matrix.check == 'tests'
|
|
with:
|
|
cache-key-prefix: ccache-sitl
|
|
max-size: 300M
|
|
|
|
- name: Building [${{ matrix.check }}]
|
|
env:
|
|
PX4_SBOM_DISABLE: 1
|
|
run: |
|
|
cd "$GITHUB_WORKSPACE"
|
|
make ${{ matrix.check }}
|
|
|
|
- uses: ./.github/actions/save-ccache
|
|
if: always() && matrix.check == 'tests'
|
|
with:
|
|
cache-primary-key: ${{ steps.ccache.outputs.cache-primary-key }}
|