Factor out sanitizer run.
Don't fail on sanitizer failure and provide separate CI jobs for sanitizer builds.
This commit is contained in:
committed by
Matthew Parkinson
parent
b777243981
commit
be85d53c20
34
.github/workflows/main.yml
vendored
34
.github/workflows/main.yml
vendored
@@ -78,10 +78,6 @@ jobs:
|
||||
dependencies: "sudo apt install ninja-build"
|
||||
extra-cmake-flags: "-DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_FLAGS=-stdlib=libstdc++"
|
||||
build-only: yes
|
||||
- os: "ubuntu-latest"
|
||||
variant: Clang 10 libc++ (TSan + UBSan)
|
||||
dependencies: "sudo apt install ninja-build"
|
||||
extra-cmake-flags: "-DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DSNMALLOC_SANITIZER=undefined,thread"
|
||||
# Don't abort runners if a single one fails
|
||||
fail-fast: false
|
||||
runs-on: ${{ matrix.os }}
|
||||
@@ -114,6 +110,36 @@ jobs:
|
||||
ninja clean
|
||||
LD_PRELOAD=/usr/local/lib/libsnmallocshim-checks.so ninja
|
||||
|
||||
sanitizer:
|
||||
strategy:
|
||||
matrix:
|
||||
# Build each combination of OS and release/debug variants
|
||||
os: [ "ubuntu-latest"]
|
||||
build-type: [ Release, Debug ]
|
||||
include:
|
||||
- os: "ubuntu-latest"
|
||||
continue-on-error: # Don't class as an error if this fails, until we have a more reliablity.
|
||||
variant: Clang 10 libc++ (TSan + UBSan)
|
||||
dependencies: "sudo apt install ninja-build"
|
||||
extra-cmake-flags: "-DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_CXX_FLAGS=-stdlib=\"libc++ -g\" -DSNMALLOC_SANITIZER=undefined,thread"
|
||||
# Don't abort runners if a single one fails
|
||||
fail-fast: false
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.os }} ${{ matrix.build-type }} ${{ matrix.variant }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install build dependencies
|
||||
run: ${{ matrix.dependencies }}
|
||||
- name: Configure CMake
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -G Ninja ${{ matrix.cmake-flags }} ${{ matrix.extra-cmake-flags }}
|
||||
# Build with a nice ninja status line
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: NINJA_STATUS="%p [%f:%s/%t] %o/s, %es" ninja
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: ctest --output-on-failure -j 4 -C ${{ matrix.build-type }} --timeout 400 -E "memcpy|external_pointer" --repeat-until-fail 2
|
||||
|
||||
qemu-crossbuild:
|
||||
strategy:
|
||||
matrix:
|
||||
|
||||
Reference in New Issue
Block a user