fuzz-checker.yml 2.7 KB
Newer Older
M
Matt Caswell 已提交
1
# Copyright 2021-2023 The OpenSSL Project Authors. All Rights Reserved.
P
Pauli 已提交
2 3 4 5 6 7
#
# Licensed under the Apache License 2.0 (the "License").  You may not use
# this file except in compliance with the License.  You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html

8 9 10 11
name: Fuzz-checker CI

on: [push]

12 13 14
permissions:
  contents: read

15 16 17 18 19 20 21 22 23 24 25
jobs:
  fuzz-checker:
    strategy:
      fail-fast: false
      matrix:
        fuzzy: [
          {
            name: AFL,
            config: enable-fuzz-afl no-module,
            install: afl++-clang,
            cc: afl-clang-fast
26
            tests: -
27 28
          }, {
            name: libFuzzer,
29
            config: enable-fuzz-libfuzzer enable-asan enable-ubsan,
30
            libs: --with-fuzzer-lib=/usr/lib/llvm-12/lib/libFuzzer.a --with-fuzzer-include=/usr/include/clang/12/include/fuzzer,
31 32 33 34 35 36
            install: libfuzzer-12-dev,
            cc: clang-12,
            linker: clang++-12,
            tests: -test_memleak
          }, {
            name: libFuzzer+,
37
            config: enable-fuzz-libfuzzer enable-asan enable-ubsan -fsanitize-coverage=trace-cmp -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION,
38
            libs: --with-fuzzer-lib=/usr/lib/llvm-12/lib/libFuzzer.a --with-fuzzer-include=/usr/include/clang/12/include/fuzzer,
39 40 41 42 43 44 45 46 47 48 49 50 51
            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,
            install: libfuzzer-12-dev,
            cc: clang-12,
            linker: clang++-12,
            tests: -test_memleak
          }
        ]
    runs-on: ubuntu-latest
    steps:
    - name: install packages
      run: |
        sudo apt-get update
        sudo apt-get -yq --force-yes install ${{ matrix.fuzzy.install }}
52
    - uses: actions/checkout@v4
53 54 55 56 57 58 59 60 61 62 63 64 65 66

    - name: config
      run: |
        CC=${{ matrix.fuzzy.cc }} ./config --banner=Configured no-shared \
            ${{ matrix.fuzzy.config }} ${{ matrix.fuzzy.libs }} ${{ matrix.fuzzy.extra }}

    - name: config dump
      run: ./configdata.pm --dump
    - name: make with explicit linker
      if: matrix.fuzzy.linker != ''
      run: LDCMD=${{ matrix.fuzzy.linker }} make -s -j4
    - name: make sans explicit linker
      if: matrix.fuzzy.linker == ''
      run: make -s -j4
67 68 69 70
    - name: get cpu info
      run: |
        cat /proc/cpuinfo
        ./util/opensslwrap.sh version -c
71 72 73 74 75 76
    - name: make test restricted
      if: matrix.fuzzy.tests != ''
      run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} TESTS="${{ matrix.fuzzy.tests }}"
    - name: make test all
      if: matrix.fuzzy.tests == ''
      run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}