Skip to content

cmake: add android configs to presets #80

cmake: add android configs to presets

cmake: add android configs to presets #80

Workflow file for this run

# Copyright (c) Borislav Stanimirov
# SPDX-License-Identifier: MIT
#
name: Unit Test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
name: ${{ matrix.cfg.name }}
runs-on: ${{ matrix.cfg.os }}
strategy:
matrix:
cfg:
# ubuntu sanitize address, undefined, leak, thread
- {name: 'linux gcc dbg s:addr,ub,leak', os: ubuntu-latest, preset: debug-aublsan}
- {name: 'linux gcc rel s:addr', os: ubuntu-latest, preset: release-asan}
- {name: 'linux gcc rel s:thread', os: ubuntu-latest, preset: release-tsan}
# macos - no ub santizer (there are still some apple-specific ub sanitizer issues to fix)
# https://github.com/iboB/dynamix/issues/44
# also no leak sanitizer since it's not supported by apple
- {name: 'mac clang dbg s:addr', os: macos-latest, preset: debug-asan}
- {name: 'mac clang rel s:addr', os: macos-latest, preset: release-asan}
- {name: 'mac clang rel s:thread', os: macos-latest, preset: release-tsan}
# windows sanitize address
- {name: 'win msvc dbg s:addr', os: windows-latest, preset: debug-asan}
- {name: 'win msvc rel s:addr', os: windows-latest, preset: release-asan}
steps:
- name: Clone
uses: actions/checkout@v4
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@v5
- name: VC Vars
# Setup vcvars on Windows
# MSVC's address sanitizer attaches dependencies to several DLLs which are not in PATH
# vcvars will add them to PATH and allow msvc asan executables to run
if: matrix.cfg.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
run: cmake --preset ${{ matrix.cfg.preset }} -B build
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure
env:
# just set this to all configs, it will be used where it matters and ignored otherwise
UBSAN_OPTIONS: halt_on_error=1