Bläddra i källkod

workflow:
* add linter job
* bind both linter and iwyu to a specific branch

Michele Caini 1 år sedan
förälder
incheckning
68a6aef155
1 ändrade filer med 22 tillägg och 2 borttagningar
  1. 22 2
      .github/workflows/tools.yml

+ 22 - 2
.github/workflows/analyzer.yml → .github/workflows/tools.yml

@@ -3,8 +3,7 @@ name: analyzer
 on:
   push:
     branches:
-      - master
-      - wip
+      - tools
 
 jobs:
 
@@ -59,3 +58,24 @@ jobs:
               -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="include-what-you-use;-Xiwyu;--mapping_file=${GITHUB_WORKSPACE}/entt.imp;-Xiwyu;--no_fwd_decls;-Xiwyu;--verbose=1" \
               ..
         make -j4
+
+  clang_tidy:
+    timeout-minutes: 30
+
+    runs-on: ubuntu-latest
+    continue-on-error: true
+
+    steps:
+    - uses: actions/checkout@v4
+    - name: Compile tests
+      working-directory: build
+      env:
+        CXX: clang++
+      run: |
+        cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON -DENTT_USE_CLANG_TIDY=ON ..
+        make -j4
+    - name: Run tests
+      working-directory: build
+      env:
+        CTEST_OUTPUT_ON_FAILURE: 1
+      run: ctest -C Debug -j4