5cbd3f29e3
Fuzz / Run fuzz harnesses (${{ github.event_name == 'schedule' && 'nightly' || 'smoke' }}) (push) Has been cancelled
Create Releases / call-mac (push) Has been cancelled
Create Releases / call-linux (push) Has been cancelled
Create Releases / call-sdist (push) Has been cancelled
Create Releases / call-win (push) Has been cancelled
Create Releases / call-pyodide (push) Has been cancelled
Windows_No_Exception_CI / build (x64, 3.10) (push) Has been cancelled
Check URLs / build (push) Has been cancelled
Create Releases / Attest CI build artifacts (push) Has been cancelled
Create Releases / Check for Publish release build to pypi (push) Has been cancelled
Create Releases / Check for Publish preview build to test.pypi-weekly (push) Has been cancelled
Create Releases / Publish preview build to test.pypi-weekly (push) Has been cancelled
Create Releases / Check for Publish release build to test.pypi (rc-candidates) (push) Has been cancelled
Create Releases / Publish release build to test.pypi (push) Has been cancelled
Create Releases / Check for Publish preview build to pypi-weekly (push) Has been cancelled
Create Releases / Publish preview build to pypi-weekly (push) Has been cancelled
Create Releases / Publish release build to pypi (push) Has been cancelled
Create Releases / test source distribution (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
Lint / Validate SBOM (push) Has been cancelled
Lint / Enforce style (push) Has been cancelled
CI / Test windows-2022, 3.14, External, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test windows-latest, 3.10, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test windows-latest, 3.14, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test windows-latest, 3.14t, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test ubuntu-24.04, 3.14, Internal, debug=1, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test ubuntu-24.04, 3.14, External, debug=0, unity_build=1, onnx_ml=1, autogen=1 (push) Has been cancelled
CI / Test ubuntu-24.04, 3.14, External, debug=0, unity_build=0, onnx_ml=0, autogen=0 (push) Has been cancelled
CI / Test macos-latest, 3.10, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test macos-latest, 3.14, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test macos-latest, 3.14t, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test ubuntu-24.04, 3.14, External, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test ubuntu-24.04, 3.10, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test ubuntu-24.04, 3.14, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test ubuntu-24.04, 3.14t, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
Pixi CI / Install and lint (ubuntu-24.04-arm) (push) Has been cancelled
Pixi CI / Install and lint (windows-2022) (push) Has been cancelled
Pixi CI / Xcode generator build (push) Has been cancelled
Pixi CI / Install and test (macos-latest, default) (push) Has been cancelled
Pixi CI / Install and test (ubuntu-24.04-arm, default) (push) Has been cancelled
Pixi CI / Install and test (ubuntu-latest, default) (push) Has been cancelled
Pixi CI / Install and test (windows-2022, default) (push) Has been cancelled
Pixi CI / Install and test (macos-latest, oldies) (push) Has been cancelled
Pixi CI / Install and test (ubuntu-24.04-arm, oldies) (push) Has been cancelled
Pixi CI / Install and test (ubuntu-latest, oldies) (push) Has been cancelled
Pixi CI / Install and test (windows-2022, oldies) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Copilot Setup Steps / copilot-setup-steps (push) Has been cancelled
Generate and publish ONNX docs / build (push) Has been cancelled
Generate and publish ONNX docs / deploy (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
130 lines
4.4 KiB
YAML
130 lines
4.4 KiB
YAML
# Copyright (c) ONNX Project Contributors
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Runs the OSS-Fuzz harnesses under onnx/fuzz/ directly (not via OSS-Fuzz
|
|
# infrastructure) as a regression check. This is deliberately not a
|
|
# replacement for OSS-Fuzz's own continuous, long-running campaigns
|
|
# (see google/oss-fuzz#15382) — it exists to catch harness regressions
|
|
# (import errors, API drift, a harness file going missing) at PR time
|
|
# instead of silently, since OSS-Fuzz failures are not surfaced here.
|
|
#
|
|
# atheris only ships wheels for Linux and macOS, so this does not run on
|
|
# Windows. See https://github.com/onnx/onnx/blob/main/onnx/fuzz/README.md
|
|
# for the harness/toggle-byte details.
|
|
|
|
name: Fuzz
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'onnx/**'
|
|
- 'pyproject.toml'
|
|
- '.github/workflows/fuzz.yml'
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'onnx/**'
|
|
- 'pyproject.toml'
|
|
- '.github/workflows/fuzz.yml'
|
|
schedule:
|
|
- cron: '0 6 * * *' # nightly: run each harness for longer than the PR smoke test
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
fuzz:
|
|
name: Run fuzz harnesses (${{ github.event_name == 'schedule' && 'nightly' || 'smoke' }})
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
submodules: recursive
|
|
persist-credentials: false
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Build and install ONNX
|
|
run: pip install -e ".[reference]" -v
|
|
env:
|
|
ONNX_ML: 1
|
|
|
|
- name: Install atheris
|
|
run: pip install atheris
|
|
|
|
- name: Generate seed corpora
|
|
run: |
|
|
mkdir -p corpus
|
|
python onnx/fuzz/make_seed_corpus.py \
|
|
corpus/version_converter.zip corpus/parser.zip \
|
|
corpus/checker.zip corpus/shape_inference.zip corpus/compose.zip
|
|
for name in version_converter parser checker shape_inference compose; do
|
|
mkdir -p "corpus/$name"
|
|
python -m zipfile -e "corpus/$name.zip" "corpus/$name/"
|
|
done
|
|
# fuzz_model_loader.py has no dedicated seeds; it exercises the same
|
|
# load+check path as fuzz_checker.py, so reuse that corpus.
|
|
mkdir -p corpus/model_loader
|
|
cp corpus/checker/* corpus/model_loader/
|
|
|
|
- name: Set fuzz duration
|
|
id: duration
|
|
run: |
|
|
if [ "${{ github.event_name }}" = "schedule" ]; then
|
|
echo "seconds=300" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "seconds=60" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Run fuzz_checker.py
|
|
run: python onnx/fuzz/fuzz_checker.py -max_total_time="$FUZZ_SECONDS" -timeout=20 corpus/checker
|
|
env:
|
|
FUZZ_SECONDS: ${{ steps.duration.outputs.seconds }}
|
|
|
|
- name: Run fuzz_model_loader.py
|
|
run: python onnx/fuzz/fuzz_model_loader.py -max_total_time="$FUZZ_SECONDS" -timeout=20 corpus/model_loader
|
|
env:
|
|
FUZZ_SECONDS: ${{ steps.duration.outputs.seconds }}
|
|
|
|
- name: Run fuzz_parser.py
|
|
run: python onnx/fuzz/fuzz_parser.py -max_total_time="$FUZZ_SECONDS" -timeout=20 corpus/parser
|
|
env:
|
|
FUZZ_SECONDS: ${{ steps.duration.outputs.seconds }}
|
|
|
|
- name: Run fuzz_shape_inference.py
|
|
run: python onnx/fuzz/fuzz_shape_inference.py -max_total_time="$FUZZ_SECONDS" -timeout=20 corpus/shape_inference
|
|
env:
|
|
FUZZ_SECONDS: ${{ steps.duration.outputs.seconds }}
|
|
|
|
- name: Run fuzz_version_converter.py
|
|
run: python onnx/fuzz/fuzz_version_converter.py -max_total_time="$FUZZ_SECONDS" -timeout=20 corpus/version_converter
|
|
env:
|
|
FUZZ_SECONDS: ${{ steps.duration.outputs.seconds }}
|
|
|
|
- name: Run fuzz_compose.py
|
|
run: python onnx/fuzz/fuzz_compose.py -max_total_time="$FUZZ_SECONDS" -timeout=20 corpus/compose
|
|
env:
|
|
FUZZ_SECONDS: ${{ steps.duration.outputs.seconds }}
|
|
|
|
- name: Upload crash artifacts
|
|
if: failure()
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: fuzz-crashes
|
|
path: |
|
|
crash-*
|
|
timeout-*
|
|
oom-*
|
|
if-no-files-found: ignore
|