Skip to content

Commit 089afed

Browse files
committed
Generate corpora in CI
1 parent 1b840a0 commit 089afed

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,24 @@ jobs:
3434
. ./scripts/fuzz_targets
3535
uv run generate_matrix | tee $GITHUB_OUTPUT
3636
37+
GenerateCorpus:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
42+
with:
43+
repository: curl/curl-fuzzer
44+
- name: Install uv
45+
uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6
46+
- name: Create corpus
47+
run: |
48+
uv run yaml_to_corpus --corpus-dir corpora/ yaml/
49+
- name: Upload corpus
50+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
51+
with:
52+
name: corpus
53+
path: corpora/
54+
3755
BuildFuzzers:
3856
runs-on: ubuntu-latest
3957
steps:
@@ -57,7 +75,7 @@ jobs:
5775
path: fuzz.tar
5876

5977
RunFuzzers:
60-
needs: [ BuildFuzzers, DetermineMatrix ]
78+
needs: [ BuildFuzzers, DetermineMatrix, GenerateCorpus ]
6179
runs-on: ubuntu-latest
6280
strategy:
6381
matrix: ${{ fromJSON(needs.DetermineMatrix.outputs.matrix) }}
@@ -69,6 +87,13 @@ jobs:
6987
run: tar xvf fuzz.tar build-out/${{ matrix.fuzzer }} build-out/${{ matrix.fuzzer }}_seed_corpus.zip
7088
- name: Display extracted files
7189
run: ls -laR build-out/
90+
# Download the corpora directory to the root of the repository
91+
- name: Download corpus
92+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
93+
with:
94+
name: corpus
95+
- name: Show corpus
96+
run: ls -laR corpora/
7297
- name: Run Fuzzer ${{ matrix.fuzzer }}
7398
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
7499
with:

0 commit comments

Comments
 (0)