b72a7e76d9
Clang's ThreadSanitizer in version 10 and 11 emits a false positive when using condition variables ("WARNING: ThreadSanitizer: double lock of a mutex"). This was fixed in version 12 (google/sanitizers#1259).
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
on: [push, pull_request]
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
compiler: [g++, clang++]
|
|
build_type: [Release, Debug]
|
|
name: Build and run tests (${{ matrix.compiler }}, ${{ matrix.build_type }})
|
|
timeout-minutes: 10
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
CXX: ${{ matrix.compiler }}
|
|
steps:
|
|
- name: Install clang++-12
|
|
if: ${{ matrix.compiler == 'clang++' }}
|
|
uses: KyleMayes/install-llvm-action@v1.3.0
|
|
with:
|
|
version: "12.0.0"
|
|
directory: ${{ runner.temp }}/llvm
|
|
- name: Info
|
|
run: cmake --version && $CXX --version && uname -a
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
repository: catchorg/Catch2
|
|
ref: v2.x
|
|
path: catch
|
|
- name: Install catch
|
|
working-directory: catch
|
|
run: >
|
|
mkdir build
|
|
&& cd build
|
|
&& cmake -DCMAKE_BUILD_TYPE=Release -DCATCH_BUILD_TESTING=Off ..
|
|
&& sudo make install
|
|
- name: Build
|
|
run: >
|
|
mkdir -p build
|
|
&& cd build
|
|
&& cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
|
|
&& make
|
|
- name: Build Test
|
|
run: cd build && make sgnl-test
|
|
- name: Run Test
|
|
run: ./build/test/sgnl-test
|
|
- name: Build example
|
|
run: >
|
|
cd build
|
|
&& make example
|
|
- name: Run example
|
|
run: ./build/example
|
|
- name: Install signal-wrangler
|
|
run: cd build && sudo make install
|
|
- name: Test install
|
|
run: >
|
|
cd example
|
|
&& $CXX -std=c++17 -Wall -pthread -o example example.cpp
|
|
&& ./example
|