sanitizers.yml (1969B)
1 name: Sanitizers 2 3 on: 4 push: 5 branches: [ master ] 6 pull_request: 7 branches: [ master ] 8 9 jobs: 10 build: 11 strategy: 12 matrix: 13 os: [ubuntu-latest, macOS-latest] 14 type: [Debug, RelWithDebInfo, MinSizeRel, Release] 15 sanitizer: [address, memory, undefined] 16 exclude: 17 - {os: "macOS-latest", sanitizer: "memory"} 18 runs-on: ${{ matrix.os }} 19 20 steps: 21 - uses: actions/checkout@v4 22 23 - name: Create Build Environment 24 run: cmake -E make_directory ${{github.workspace}}/build 25 26 - name: Setup dependencies 27 if: startsWith(matrix.os, 'ubuntu') 28 run: sudo apt-get install -y clang 29 30 - name: Configure CMake (macOS) 31 shell: bash 32 if: startsWith(matrix.os, 'macOS') 33 working-directory: ${{github.workspace}}/build 34 run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DUTEST_USE_SANITIZER=${{ matrix.sanitizer }} 35 36 - name: Configure CMake with Clang (Ubuntu) 37 shell: bash 38 if: startsWith(matrix.os, 'ubuntu') 39 working-directory: ${{github.workspace}}/build 40 run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUTEST_USE_SANITIZER=${{ matrix.sanitizer }} 41 42 - name: Build 43 working-directory: ${{github.workspace}}/build 44 shell: bash 45 run: cmake --build . --config ${{ matrix.type }} 46 47 - name: Test 48 working-directory: ${{github.workspace}}/build 49 shell: bash 50 run: ./utest_test 51 52 - name: Test Whole Program Optimization 53 working-directory: ${{github.workspace}}/build 54 shell: bash 55 run: ./utest_test_wpo 56 57 - name: Test with random order 58 working-directory: ${{github.workspace}}/build 59 shell: bash 60 run: ./utest_test --random-order 61 62 - name: Test with random order and seed 63 working-directory: ${{github.workspace}}/build 64 shell: bash 65 run: ./utest_test --random-order=42