-
Notifications
You must be signed in to change notification settings - Fork 30
84 lines (79 loc) · 2.31 KB
/
ci.yml
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
76
77
78
79
80
81
82
83
84
name: CI
'on':
push:
branches:
- master
- main
- '*/ci'
pull_request:
branches:
- master
- main
# This makes the workflow callable by curl/curl
workflow_call: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
BuildFuzzers:
runs-on: ubuntu-latest
steps:
# Use the CIFuzz job to test the repository.
- name: Build Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'curl'
dry-run: false
keep-unaffected-fuzz-targets: true
# Archive the fuzzer output (which maintains permissions)
- name: Create fuzz tar
run: tar cvf fuzz.tar build-out/
# Upload the fuzzer output
- name: Archive fuzz tar
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4
with:
name: fuzz_tar
path: fuzz.tar
RunFuzzers:
needs: BuildFuzzers
runs-on: ubuntu-latest
strategy:
matrix:
fuzzer:
- curl_fuzzer_bufq
- curl_fuzzer_dict
- curl_fuzzer_file
- curl_fuzzer_ftp
- curl_fuzzer_gopher
- curl_fuzzer_http
- curl_fuzzer_https
- curl_fuzzer_imap
- curl_fuzzer_mqtt
- curl_fuzzer_pop3
- curl_fuzzer_rtsp
- curl_fuzzer_smb
- curl_fuzzer_smtp
- curl_fuzzer_tftp
- curl_fuzzer_ws
- curl_fuzzer
- fuzz_url
steps:
- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4
with:
name: fuzz_tar
- name: Unpack fuzzer ${{ matrix.fuzzer }}
run: tar xvf fuzz.tar build-out/${{ matrix.fuzzer }} build-out/${{ matrix.fuzzer }}_seed_corpus.zip
- name: Display extracted files
run: ls -laR build-out/
- name: Run Fuzzer ${{ matrix.fuzzer }}
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'curl'
fuzz-seconds: 120
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4
if: failure()
with:
name: artifacts
path: ./out/artifacts