sjanc commented on code in PR #2044: URL: https://github.com/apache/mynewt-nimble/pull/2044#discussion_r2132501142
########## .github/workflows/clang_tidy.yml: ########## @@ -0,0 +1,93 @@ +name: Clang-Tidy Lint + +on: [push, pull_request] + +jobs: + clang-tidy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 'stable' + - uses: carlosperate/arm-none-eabi-gcc-action@v1.8.1 + with: + release: ${{ matrix.gcc }} + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y jq + sudo apt-get install -y clang-tidy cmake build-essential ninja-build + + - name: Install newt + shell: bash + run: | + go version + go install mynewt.apache.org/newt/newt@latest + + - name: Setup project + shell: bash + run: | + newt new build + cp -f .github/project.yml build/project.yml + cd build + newt upgrade --shallow=1 + rm -rf repos/apache-mynewt-nimble + git clone .. repos/apache-mynewt-nimble + cd .. + + - name: Configure CMake project + shell: bash + run: | + cd build + newt target create cc_test + newt target set cc_test bsp="@apache-mynewt-core/hw/bsp/nordic_pca10056" + newt target set cc_test app="@apache-mynewt-nimble/apps/btshell" + cp -f ../.github/test_build_apps_syscfg.yml targets/cc_test/syscfg.yml + newt target cmake cc_test + cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + cp build/compile_commands.json . + + - name: Clean Compile Commands + shell: bash + run: | + COMPILE_COMMANDS="compile_commands.json" + if command -v jq >/dev/null 2>&1; then Review Comment: this check shouldn't be needed, all required tools shall be installed in previous steps -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@mynewt.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org