1name: CI 2 3on: 4 push: 5 branches: [ stable, dev ] 6 pull_request: 7 branches: [ stable, dev ] 8 9jobs: 10 linux: 11 runs-on: '${{ matrix.os }}' 12 strategy: 13 matrix: 14 os: [ubuntu-20.04, ubuntu-18.04] 15 env: 16 AFL_SKIP_CPUFREQ: 1 17 AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1 18 steps: 19 - uses: actions/checkout@v2 20 - name: debug 21 run: apt-cache search plugin-dev | grep gcc-; echo; apt-cache search clang-format- | grep clang-format- 22 - name: update 23 run: sudo apt-get update && sudo apt-get upgrade -y 24 - name: install packages 25 run: sudo apt-get install -y -m -f --install-suggests build-essential git libtool libtool-bin automake bison libglib2.0-0 clang llvm-dev libc++-dev findutils libcmocka-dev python3-dev python3-setuptools ninja-build 26 - name: compiler installed 27 run: gcc -v; echo; clang -v 28 - name: install gcc plugin 29 run: sudo apt-get install -y -m -f --install-suggests $(readlink /usr/bin/gcc)-plugin-dev 30 - name: build afl++ 31 run: make distrib ASAN_BUILD=1 32 - name: run tests 33 run: sudo -E ./afl-system-config; make tests 34 macos: 35 runs-on: macOS-latest 36 env: 37 AFL_MAP_SIZE: 65536 38 AFL_SKIP_CPUFREQ: 1 39 AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1 40 steps: 41 - uses: actions/checkout@v2 42 - name: install 43 run: brew install make gcc 44 - name: fix install 45 run: cd /usr/local/bin; ln -s gcc-11 gcc; ln -s g++-11 g++; which gcc; gcc -v 46 - name: build 47 run: export PATH=/usr/local/Cellar/llvm/*/":$PATH"; export CC=/usr/local/Cellar/llvm/*/bin/clang; export CXX="$CC"++; export LLVM_CONFIG=/usr/local/Cellar/llvm/*/bin/llvm-config; sudo -E ./afl-system-config; gmake ASAN_BUILD=1 48 - name: frida 49 run: export CC=/usr/local/Cellar/llvm/*/bin/clang; export CXX="$CC"++; cd frida_mode; gmake 50 - name: run tests 51 run: sudo -E ./afl-system-config; export CC=/usr/local/Cellar/llvm/*/bin/clang; export CXX="$CC"++; export PATH=/usr/local/Cellar/llvm/*/":/usr/local/bin:$PATH"; export LLVM_CONFIG=/usr/local/Cellar/llvm/*/bin/llvm-config; gmake tests 52 - name: force frida test for MacOS 53 run: export AFL_PATH=`pwd`; /usr/local/bin/gcc -o test-instr test-instr.c; mkdir in; echo > in/in; AFL_NO_UI=1 ./afl-fuzz -O -i in -o out -V 5 -- ./test-instr 54