mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-21 06:27:35 +08:00
adjust clang-tidy checks and workflow
This commit is contained in:
committed by
Ramon Roche
parent
c511e72d4f
commit
c29630f6ae
@@ -11,6 +11,7 @@ on:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -18,13 +19,22 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Determine PX4 version for container image
|
||||
id: px4_version
|
||||
run: |
|
||||
echo "px4_version=$(git describe --tags --match 'v[0-9]*')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Testing (clang-tidy)
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: px4io/px4-dev-clang:2021-09-08
|
||||
image: px4io/px4-dev:${{ steps.px4_version.outputs.px4_version }}
|
||||
options: -v ${{ github.workspace }}:/workspace
|
||||
run: |
|
||||
cd /workspace
|
||||
git config --global --add safe.directory /workspace
|
||||
apt install clang-tidy-18 -y
|
||||
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-18 100
|
||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100
|
||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100
|
||||
make clang-tidy
|
||||
|
||||
Reference in New Issue
Block a user