diff --git a/onnxruntime.yaml b/onnxruntime.yaml new file mode 100644 index 00000000000..a41e72b7969 --- /dev/null +++ b/onnxruntime.yaml @@ -0,0 +1,146 @@ +package: + name: onnxruntime + version: 1.22.1 + epoch: 0 + description: Cross-platform, high performance ML inferencing and training accelerator + copyright: + - license: MIT + +vars: + pypi-package: onnxruntime + +data: + - name: py-versions + items: + # Other versions seem to fail with `.so` ABI mismatches (missing symbols) + 3.13: '313' + +environment: + contents: + packages: + - abseil-cpp-dev + - eigen-dev + - gcc-14-default + - py3-supported-build-base-dev + - py3-supported-numpy + - python3 + - re2-dev + - zlib-dev + environment: + # This seems to be required to compile `abseil` + # FIXME: remove this eventually + CXXFLAGS: "-fdelete-null-pointer-checks" + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/microsoft/onnxruntime.git + tag: v${{package.version}} + expected-commit: 89746dc19a0a1ae59ebf4b16df9acab8f99f3925 + + - runs: | + # Find system abseil-cpp + sed 's|ABSL_PATCH_COMMAND}|&\n\ \ \ \ \FIND_PACKAGE_ARGS NAMES absl|g' \ + -i cmake/external/abseil-cpp.cmake + + - uses: cmake/configure + with: + output-dir: build + opts: | + --compile-no-warning-as-error \ + -S cmake \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -Donnxruntime_ENABLE_PYTHON=ON \ + -Donnxruntime_BUILD_SHARED_LIB=ON \ + -Donnxruntime_BUILD_UNIT_TESTS=OFF \ + -DBUILD_TESTING=OFF \ + -Donnxruntime_ENABLE_TRAINING=ON \ + -Donnxruntime_ENABLE_LAZY_TENSOR=OFF \ + -Donnxruntime_USE_MPI=ON \ + -Donnxruntime_USE_DNNL=OFF \ + -Donnxruntime_USE_PREINSTALLED_EIGEN=ON \ + -DCMAKE_CXX_STANDARD=17 + + - uses: cmake/build + with: + output-dir: build + + - working-directory: build/_deps + runs: | + install -Dpm0644 -t ./date-build/ date-subbuild/cmake_install.cmake + install -Dpm0644 -t ./cxxopts-build/ cxxopts-subbuild/cmake_install.cmake + + - uses: cmake/install + with: + output-dir: build + + - uses: strip + + - name: Fix Python build + runs: | + # Manually fix https://github.com/microsoft/onnxruntime/issues/24570 + mkdir onnxruntime/capi + python setup.py --help # We have to call it like this once to generate the file we need. + cp -rf build/onnxruntime/* onnxruntime + +subpackages: + - name: ${{package.name}}-static + description: ${{package.name}} statice libraries + pipeline: + - uses: split/static + + - name: ${{package.name}}-dev + description: ${{package.name}} development libraries + pipeline: + - uses: split/dev + test: + pipeline: + - uses: test/ldd-check + with: + packages: ${{package.name}}-dev + + - range: py-versions + name: py${{range.key}}-${{vars.pypi-package}} + description: ${{vars.pypi-package}} installed for python${{range.key}} + dependencies: + runtime: + - py${{range.key}}-coloredlogs + - py${{range.key}}-flatbuffers + - py${{range.key}}-numpy + - py${{range.key}}-packaging + - py${{range.key}}-protobuf + - py${{range.key}}-sympy + pipeline: + - uses: py/pip-build-install + with: + python: python${{range.key}} + test: + environment: + contents: + packages: + - python-${{range.key}} + - py${{range.key}}-pip + - py${{range.key}}-${{vars.pypi-package}} + pipeline: + - uses: test/tw/pip-check + with: + python: python${{range.key}} + - uses: python/import + with: + python: python${{range.key}} + import: ${{vars.pypi-package}} + - uses: test/tw/ldd-check + + - name: py3-supported-${{vars.pypi-package}} + description: meta package providing ${{vars.pypi-package}} for supported python versions. + dependencies: + runtime: + - py3.13-${{vars.pypi-package}} + +update: + enabled: true + github: + identifier: microsoft/onnxruntime + strip-prefix: v diff --git a/py3-coloredlogs.yaml b/py3-coloredlogs.yaml new file mode 100644 index 00000000000..dcba5d927f0 --- /dev/null +++ b/py3-coloredlogs.yaml @@ -0,0 +1,83 @@ +package: + name: py3-coloredlogs + version: 15.0.1 + epoch: 0 + description: Simple cross-platform colored terminal text + copyright: + - license: MIT + +vars: + pypi-package: coloredlogs + +environment: + contents: + packages: + - py3-supported-build-base-dev + +data: + - name: py-versions + items: + 3.10: '310' + 3.11: '311' + 3.12: '312' + 3.13: '313' + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/xolox/python-coloredlogs + tag: ${{package.version}} + expected-commit: 65bdfe976ac0bf81e8c0bd9a98242b9d666b2859 + +subpackages: + - range: py-versions + name: py${{range.key}}-${{vars.pypi-package}} + description: ${{vars.pypi-package}} installed for python${{range.key}} + dependencies: + runtime: + - py${{range.key}}-humanfriendly + pipeline: + - uses: py/pip-build-install + with: + python: python${{range.key}} + - uses: strip + test: + environment: + contents: + packages: + - python-${{range.key}} + - py${{range.key}}-pip + - py${{range.key}}-${{vars.pypi-package}} + pipeline: + - uses: python/import + with: + python: python${{range.key}} + import: ${{vars.pypi-package}} + - runs: | + pip freeze | grep -F -e "${{vars.pypi-package}}-${{package.version}}" + - runs: | + LOGFILE=$(mktemp) + python3 <<'EOF' 2>&1 | tee "${LOGFILE}" + import coloredlogs, logging + + logger = logging.getLogger(__name__) + logger.debug("this should not show up") + logger.info("this should not show up") + logger.warning("this is a warning message") + logger.error("this is an error message") + logger.critical("this is a critical message") + EOF + grep -F \ + -e "this is a warning message" \ + -e "this is an error message" \ + -e "this is a critical message" \ + "${LOGFILE}" + if grep -F -e "this should not show up" "${LOGFILE}" ; then + printf "%s\n" "Expected debug and info logs to be disabled by default" >&2 + exit 1 + fi + +update: + enabled: true + git: + strip-prefix: v