-
Notifications
You must be signed in to change notification settings - Fork 6
65 lines (61 loc) · 1.94 KB
/
fuzz.yml
File metadata and controls
65 lines (61 loc) · 1.94 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
name: Fuzz (nightly)
# Job execution time - Each job in a workflow can run for up to 6 hours of execution time. If a job reaches this limit, the job is terminated and fails to complete.
#
# Workflow run time - Each workflow run is limited to 72 hours. If a workflow run reaches this limit, the workflow run is cancelled.
on:
push:
branches:
- fuzz
schedule:
# run at the start of every 4 hours.
- cron: '0 */4 * * *'
jobs:
fuzz:
runs-on: ubuntu-20.04
env:
# 4 hours in sec
FUZZ_TIMEOUT: 14400
CC: clang
CXX: clang++
VBK_FUZZ_CORPUS_DIR: ${{ github.workspace }}/fuzz-corpus
steps:
- name: checkout alt-cpp
uses: actions/checkout@v2
- name: checkout fuzz-corpus
uses: actions/checkout@v2
with:
repository: VeriBlock/fuzz-corpus
path: ${{ github.workspace }}/fuzz-corpus
token: ${{ secrets.FUZZ_CORPUS_SECRET }}
- name: update apt-get
run: sudo apt-get update
- name: install new cmake
run: |
sudo apt-get install -y python3 python3-pip
pip3 install cmake
- name: cmake
run: >
cmake . \
-Bbuild \
-DTESTING=OFF \
-DFUZZING=ON \
-DCMAKE_BUILD_TYPE=Release \
-DFUZZ_TIMEOUT=${FUZZ_TIMEOUT}
- name: build
run: cmake --build build -- -j2 fuzz
- name: Pull latest corpus
if: always()
run: |
cd ${{ github.workspace }}/fuzz-corpus
git config pull.rebase true
git stash || true
git fetch || true
git pull || true
git merge --squash --strategy-option=theirs stash || true
- name: commit corpus
if: always()
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_changes: Update corpus ${{ github.sha }}
branch: master
repository: ${{ github.workspace }}/fuzz-corpus