2020-04-28 18:32:55 +00:00
|
|
|
name: C/C++ Sanitizer
|
2020-04-28 18:30:59 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
2022-09-19 21:32:11 +00:00
|
|
|
permissions:
|
|
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
|
2020-04-28 18:30:59 +00:00
|
|
|
jobs:
|
|
|
|
job1:
|
|
|
|
name: adress-sanitizer
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-06 07:37:31 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-04-28 18:30:59 +00:00
|
|
|
- uses: lukka/get-cmake@latest
|
|
|
|
- uses: lukka/set-shell-env@v1
|
|
|
|
with:
|
|
|
|
CXX: clang++
|
|
|
|
CC: clang
|
|
|
|
|
|
|
|
- name: configure and build
|
2023-06-22 19:43:52 +00:00
|
|
|
uses: lukka/run-cmake@v3
|
2020-04-28 18:30:59 +00:00
|
|
|
with:
|
|
|
|
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
|
|
|
|
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
|
2020-04-28 19:11:21 +00:00
|
|
|
cmakeAppendedArgs: '-GNinja -DCMAKE_BUILD_TYPE=Debug -DASSIMP_ASAN=ON'
|
2020-04-28 18:30:59 +00:00
|
|
|
buildWithCMakeArgs: '-- -v'
|
|
|
|
buildDirectory: '${{ github.workspace }}/build/'
|
|
|
|
|
|
|
|
- name: test
|
|
|
|
run: cd build/bin && ./unit
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
job2:
|
|
|
|
name: undefined-behavior-sanitizer
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-06 07:37:31 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-04-28 18:30:59 +00:00
|
|
|
- uses: lukka/get-cmake@latest
|
|
|
|
- uses: lukka/set-shell-env@v1
|
|
|
|
with:
|
|
|
|
CXX: clang++
|
|
|
|
CC: clang
|
|
|
|
|
|
|
|
- name: configure and build
|
2023-06-22 19:43:52 +00:00
|
|
|
uses: lukka/run-cmake@v3
|
2020-04-28 18:30:59 +00:00
|
|
|
with:
|
|
|
|
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
|
|
|
|
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
|
2020-04-29 11:41:40 +00:00
|
|
|
cmakeAppendedArgs: '-GNinja -DCMAKE_BUILD_TYPE=Debug -DASSIMP_UBSAN=ON'
|
2020-04-28 18:30:59 +00:00
|
|
|
buildWithCMakeArgs: '-- -v'
|
|
|
|
buildDirectory: '${{ github.workspace }}/build/'
|
|
|
|
|
|
|
|
- name: test
|
|
|
|
run: cd build/bin && ./unit
|
|
|
|
shell: bash
|
2023-03-04 13:27:58 +00:00
|
|
|
|
|
|
|
job3:
|
|
|
|
name: printf-sanitizer
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: run scan_printf script
|
|
|
|
run: ./scripts/scan_printf.sh
|
|
|
|
shell: bash
|