소스 검색

Add sanitizer job

Kim Kulling 5 년 전
부모
커밋
9107402bda
1개의 변경된 파일26개의 추가작업 그리고 2개의 파일을 삭제
  1. 26 2
      .github/workflows/ccpp.yml

+ 26 - 2
.github/workflows/ccpp.yml

@@ -7,13 +7,13 @@ on:
     branches: [ master ]
     branches: [ master ]
 
 
 jobs:
 jobs:
-  job:
+  job-build:
     name: ${{ matrix.os }}-${{ matrix.cxx }}-build-and-test
     name: ${{ matrix.os }}-${{ matrix.cxx }}-build-and-test
     runs-on: ${{ matrix.os }}
     runs-on: ${{ matrix.os }}
     strategy:
     strategy:
       fail-fast: false
       fail-fast: false
       matrix:
       matrix:
-        name: [ubuntu-gcc, macos-clang, windows-msvc, ubuntu-clang]
+        name: [ubuntu-gcc, macos-clang, windows-msvc, ubuntu-clang, ubuntu-memory-sanitizer]
         # For Windows msvc, for Linux and macOS let's use the clang compiler, use gcc for Linux.
         # For Windows msvc, for Linux and macOS let's use the clang compiler, use gcc for Linux.
         include:
         include:
           - name: windows-msvc
           - name: windows-msvc
@@ -57,3 +57,27 @@ jobs:
     - name: test
     - name: test
       run: cd build/bin && ./unit
       run: cd build/bin && ./unit
       shell: bash
       shell: bash
+
+  job-sanitizer:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - uses: lukka/get-cmake@latest    
+    - uses: ilammy/msvc-dev-cmd@v1
+    - uses: lukka/set-shell-env@v1
+      with:
+        CXX: clang++
+        CC: clang
+    
+    - name: configure and build
+      uses: lukka/run-cmake@v2
+      with:
+        cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
+        cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
+        cmakeAppendedArgs: '-GNinja -DCMAKE_BUILD_TYPE=Release -DASSIMP_ASAN=ON'
+        buildWithCMakeArgs: '-- -v'
+        buildDirectory: '${{ github.workspace }}/build/'
+    
+    - name: test
+      run: cd build/bin && ./unit
+      shell: bash