-
Notifications
You must be signed in to change notification settings - Fork 21
70 lines (64 loc) · 2.15 KB
/
test.yml
File metadata and controls
70 lines (64 loc) · 2.15 KB
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
name: Tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: [self-hosted]
timeout-minutes: 150
strategy:
matrix:
include:
# Enable this once we have more self-hosted runners
# - name: aflpp
# context: .
# file: ./Dockerfile
# scenario-name: http-server
# tag: fuzzamoto:ci
# justfile-name: scenario-http-server.justfile
- name: libafl
context: .
file: ./Dockerfile.libafl
scenario-name: ir
tag: fuzzamoto-libafl:ci
justfile-name: libafl.justfile
steps:
- name: Clean-up old files
run: |
rm -rf /output && rm -rf /corpus
docker rm -f $(docker ps -aq) 2>/dev/null || true
docker system prune -af --volumes
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image - ${{ matrix.name }}
uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
file: ${{ matrix.file }}
push: false # build only - don't push to registry
load: true
tags: ${{ matrix.tag }}
platforms: linux/amd64
- name: Run checks
run: |
rm -rf /output && mkdir /output
docker run --privileged -v ./:/fuzzamoto -v /corpus:/tmp/out ${{ matrix.tag }} just -f /ci/${{ matrix.justfile-name }} test
- name: Build coverage image
run: |
docker build -t fuzzamoto-coverage -f Dockerfile.coverage .
- name: Run coverage
run: |
docker run --privileged -v /output:/mnt/output -v /corpus/cpu_000/queue:/mnt/corpus fuzzamoto-coverage /fuzzamoto/target/release/scenario-${{ matrix.scenario-name }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: coverage-artifact-${{ matrix.name }}
path: /output
retention-days: 1