2
0

sanitizer.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. name: C/C++ Sanitizer
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. permissions:
  8. contents: read # to fetch code (actions/checkout)
  9. jobs:
  10. job1:
  11. name: adress-sanitizer
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v5
  15. - uses: lukka/get-cmake@latest
  16. - uses: lukka/set-shell-env@v1
  17. with:
  18. CXX: clang++
  19. CC: clang
  20. - name: configure and build
  21. uses: lukka/run-cmake@v3
  22. with:
  23. cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
  24. cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
  25. cmakeAppendedArgs: '-GNinja -DCMAKE_BUILD_TYPE=Debug -DASSIMP_ASAN=ON'
  26. buildWithCMakeArgs: '-- -v'
  27. buildDirectory: '${{ github.workspace }}/build/'
  28. - name: test
  29. run: cd build/bin && ./unit
  30. shell: bash
  31. job2:
  32. name: undefined-behavior-sanitizer
  33. runs-on: ubuntu-latest
  34. steps:
  35. - uses: actions/checkout@v5
  36. - uses: lukka/get-cmake@latest
  37. - uses: lukka/set-shell-env@v1
  38. with:
  39. CXX: clang++
  40. CC: clang
  41. - name: configure and build
  42. uses: lukka/run-cmake@v3
  43. with:
  44. cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
  45. cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
  46. cmakeAppendedArgs: '-GNinja -DCMAKE_BUILD_TYPE=Debug -DASSIMP_UBSAN=ON'
  47. buildWithCMakeArgs: '-- -v'
  48. buildDirectory: '${{ github.workspace }}/build/'
  49. - name: test
  50. run: cd build/bin && ./unit
  51. shell: bash
  52. job3:
  53. name: printf-sanitizer
  54. runs-on: ubuntu-latest
  55. steps:
  56. - uses: actions/checkout@v5
  57. - name: run scan_printf script
  58. run: ./scripts/scan_printf.sh
  59. shell: bash