-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2763 from MRtrix3/san_checks
Add periodic checks with sanitizers
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Sanitizers checks | ||
|
||
on: | ||
workflow_dispatch: | ||
# Run this every Sunday at midnight | ||
schedule: | ||
- cron: "0 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 qt6-base-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev ninja-build | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- 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 |