Add ldap support to curl fuzzer #341
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
DetermineMatrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
repository: curl/curl-fuzzer | |
- name: Install uv | |
uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6 | |
- name: Set matrix | |
id: set-matrix | |
run: | | |
. ./scripts/fuzz_targets | |
uv run generate_matrix | tee $GITHUB_OUTPUT | |
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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
with: | |
name: fuzz_tar | |
path: fuzz.tar | |
RunFuzzers: | |
needs: [ BuildFuzzers, DetermineMatrix ] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: ${{ fromJSON(needs.DetermineMatrix.outputs.matrix) }} | |
steps: | |
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
if: failure() | |
with: | |
name: artifacts | |
path: ./out/artifacts | |
Mainline: | |
strategy: | |
matrix: | |
sanitizer: | |
- address | |
- memory | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
repository: curl/curl-fuzzer | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake clang | |
- name: Compile mainline | |
run: | | |
./mainline.sh | |
env: | |
# test with different "sanitizers" | |
SANITIZER: ${{ matrix.sanitizer }} | |
just_dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
repository: curl/curl-fuzzer | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake clang | |
- name: Compile deps target | |
run: ./scripts/compile_target.sh deps | |
# Ensure that the repository can be built for i386 | |
Testi386: | |
runs-on: ubuntu-latest | |
steps: | |
- 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 | |
architecture: 'i386' |