Unverified Commit e451e50e by Dominic Hamon Committed by GitHub

add g++ to sanitizer buildbots (#1197)

* add g++ to sanitizer buildbots * add compiler to sanitizer build name * spell g++ correctly. look, it's early, ok? * only set libcxx if we're using clang
parent 1fcb5c23
...@@ -5,20 +5,18 @@ on: ...@@ -5,20 +5,18 @@ on:
pull_request: {} pull_request: {}
env: env:
CC: clang
CXX: clang++
EXTRA_CXX_FLAGS: "-stdlib=libc++"
UBSAN_OPTIONS: "print_stacktrace=1" UBSAN_OPTIONS: "print_stacktrace=1"
jobs: jobs:
job: job:
name: ${{ matrix.sanitizer }}.${{ matrix.build_type }} name: ${{ matrix.sanitizer }}.${{ matrix.build_type }}.${{ matrix.compiler }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
build_type: ['Debug', 'RelWithDebInfo'] build_type: ['Debug', 'RelWithDebInfo']
sanitizer: ['asan', 'ubsan', 'tsan'] sanitizer: ['asan', 'ubsan', 'tsan']
compiler: ['clang', 'gcc']
# TODO: add 'msan' above. currently failing and needs investigation. # TODO: add 'msan' above. currently failing and needs investigation.
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
...@@ -47,8 +45,24 @@ jobs: ...@@ -47,8 +45,24 @@ jobs:
echo "EXTRA_FLAGS=-g -O2 -fno-omit-frame-pointer -fsanitize=thread -fno-sanitize-recover=all" >> $GITHUB_ENV echo "EXTRA_FLAGS=-g -O2 -fno-omit-frame-pointer -fsanitize=thread -fno-sanitize-recover=all" >> $GITHUB_ENV
echo "LIBCXX_SANITIZER=Thread" >> $GITHUB_ENV echo "LIBCXX_SANITIZER=Thread" >> $GITHUB_ENV
- name: configure clang
if: matrix.compiler == 'clang'
run: |
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: configure gcc
if: matrix.compiler == 'gcc'
run: |
sudo apt update && sudo apt -y install gcc-10 g++-10
echo "CC=gcc-10" >> $GITHUB_ENV
echo "CXX=g++-10" >> $GITHUB_ENV
- name: install llvm stuff - name: install llvm stuff
run: "${GITHUB_WORKSPACE}/.github/.libcxx-setup.sh" if: matrix.compiler == 'clang'
run: |
"${GITHUB_WORKSPACE}/.github/.libcxx-setup.sh"
echo "EXTRA_CXX_FLAGS=\"-stdlib=libc++\"" >> $GITHUB_ENV
- name: create build environment - name: create build environment
run: cmake -E make_directory ${{ runner.workspace }}/_build run: cmake -E make_directory ${{ runner.workspace }}/_build
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment