fuzz-checker.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: Fuzz-checker CI
  2. on: [push]
  3. jobs:
  4. fuzz-checker:
  5. strategy:
  6. fail-fast: false
  7. matrix:
  8. fuzzy: [
  9. {
  10. name: AFL,
  11. config: enable-fuzz-afl no-module,
  12. install: afl++-clang,
  13. cc: afl-clang-fast
  14. }, {
  15. name: libFuzzer,
  16. config: enable-fuzz-libfuzzer -DPEDANTIC enable-asan enable-ubsan,
  17. libs: --with-fuzzer-lib=/usr/lib/llvm-12/lib/libFuzzer.a --with-fuzzer-include=/usr/lib/llvm-12/build/lib/clang/12.0.0/include/fuzzer,
  18. install: libfuzzer-12-dev,
  19. cc: clang-12,
  20. linker: clang++-12,
  21. tests: -test_memleak
  22. }, {
  23. name: libFuzzer+,
  24. config: enable-fuzz-libfuzzer -DPEDANTIC enable-asan enable-ubsan -fsanitize-coverage=trace-cmp -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION,
  25. libs: --with-fuzzer-lib=/usr/lib/llvm-12/lib/libFuzzer.a --with-fuzzer-include=/usr/lib/llvm-12/build/lib/clang/12.0.0/include/fuzzer,
  26. extra: enable-fips enable-ec_nistp_64_gcc_128 -fno-sanitize=alignment enable-tls1_3 enable-weak-ssl-ciphers enable-rc5 enable-md2 enable-ssl3 enable-ssl3-method enable-nextprotoneg,
  27. install: libfuzzer-12-dev,
  28. cc: clang-12,
  29. linker: clang++-12,
  30. tests: -test_memleak
  31. }
  32. ]
  33. runs-on: ubuntu-latest
  34. steps:
  35. - name: install packages
  36. run: |
  37. sudo apt-get update
  38. sudo apt-get -yq --force-yes install ${{ matrix.fuzzy.install }}
  39. - uses: actions/checkout@v2
  40. - name: config
  41. run: |
  42. CC=${{ matrix.fuzzy.cc }} ./config --banner=Configured no-shared \
  43. ${{ matrix.fuzzy.config }} ${{ matrix.fuzzy.libs }} ${{ matrix.fuzzy.extra }}
  44. - name: config dump
  45. run: ./configdata.pm --dump
  46. - name: make with explicit linker
  47. if: matrix.fuzzy.linker != ''
  48. run: LDCMD=${{ matrix.fuzzy.linker }} make -s -j4
  49. - name: make sans explicit linker
  50. if: matrix.fuzzy.linker == ''
  51. run: make -s -j4
  52. - name: make test restricted
  53. if: matrix.fuzzy.tests != ''
  54. run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} TESTS="${{ matrix.fuzzy.tests }}"
  55. - name: make test all
  56. if: matrix.fuzzy.tests == ''
  57. run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}