• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: CI
2
3on:
4  push:
5    branches:
6      - stable
7      - dev
8  pull_request:
9    branches:
10      - dev # No need for stable-pull-request, as that equals dev-push
11
12jobs:
13  linux:
14    runs-on: "${{ matrix.os }}"
15    strategy:
16      matrix:
17        os: [ubuntu-22.04, ubuntu-20.04]
18    env:
19      AFL_SKIP_CPUFREQ: 1
20      AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1
21    steps:
22      - uses: actions/checkout@v3
23      - name: update
24        run: sudo apt-get update && sudo apt-get upgrade -y
25      - name: debug
26        run: apt-cache search plugin-dev | grep gcc-; echo; apt-cache search clang-format- | grep clang-format-
27      - name: install packages
28        run: sudo apt-get install -y -m -f build-essential gcc-10 g++-10 git libtool libtool-bin automake flex bison libglib2.0-0 clang-12 llvm-12-dev libc++-dev findutils libcmocka-dev python3-dev python3-setuptools ninja-build python3-pip gcc-10-plugin-dev
29      - name: compiler installed
30        run: gcc -v; echo; clang -v
31      - name: install gcc plugin
32        run: sudo apt-get install -y -m -f --install-suggests $(readlink /usr/bin/gcc)-plugin-dev
33      - name: build afl++
34        run: export NO_NYX=1; export ASAN_BUILD=1; export LLVM_CONFIG=llvm-config-12; make ASAN_BUILD=1 NO_NYX=1 LLVM_CONFIG=llvm-config-12 distrib
35      - name: run tests
36        run: sudo -E ./afl-system-config; make tests
37 # macos:
38 #   runs-on: macOS-latest
39 #   env:
40 #     AFL_MAP_SIZE: 65536
41 #     AFL_SKIP_CPUFREQ: 1
42 #     AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1
43 #   steps:
44 #     - uses: actions/checkout@v3
45 #     - name: install
46 #       run: brew install make gcc llvm
47 #     - name: fix install
48 #       run: cd /usr/local/bin; ln -s gcc-11 gcc; ln -s g++-11 g++; which gcc; gcc -v
49 #     - name: build
50 #       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
51 #     - name: frida
52 #       run: export CC=/usr/local/Cellar/llvm/*/bin/clang; export CXX="$CC"++; cd frida_mode; gmake
53 #     - name: run tests
54 #       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
55 #     - name: force frida test for MacOS
56 #       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
57