1
0
Эх сурвалжийг харах

build system: split build and sanitizer runs

Michele Caini 5 жил өмнө
parent
commit
340d66c24c

+ 1 - 1
.github/workflows/build.yml

@@ -23,7 +23,7 @@ jobs:
       env:
         CXX: ${{ matrix.compiler }}
       run: |
-        cmake -DENTT_USE_ASAN=ON -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ..
+        cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ..
         make -j4
     - name: Run tests
       working-directory: build

+ 29 - 0
.github/workflows/sanitizer.yml

@@ -0,0 +1,29 @@
+name: sanitizer
+
+on: [push, pull_request]
+
+jobs:
+
+  linux:
+    timeout-minutes: 10
+
+    strategy:
+      matrix:
+        compiler: [g++, clang++]
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v2
+    - name: Compile tests
+      working-directory: build
+      env:
+        CXX: ${{ matrix.compiler }}
+      run: |
+        cmake -DENTT_USE_ASAN=ON -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON ..
+        make -j4
+    - name: Run tests
+      working-directory: build
+      env:
+        CTEST_OUTPUT_ON_FAILURE: 1
+      run: ctest --timeout 5 -C Debug -j4

+ 1 - 0
CMakeLists.txt

@@ -203,6 +203,7 @@ add_custom_target(
         .github/workflows/build.yml
         .github/workflows/coverage.yml
         .github/workflows/deploy.yml
+        .github/workflows/sanitizer.yml
         .github/FUNDING.yml
         AUTHORS
         CONTRIBUTING.md