Files
wehub-resource-sync 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
chore: import upstream snapshot with attribution
2026-07-13 12:41:19 +08:00

181 lines
5.4 KiB
TOML

# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
[workspace]
authors = ["ONNX Contributors <onnx-technical-discuss@lists.lfaidata.foundation>"]
channels = ["conda-forge"]
description = "Open Neural Network Exchange"
name = "onnx"
platforms = ["osx-arm64", "linux-64", "linux-aarch64", "win-64"]
[tasks.install]
# the compilation auto-generates .pyi files for the protobuf files
# which are not checked into git/found in 'onnx/'. mypy adds the CWD
# to the search pass meaning that it searches the 'onnx/' folder first
# for the repecitive .py[i] files. When they are not found there, mypy
# will complain. The proper fix would be to use to have a 'src' folder
# structure. Until then, we simply copy the interface files to the
# source directory after the build.
cmd = 'export CMAKE_ARGS="$CMAKE_ARGS $CMAKE_EXTRA_ARGS" && pip install --no-deps --ignore-installed --verbose --no-build-isolation --force --editable . && cp .setuptools-cmake-build/onnx/onnx_pb.py .setuptools-cmake-build/onnx/*_pb2.pyi onnx/'
[tasks.install.env]
ONNX_ML="1"
ONNX_BUILD_TESTS="1"
CMAKE_EXTRA_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=ON -DONNX_HARDENING=ON -DONNX_WERROR=ON"
[tasks.gen-docs]
cmd = "python onnx/defs/gen_doc.py"
[tasks.gen-operator-coverage]
cmd = "python onnx/backend/test/stat_coverage.py"
[tasks.gen-proto]
cmd = "python onnx/gen_proto.py -l && python onnx/gen_proto.py -l --ml"
[tasks.gen-test-data-feature-branch]
# Generate test data based on what files changed in the current feature branch
cmd = "python onnx/backend/test/cmd_tools.py generate-data --diff"
[tasks.gen-all]
depends-on = ["gen-docs", "gen-operator-coverage", "gen-proto", "gen-test-data-feature-branch"]
[tasks.gtest]
cmd = ".setuptools-cmake-build/onnx_gtests"
[target.win-64.tasks.gtest]
# Different path on Windows
cmd = ".setuptools-cmake-build/Release/onnx_gtests.exe"
[tasks.pytest]
cmd = "pytest"
[feature.clang-tools.tasks.run-clang-tidy]
description = "Run clang-tidy on the entire project"
# Requires `.setuptools-cmake-build/compile_commands.json` which is produced in the build task.
# The `-extra-arg=-Wno-unknown-warning-option` is needed in cases
# where the compiler_commands.json file was created by/for gcc
cmd = [
'python',
'tools/pretty_clang_tidy.py',
'run-clang-tidy',
'-p=.setuptools-cmake-build',
'-warnings-as-errors="*"',
'-extra-arg=-Wno-unknown-warning-option',
'-source-filter="{{ pixi.init_cwd }}/onnx"',
'-hide-progress',
'-quiet',
'-use-color',
]
[feature.lint.tasks.pre-commit-install]
description = "Install prek hooks"
cmd = "prek install"
[feature.lint.tasks.lint]
description = "Run linters against all files (requires a prior 'install')"
cmd = "prek run -a"
[feature.lintrunner.tasks.lintrunner-init]
cmd = "lintrunner init"
[feature.lintrunner.tasks.lintrunner-run]
cmd = "lintrunner --all-files"
[feature.docs.tasks.docs-build]
description = "Build sphinx documentation"
cmd = "cd docs/docsgen && make html"
[dependencies]
libdate = ">=3.0.1,<4"
libprotobuf = "<7" # libprotobuf>=7 has breaking changes which need a dedicated PR
make = "*"
ml_dtypes = ">=0.5.1"
nanobind = ">=2.8.0"
ninja = "*"
packaging = ">=24.1"
pip = ">=25.0"
python = ">=3.10"
scikit-build-core = ">=0.12.1"
[feature.dev.dependencies]
c-compiler = ">=1.8.0"
cmake = ">=3.31.5"
cxx-compiler = ">=1.8.0"
# follows requirements-dev.txt
ml_dtypes = ">=0.5.1"
numpy = ">=1.22.0"
protobuf = ">=6.31.1"
pytest = ">=8.3.4"
pytest-cov = ">=6.0.0"
pytest-xdist = ">=3.6.1"
setuptools = ">=75.8.0"
wheel = ">=0.45.1"
zizmor = ">=1.24.1,<2"
onnxruntime = "*"
[feature.reference.dependencies]
pillow = ">=11.2.1,<12"
[feature.oldies.dependencies]
protobuf = "==6.31.1"
python = "3.10.*"
numpy = "==1.23.2"
[feature.lint.dependencies]
clang-format = ">=22.1.1"
mypy = ">=1.19.1"
prek = ">=0.3.9"
prettier = ">=3.8.1,<4"
ruff = ">=0.15.7"
shellcheck = ">=0.11.0"
types-protobuf = ">=6.32.1.20260221,<7"
typos = ">=1.44.0,<2"
[feature.lintrunner.pypi-dependencies]
lintrunner = ">=0.10.7"
lintrunner-adapters = ">=0.12.3"
editorconfig-checker = "==3.2.1"
[feature.clang-tools.dependencies]
# We want to use a clang-tidy/clang-format version that is possibly
# newer than the one provided by the default macos cxx-compiler
# package. We thus install this into a separate environment.
clang = ">=22"
clang-tools = "*"
clang-format = "*"
python = "*"
[feature.docs.dependencies]
furo = "*"
markupsafe = "*"
matplotlib = "*"
myst-parser = "*"
pillow = "*"
pydot = "*"
sphinx = "<9" # Seems to be required by sphinx-tabs?
sphinx-copybutton = "*"
sphinx-tabs = "*"
setuptools = "<82" # sphinx-tabs needs pkg_resources which was removed in 82
linkify-it-py = "*"
[feature.docs.pypi-dependencies]
sphinx-exec-code = "*"
[feature.link-checker.dependencies]
lychee = ">=0.23.0"
[feature.link-checker.tasks.link-checker]
cmd = "pixi exec lychee --root-dir . ."
[feature.reuse.dependencies]
python = ">=3.14.5,<3.15"
reuse = ">=6.2.0,<7"
[feature.reuse.tasks.reuse]
cmd = "reuse"
[environments]
default = ["dev", "lint", "reference"]
oldies = ["dev", "lint", "reference", "oldies"]
# Keep a separate docs environment since some of those dependencies
# may introduce upper bounds
docs = ["dev", "lint", "reference", "docs"]
clang-tools = {features=["clang-tools"], no-default-feature=true}
link-checker = {features=["link-checker"], no-default-feature=true}
lintrunner = ["dev", "reference", "lint", "lintrunner"]
reuse = {features=["reuse"], no-default-feature=true}