blob: 0cdf1864bbc7cdb507cd81cd9d1fc774ae206102 [file] [edit]
# Copyright 2021-2026 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
name: CIFuzz
on:
schedule:
- cron: '50 01 * * *'
workflow_dispatch:
inputs:
pr:
description: 'Internal: openssl-ci-bot PR number. Leave empty for a normal manual run.'
required: false
type: string
head_sha:
description: 'Internal: openssl-ci-bot commit SHA. Leave empty for a normal manual run.'
required: false
type: string
check_run_id:
description: 'Internal: openssl-ci-bot check-run ID. Leave empty for a normal manual run.'
required: false
type: string
# Keep in sync with openssl-ci-bot's run-name parser, and with the Actions statistics
# collector that attributes CI load by parsing this same string. Both break silently.
run-name: >-
${{ github.event.inputs.pr && format('ci-dispatch pr={0} head={1} check_run_id={2}', github.event.inputs.pr, github.event.inputs.head_sha, github.event.inputs.check_run_id) || github.workflow }}
concurrency:
group: ${{ github.workflow }}-${{ github.event.inputs.pr || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
# Only a dispatch carries inputs, so this is skipped on the nightly cron.
validate-dispatch-inputs:
if: inputs.pr != '' || inputs.head_sha != '' || inputs.check_run_id != ''
uses: ./.github/workflows/validate-dispatch-inputs.yml
with:
pr: ${{ inputs.pr }}
head_sha: ${{ inputs.head_sha }}
check_run_id: ${{ inputs.check_run_id }}
Fuzzing:
needs: [validate-dispatch-inputs]
if: >-
(github.event_name != 'schedule' || github.repository == 'openssl/openssl') &&
!cancelled() &&
(needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
runs-on: ubuntu-latest
steps:
- name: Clear unnecessary files
run: |
df
sudo rm -rf /usr/share/dotnet /usr/share/swift /usr/local/.ghcup /usr/local/share/powershell /usr/local/share/chromium /usr/local/lib/android /usr/local/lib/node_modules
df
- uses: actions/checkout@v6
with:
persist-credentials: false
ref: ${{ github.event.inputs.head_sha || github.sha }}
- name: Build Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'openssl'
project-src-path: ${{ github.workspace }}
dry-run: false
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'openssl'
project-src-path: ${{ github.workspace }}
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v5
if: failure()
with:
name: artifacts
path: ./out/artifacts