Skip to content

ci: Enable AddressSanitizer in Ubuntu workflow #1801

ci: Enable AddressSanitizer in Ubuntu workflow

ci: Enable AddressSanitizer in Ubuntu workflow #1801

Workflow file for this run

name: C/C++ CI Ubuntu
on: [push]
jobs:
build-in-ubuntu:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
/var/cache/apt
/var/lib/apt/lists
${{ github.workspace }}/build/bin/Db*.solutions
key: ${{ runner.os }}-apt-${{ hashFiles('**/ubuntu.yml') }}
restore-keys: |
${{ runner.os }}-apt-
- name: OS prerequisites
run: sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt upgrade -y && sudo apt install -y libboost1.83-all-dev libxss-dev libx11-dev libxcb-screensaver0-dev ocl-icd-opencl-dev libopengl-dev freeglut3-dev libleveldb-dev libsnappy-dev libvulkan-dev liblz4-dev libfmt-dev librocksdb-dev libpython3-all-dev libopencl-clang-dev libtbb-dev ninja-build
- name: Create Build Dir
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure
working-directory: ${{github.workspace}}/build
run: cmake ${{github.workspace}} -DOPENMIND_BUILD_SAMPLES=OFF -DOPENMIND_BUILD_TESTS=ON -DOPENMIND_USE_OPENCL=OFF -DENABLE_ASAN=ON -DCMAKE_BUILD_TYPE=Debug -G "Ninja Multi-Config"
# - name: Install prerequisites
# working-directory: ${{github.workspace}}/build
# run: cmake --build ${{github.workspace}}/build --target prerequisites -j `nproc`
# - name: ReConfigure to detect fetched prerequisites
# working-directory: ${{github.workspace}}/build
# run: cmake ${{github.workspace}}
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build ${{github.workspace}}/build -j `nproc` --config Debug
- name: Check
working-directory: ${{github.workspace}}/build
run: ctest . -j`nproc` -C Debug -E "ts" --rerun-failed --output-on-failure
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build ${{github.workspace}}/build -j `nproc` --config Release
- name: Check
working-directory: ${{github.workspace}}/build
run: ctest . -j`nproc` -C Release -E "ts" --rerun-failed --output-on-failure