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
diff --git a/.github/workflows/sanitizer.yml b/.github/workflows/sanitizer.yml index fbc9844..bbfc782 100644 --- a/.github/workflows/sanitizer.yml +++ b/.github/workflows/sanitizer.yml
@@ -5,20 +5,18 @@ 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 @@ 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