aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/project_tests.yml
blob: 4d5e4f02a54a1b3fb1aec7afbdb4f6e7d555971f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Project tests

on:
  pull_request:
    branches:
    - master

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        engine:
          - libfuzzer
        sanitizer:
          - address
          - memory
          - undefined
          - coverage
        architecture:
          - x86_64
        include:
          - engine: afl
            sanitizer: address
            architecture: x86_64
          - engine: honggfuzz
            sanitizer: address
            architecture: x86_64
          - engine: libfuzzer
            sanitizer: address
            architecture: i386
          - engine: none
            sanitizer: address
            architecture: x86_64
          - engine: dataflow
            sanitizer: dataflow
            architecture: x86_64
    env:
      ENGINE: ${{ matrix.engine }}
      SANITIZER: ${{ matrix.sanitizer }}
      ARCHITECTURE: ${{ matrix.architecture }}

    steps:
      - name: Cancel previous
        uses: styfle/cancel-workflow-action@0.8.0
        with:
          access_token: ${{ github.token }}

      - uses: actions/checkout@v2
        with:  # Needed for git diff to work. (get_changed_files)
          fetch-depth: 0
      - run: |
          git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master

      - name: Clear unnecessary files
        run: |
          sudo swapoff -a
          sudo rm -f /swapfile
          sudo apt clean
          docker rmi $(docker images -a -q)
          df -h

      - name: Setup python environment
        uses: actions/setup-python@v2
        with:
          python-version: 3.8

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r infra/ci/requirements.txt

      - name: Run project tests
        run: python infra/ci/build.py