Skip to content

chore(deps): update github actions: artifact (major) (#234) #643

chore(deps): update github actions: artifact (major) (#234)

chore(deps): update github actions: artifact (major) (#234) #643

Workflow file for this run

# Workflow used by curl/curl
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
permissions: {}
jobs:
DetermineMatrix:
name: 'Determine matrix'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
repository: curl/curl-fuzzer
- name: Set matrix
id: set-matrix
run: |
. ./scripts/fuzz_targets
cd src/curl_fuzzer_tools
python3 -m generate_matrix | tee $GITHUB_OUTPUT
BuildFuzzers:
name: 'Build fuzzers'
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 # zizmor: ignore[unpinned-uses]
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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: fuzz_tar
path: fuzz.tar
RunFuzzers:
name: 'Run fuzzers'
needs: [BuildFuzzers, DetermineMatrix]
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.DetermineMatrix.outputs.matrix) }}
steps:
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: fuzz_tar
- name: Unpack fuzzer ${{ matrix.fuzzer }}
env:
MATRIX_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 # zizmor: ignore[unpinned-uses]
with:
oss-fuzz-project-name: 'curl'
fuzz-seconds: 120
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: ${{ failure() }}
with:
name: artifacts
path: ./out/artifacts