-
Notifications
You must be signed in to change notification settings - Fork 1.5k
56 lines (45 loc) · 1.51 KB
/
corpus.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
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
name: corpus
on: [pull_request, push]
permissions:
contents: read
jobs:
corpus:
runs-on: ubuntu-22.04
if: ${{ github.repository_owner == 'danmar' }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.workflow }}-${{ runner.os }}
- name: Install missing software on ubuntu
run: |
sudo apt-get update
sudo apt-get install -y fdupes
- name: build testrunner
run: |
store_dir=$(pwd)/store
mkdir $store_dir
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
make -s -j$(nproc) CXXFLAGS="-w -DSTORE_INPUT_DIR=\"\\\"$store_dir\\\"\"" testrunner
- name: run testrunner
run: |
./testrunner -q
- name: de-duplicate files
run: |
ls -l ./store | wc -l
echo "removing duplicates"
fdupes -qdN ./store > /dev/null
ls -l ./store | wc -l
# print biggest size
ls -l ./store | cut -d' ' -f5 | sort -u -n -r | head -n1
# TODO: dedup with fuzzer?
- uses: actions/upload-artifact@v4
if: success()
with:
name: corpus
path: ./store