ctest: fix asan on msvc #34
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
name: CI | |
on: | |
pull_request: | |
push: | |
jobs: | |
meson-build-and-tests: | |
runs-on: ${{ matrix.platform }} | |
name: ${{ matrix.platform }}, ${{ matrix.mode.name }} ${{ matrix.flavor }} | |
strategy: | |
fail-fast: false | |
matrix: | |
flavor: | |
- debug | |
- release | |
mode: | |
- name: default | |
args: -Dtests=enabled | |
extra_envs: {} | |
- name: sanitize | |
args: >- | |
"-Db_sanitize=address,undefined" | |
extra_envs: {} | |
- name: sanitize+asanonly # For Visual Studio | |
args: -Db_sanitize=address | |
extra_envs: {} | |
- name: clang+sanitize | |
args: >- | |
"-Db_sanitize=address,undefined" | |
extra_envs: | |
CC: clang | |
CXX: clang++ | |
- name: clang-cl+sanitize | |
args: >- | |
"-Db_sanitize=address,undefined" | |
extra_envs: | |
CC: clang-cl | |
CXX: clang-cl | |
- name: clang+msan | |
args: -Db_sanitize=memory | |
extra_envs: | |
CC: clang | |
CXX: clang++ | |
- name: clang-cl+msan | |
args: -Db_sanitize=memory | |
extra_envs: | |
CC: clang-cl | |
CXX: clang-cl | |
platform: | |
- macos-latest | |
- windows-2022 | |
- ubuntu-22.04 | |
exclude: | |
# clang-cl | |
- platform: ubuntu-22.04 | |
mode: | |
name: clang-cl+sanitize | |
- platform: macos-latest | |
mode: | |
name: clang-cl+sanitize | |
- platform: windows-2022 | |
mode: | |
name: clang+sanitize | |
- platform: ubuntu-22.04 | |
mode: | |
name: clang-cl+msan | |
- platform: macos-latest | |
mode: | |
name: clang-cl+msan | |
- platform: windows-2022 | |
mode: | |
name: clang+msan | |
# msvc | |
- platform: ubuntu-22.04 | |
mode: | |
name: sanitize+asanonly | |
- platform: macos-latest | |
mode: | |
name: sanitize+asanonly | |
- platform: windows-2022 | |
mode: | |
name: sanitize | |
# default is clang | |
- platform: macos-latest | |
mode: | |
name: clang+sanitize | |
# msan unsupported | |
- platform: macos-latest | |
mode: | |
name: clang+msan | |
steps: | |
- name: Setup meson | |
run: | | |
pipx install meson ninja | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Activate MSVC and Configure | |
if: ${{ matrix.platform == 'windows-2022' }} | |
env: ${{ matrix.mode.extra_envs }} | |
run: | | |
meson setup build-${{ matrix.flavor }} --buildtype=${{ matrix.flavor }} ${{ matrix.mode.args }} --vsenv | |
- name: Configuring | |
if: ${{ matrix.platform != 'windows-2022' }} | |
env: ${{ matrix.mode.extra_envs }} | |
run: | | |
meson setup build-${{ matrix.flavor }} --buildtype=${{ matrix.flavor }} ${{ matrix.mode.args }} | |
- name: Building | |
run: | | |
meson compile -C build-${{ matrix.flavor }} | |
- name: Running tests | |
run: | | |
meson test -C build-${{ matrix.flavor }} --timeout-multiplier 5 | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ${{ matrix.platform }}-${{ matrix.mode.name }}-${{ matrix.flavor }}-logs | |
path: build-${{ matrix.flavor }}/meson-logs |