• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Project tests
2
3on:
4  pull_request:
5    branches:
6    - master
7
8jobs:
9  build:
10    runs-on: ubuntu-latest
11    strategy:
12      fail-fast: false
13      matrix:
14        engine:
15          - libfuzzer
16        sanitizer:
17          - address
18          - memory
19          - undefined
20          - coverage
21        architecture:
22          - x86_64
23        include:
24          - engine: afl
25            sanitizer: address
26            architecture: x86_64
27          - engine: honggfuzz
28            sanitizer: address
29            architecture: x86_64
30          - engine: libfuzzer
31            sanitizer: address
32            architecture: i386
33          - engine: none
34            sanitizer: address
35            architecture: x86_64
36          - engine: dataflow
37            sanitizer: dataflow
38            architecture: x86_64
39    env:
40      ENGINE: ${{ matrix.engine }}
41      SANITIZER: ${{ matrix.sanitizer }}
42      ARCHITECTURE: ${{ matrix.architecture }}
43
44    steps:
45      - name: Cancel previous
46        uses: styfle/cancel-workflow-action@0.8.0
47        with:
48          access_token: ${{ github.token }}
49
50      - uses: actions/checkout@v2
51        with:  # Needed for git diff to work. (get_changed_files)
52          fetch-depth: 0
53      - run: |
54          git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master
55
56      - name: Clear unnecessary files
57        run: |
58          sudo swapoff -a
59          sudo rm -f /swapfile
60          sudo apt clean
61          docker rmi $(docker images -a -q)
62          df -h
63
64      - name: Setup python environment
65        uses: actions/setup-python@v2
66        with:
67          python-version: 3.8
68
69      - name: Install dependencies
70        run: |
71          python -m pip install --upgrade pip
72          pip install -r infra/ci/requirements.txt
73
74      - name: Run project tests
75        run: python infra/ci/build.py
76