chore(deps): update github actions: artifact #146
This file contains 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: | |
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@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4 | |
with: | |
name: fuzz_tar | |
path: fuzz.tar | |
RunFuzzers: | |
needs: BuildFuzzers | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
fuzzer: | |
- curl_fuzzer_bufq | |
- curl_fuzzer_dict | |
- curl_fuzzer_file | |
- curl_fuzzer_ftp | |
- curl_fuzzer_gopher | |
- curl_fuzzer_http | |
- curl_fuzzer_https | |
- curl_fuzzer_imap | |
- curl_fuzzer_mqtt | |
- curl_fuzzer_pop3 | |
- curl_fuzzer_rtsp | |
- curl_fuzzer_smb | |
- curl_fuzzer_smtp | |
- curl_fuzzer_tftp | |
- curl_fuzzer_ws | |
- curl_fuzzer | |
- fuzz_url | |
steps: | |
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # 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@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4 | |
if: failure() | |
with: | |
name: artifacts | |
path: ./out/artifacts |