From 175bb9f489852f0e913e705a4424f7dd6c8adf84 Mon Sep 17 00:00:00 2001 From: Daljit Singh Date: Thu, 30 Nov 2023 09:30:43 +0000 Subject: [PATCH] Add nightly checks with sanitizers --- .github/workflows/nightly-sanitizers.yml | 62 ++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/nightly-sanitizers.yml diff --git a/.github/workflows/nightly-sanitizers.yml b/.github/workflows/nightly-sanitizers.yml new file mode 100644 index 0000000000..11004e723c --- /dev/null +++ b/.github/workflows/nightly-sanitizers.yml @@ -0,0 +1,62 @@ +name: Nightly checks with sanitizers + +on: + workflow_dispatch: + # Run this every day at midnight + schedule: + - cron: "0 0 * * *" + +jobs: + linux-clang-build: + runs-on: ubuntu-latest + + env: + SCCACHE_GHA_ENABLED: "true" + SCCACHE_CACHE_SIZE: "2G" + + strategy: + fail-fast: false + matrix: + sanitizer: [address, thread, undefined] + + steps: + - uses: actions/checkout@v1 + with: + submodules: true + ref: dev + + - name: install dependencies + run: | + sudo apt-get update + sudo apt-get install clang llvm libqt5opengl5-dev libqt5svg5-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev ninja-build + + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 + + - name: Get CMake + uses: lukka/get-cmake@latest + with: + cmakeVersion: '3.16.3' + + - name: Print CMake version + run: cmake --version + + - name: configure + run: > + cmake + -B build + -G Ninja + -D CMAKE_BUILD_TYPE=RelWithDebInfo + -D MRTRIX_BUILD_TESTS=ON + -D ECM_ENABLE_SANITIZERS=${{ matrix.sanitizer }} + -D CMAKE_C_COMPILER=clang + -D CMAKE_CXX_COMPILER=clang++ + + - name: build + run: cmake --build build + + - name: binary tests + run: cd build && ctest -R bin --output-on-failure + + - name: unit tests + run: cd build && ctest -R unit --output-on-failure