From 340d66c24c6a57572dac83d4a7e2a32bc6acaa70 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Mon, 29 Mar 2021 12:05:57 +0200 Subject: [PATCH] build system: split build and sanitizer runs --- .github/workflows/build.yml | 2 +- .github/workflows/sanitizer.yml | 29 +++++++++++++++++++++++++++++ CMakeLists.txt | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/sanitizer.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6d9d10d37..d6ebf615a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: env: CXX: ${{ matrix.compiler }} run: | - cmake -DENTT_USE_ASAN=ON -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON .. + cmake -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON .. make -j4 - name: Run tests working-directory: build diff --git a/.github/workflows/sanitizer.yml b/.github/workflows/sanitizer.yml new file mode 100644 index 000000000..0744643d5 --- /dev/null +++ b/.github/workflows/sanitizer.yml @@ -0,0 +1,29 @@ +name: sanitizer + +on: [push, pull_request] + +jobs: + + linux: + timeout-minutes: 10 + + strategy: + matrix: + compiler: [g++, clang++] + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Compile tests + working-directory: build + env: + CXX: ${{ matrix.compiler }} + run: | + cmake -DENTT_USE_ASAN=ON -DENTT_BUILD_TESTING=ON -DENTT_BUILD_LIB=ON -DENTT_BUILD_EXAMPLE=ON .. + make -j4 + - name: Run tests + working-directory: build + env: + CTEST_OUTPUT_ON_FAILURE: 1 + run: ctest --timeout 5 -C Debug -j4 diff --git a/CMakeLists.txt b/CMakeLists.txt index 807790996..c6dccfec0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,6 +203,7 @@ add_custom_target( .github/workflows/build.yml .github/workflows/coverage.yml .github/workflows/deploy.yml + .github/workflows/sanitizer.yml .github/FUNDING.yml AUTHORS CONTRIBUTING.md