mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 04:23:33 +08:00
ci(actions): add composite actions and clang-tidy PR helper
Add four reusable building blocks that upcoming CI optimization PRs will consume. No existing workflow is modified; these files are dormant until referenced. - .github/actions/setup-ccache: restore ~/.ccache with content-hash keys, write ccache.conf with compression and content-based compiler check - .github/actions/save-ccache: print stats and save the cache under the primary key produced by setup-ccache - .github/actions/build-gazebo-sitl: build px4_sitl_default plus the Gazebo Classic plugins with ccache stats between stages - Tools/ci/run-clang-tidy-pr.py: compute the translation units affected by a PR diff and invoke Tools/run-clang-tidy.py on that subset only, exiting silently when no C++ files changed Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
name: Save ccache
|
||||
description: Print ccache stats and save to cache
|
||||
|
||||
inputs:
|
||||
cache-primary-key:
|
||||
description: Primary cache key from setup-ccache output
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Cache - Stats
|
||||
if: always()
|
||||
shell: bash
|
||||
run: ccache -s
|
||||
|
||||
- name: Cache - Save ccache
|
||||
if: always()
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{ inputs.cache-primary-key }}
|
||||
Reference in New Issue
Block a user