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
This commit is contained in:
Dominic Hamon 2021-07-01 10:02:54 +01:00 committed by GitHub
parent 1fcb5c23d8
commit e451e50e9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 5 deletions

View File

@ -5,20 +5,18 @@ on:
pull_request: {}
env:
CC: clang
CXX: clang++
EXTRA_CXX_FLAGS: "-stdlib=libc++"
UBSAN_OPTIONS: "print_stacktrace=1"
jobs:
job:
name: ${{ matrix.sanitizer }}.${{ matrix.build_type }}
name: ${{ matrix.sanitizer }}.${{ matrix.build_type }}.${{ matrix.compiler }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_type: ['Debug', 'RelWithDebInfo']
sanitizer: ['asan', 'ubsan', 'tsan']
compiler: ['clang', 'gcc']
# TODO: add 'msan' above. currently failing and needs investigation.
steps:
- uses: actions/checkout@v2
@ -47,8 +45,24 @@ jobs:
echo "EXTRA_FLAGS=-g -O2 -fno-omit-frame-pointer -fsanitize=thread -fno-sanitize-recover=all" >> $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
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
run: cmake -E make_directory ${{ runner.workspace }}/_build