mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 10:17:45 +08:00
CI: improve clang-tidy workflow naming and use standard cache actions
Rename workflow to "Static Analysis" with job name "Clang-Tidy" for clearer GitHub Checks UI. Use Title Case action-verb step names. Switch from runs-on/cache to actions/cache since the runs-on Magic Cache sidecar transparently handles S3 backing. Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Clang Tidy
|
name: Static Analysis
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -16,7 +16,8 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
clang_tidy:
|
||||||
|
name: Clang-Tidy
|
||||||
runs-on: [runs-on, runner=16cpu-linux-x64, "run-id=${{ github.run_id }}", "extras=s3-cache"]
|
runs-on: [runs-on, runner=16cpu-linux-x64, "run-id=${{ github.run_id }}", "extras=s3-cache"]
|
||||||
container:
|
container:
|
||||||
image: px4io/px4-dev:v1.17.0-beta1
|
image: px4io/px4-dev:v1.17.0-beta1
|
||||||
@@ -27,12 +28,12 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
|
|
||||||
- name: Git ownership workaround
|
- name: Configure Git Safe Directory
|
||||||
run: git config --system --add safe.directory '*'
|
run: git config --system --add safe.directory '*'
|
||||||
|
|
||||||
- name: ccache cache restore
|
- name: Restore Compiler Cache
|
||||||
id: cc_restore
|
id: cc_restore
|
||||||
uses: runs-on/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.ccache
|
path: ~/.ccache
|
||||||
key: ccache-clang-tidy-${{ github.head_ref || github.ref_name }}
|
key: ccache-clang-tidy-${{ github.head_ref || github.ref_name }}
|
||||||
@@ -41,7 +42,7 @@ jobs:
|
|||||||
ccache-clang-tidy-main-
|
ccache-clang-tidy-main-
|
||||||
ccache-clang-tidy-
|
ccache-clang-tidy-
|
||||||
|
|
||||||
- name: ccache config and stats
|
- name: Configure Compiler Cache
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ccache
|
mkdir -p ~/.ccache
|
||||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||||
@@ -53,16 +54,16 @@ jobs:
|
|||||||
ccache -s
|
ccache -s
|
||||||
ccache -z
|
ccache -z
|
||||||
|
|
||||||
- name: Testing (clang-tidy)
|
- name: Run Clang-Tidy Analysis
|
||||||
run: make -j16 clang-tidy
|
run: make -j16 clang-tidy
|
||||||
|
|
||||||
- name: ccache post-build stats
|
- name: Compiler Cache Stats
|
||||||
if: always()
|
if: always()
|
||||||
run: ccache -s
|
run: ccache -s
|
||||||
|
|
||||||
- name: ccache cache save
|
- name: Save Compiler Cache
|
||||||
if: always()
|
if: always()
|
||||||
uses: runs-on/cache/save@v4
|
uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.ccache
|
path: ~/.ccache
|
||||||
key: ${{ steps.cc_restore.outputs.cache-primary-key }}
|
key: ${{ steps.cc_restore.outputs.cache-primary-key }}
|
||||||
|
|||||||
Reference in New Issue
Block a user