Skip to content

ci: update build job #266

ci: update build job

ci: update build job #266

Workflow file for this run

name: Sanitizers
on: [ push ]
jobs:
asan:
name: Address Sanitizer
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
steps:
- name: Chceckout code
uses: actions/checkout@v3
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install Conan
run: sudo pip install conan
- name: Cache CMake files
uses: actions/cache@v3
with:
path: build
key: ${{ runner.os }}-asan-${{ hashFiles('**/') }}
- name: Create build dir
run: mkdir -p build
- name: Load CMake
run: |
cd build
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZER_ADDRESS=1
cmake --build .
- name: Run tests
run: |
cd build
ctest
lsan:
name: Leak Sanitizer
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
steps:
- name: Chceckout code
uses: actions/checkout@v3
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install Conan
run: sudo pip install conan
- name: Create build dir
run: mkdir build
- name: Cache CMake files
uses: actions/cache@v3
with:
path: build
key: ${{ runner.os }}-lsan-${{ hashFiles('*') }}
- name: Load CMake
run: |
cd build
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZER_LEAK=1
cmake --build .
- name: Run tests
run: |
cd build
ctest
msan:
name: Memory Sanitizer
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
steps:
- name: Chceckout code
uses: actions/checkout@v3
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install Conan
run: sudo pip install conan
- name: Create build dir
run: mkdir build
- name: Cache CMake files
uses: actions/cache@v3
with:
path: build
key: ${{ runner.os }}-msan-${{ hashFiles('*') }}
- name: Load CMake
run: |
cd build
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZER_MEMORY=1
cmake --build .
- name: Run tests
run: |
cd build
ctest
tsan:
name: Thread Sanitizer
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
steps:
- name: Chceckout code
uses: actions/checkout@v3
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install Conan
run: sudo pip install conan
- name: Create build dir
run: mkdir build
- name: Cache CMake files
uses: actions/cache@v3
with:
path: build
key: ${{ runner.os }}-tsan-${{ hashFiles('*') }}
- name: Load CMake
run: |
cd build
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZER_THREAD=1
cmake --build .
- name: Run tests
run: |
cd build
ctest
ubsan:
name: Undefined Behavior Sanitizer
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
steps:
- name: Chceckout code
uses: actions/checkout@v3
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install Conan
run: sudo pip install conan
- name: Create build dir
run: mkdir build
- name: Cache CMake files
uses: actions/cache@v3
with:
path: build
key: ${{ runner.os }}-ubsan-${{ hashFiles('*') }}
- name: Load CMake
run: |
cd build
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZER_UNDEFINED_BEHAVIOR=1
cmake --build .
- name: Run tests
run: |
cd build
ctest --verbose