mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-19 11:43:56 +00:00
Run clang tidy
This commit is contained in:
31
.github/workflows/build.yml
vendored
31
.github/workflows/build.yml
vendored
@@ -24,6 +24,35 @@ on:
|
||||
# cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
clang-tidy:
|
||||
name: Run Clang Tidy
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Ninja
|
||||
uses: seanmiddleditch/gha-setup-ninja@v6
|
||||
|
||||
- name: Install Clang
|
||||
run: |
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh 20
|
||||
sudo apt install -y clang-tidy-20
|
||||
|
||||
- name: CMake Build
|
||||
run: cmake --preset=${{matrix.preset}} -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/cmake/toolchain/android-ndk.cmake && cmake --build --preset=${{matrix.preset}}
|
||||
if: ${{ startsWith(matrix.platform, 'Android') }}
|
||||
env:
|
||||
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
ANDROID_ABI: ${{matrix.abi}}
|
||||
|
||||
- name: CMake Build
|
||||
run: cmake --preset=release -DMOMO_ENABLE_CLANG_TIDY=On && cmake --build --preset=release
|
||||
|
||||
verify-formatting:
|
||||
name: Verify Formatting
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -349,7 +378,7 @@ jobs:
|
||||
summary:
|
||||
name: Pipeline Summary
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [build-apiset-dumper, smoke-test-android, create-emulation-root, build, test, verify-formatting]
|
||||
needs: [clang-tidy, build-apiset-dumper, smoke-test-android, create-emulation-root, build, test, verify-formatting]
|
||||
if: always()
|
||||
steps:
|
||||
- uses: geekyeggo/delete-artifact@v5
|
||||
|
||||
25
.github/workflows/review.yml
vendored
25
.github/workflows/review.yml
vendored
@@ -1,25 +0,0 @@
|
||||
name: Review
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Clang Tidy Review
|
||||
uses: ZedThree/clang-tidy-review@v0.20.1
|
||||
id: review
|
||||
with:
|
||||
cmake_command: cmake . -DCMAKE_EXPORT_COMPILE_COMMANDS=on
|
||||
|
||||
- name: Upload Review
|
||||
uses: ZedThree/clang-tidy-review/upload@v0.20.1
|
||||
id: upload-review
|
||||
|
||||
- if: steps.review.outputs.total_comments > 0
|
||||
run: exit 1
|
||||
Reference in New Issue
Block a user