From 6bcd889af0e1169c87b39105055fcd96f6b23cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Exalta=C3=A7=C3=A3o?= Date: Mon, 7 Jul 2025 17:06:15 -0300 Subject: [PATCH 1/9] onnxruntime: init package (wip) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Arthur Exaltação --- onnxruntime.yaml | 75 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 onnxruntime.yaml diff --git a/onnxruntime.yaml b/onnxruntime.yaml new file mode 100644 index 00000000000..a27d264114f --- /dev/null +++ b/onnxruntime.yaml @@ -0,0 +1,75 @@ +package: + name: onnxruntime + version: 1.22.0 + epoch: 0 + description: Cross-platform, high performance ML inferencing and training accelerator + copyright: + - license: MIT + +environment: + contents: + packages: + - bash + - build-base + - busybox + - cmake + - py3-numpy + - python3 + - python3-dev + - zlib-dev + +pipeline: + - uses: git-checkout + with: + repository: https://github.com/microsoft/onnxruntime.git + tag: v${{package.version}} + expected-commit: dafa7f9365b1ed9c9e27a9806fef6e7275c5d9c6 + + - runs: | + # Find system nlohmann-json + sed 's|3.10 ||g' \ + -i cmake/external/onnxruntime_external_deps.cmake + + # Find system chrono-date + sed -e 's|${DEP_SHA1_date}|&\n \ \ \ \ \ \FIND_PACKAGE_ARGS NAMES date|g' \ + -e 's|date_interface|date::date-tz|g' \ + -i cmake/external/onnxruntime_external_deps.cmake \ + -i cmake/onnxruntime_common.cmake \ + -i cmake/onnxruntime_unittests.cmake + + # Find system abseil-cpp + sed 's|ABSL_PATCH_COMMAND}|&\n\ \ \ \ \FIND_PACKAGE_ARGS NAMES absl|g' \ + -i cmake/external/abseil-cpp.cmake + + # Find system cxxopts + sed 's|${DEP_SHA1_cxxopts}|&\n\ \ \ \ \FIND_PACKAGE_ARGS NAMES cxxopts|g' \ + -i cmake/external/onnxruntime_external_deps.cmake + + # Find system nsync + # NOTE check line number after every release + sed -e 's|NAMES nsync|&_cpp|g' \ + -e '368aadd_library(nsync::nsync_cpp ALIAS nsync_cpp)' \ + -i cmake/external/onnxruntime_external_deps.cmake + + - uses: cmake/configure + with: + opts: | + -S cmake \ + -Donnxruntime_ENABLE_PYTHON=ON \ + -Donnxruntime_BUILD_SHARED_LIB=ON \ + -Donnxruntime_BUILD_UNIT_TESTS=OFF \ + -Donnxruntime_ENABLE_TRAINING=ON \ + -Donnxruntime_ENABLE_LAZY_TENSOR=OFF \ + -Donnxruntime_USE_DNNL=ON \ + -Donnxruntime_USE_PREINSTALLED_EIGEN=OFF \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + + - uses: cmake/build + + - uses: cmake/install + +update: + enabled: true + github: + identifier: microsoft/onnxruntime + strip-prefix: v From 0fdfad38399eb719231da36d235b21afec3c7d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Exalta=C3=A7=C3=A3o?= Date: Wed, 9 Jul 2025 17:11:15 -0300 Subject: [PATCH 2/9] onnxruntime: get closer to a build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Arthur Exaltação --- onnxruntime.yaml | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/onnxruntime.yaml b/onnxruntime.yaml index a27d264114f..f09f0e26dc2 100644 --- a/onnxruntime.yaml +++ b/onnxruntime.yaml @@ -9,21 +9,34 @@ package: environment: contents: packages: + - abseil-cpp-dev - bash - build-base - busybox + - ca-certificates-bundle - cmake + - coreutils + - curl + - eigen-dev + - gcc-14-default + - patch + - protobuf-c-dev + - protobuf-dev - py3-numpy + - py3.11-pytorch - python3 - python3-dev + - re2-dev - zlib-dev + environment: + CXXFLAGS: "-fdelete-null-pointer-checks" pipeline: - uses: git-checkout with: repository: https://github.com/microsoft/onnxruntime.git tag: v${{package.version}} - expected-commit: dafa7f9365b1ed9c9e27a9806fef6e7275c5d9c6 + expected-commit: f217402897f40ebba457e2421bc0a4702771968e - runs: | # Find system nlohmann-json @@ -51,18 +64,29 @@ pipeline: -e '368aadd_library(nsync::nsync_cpp ALIAS nsync_cpp)' \ -i cmake/external/onnxruntime_external_deps.cmake + # - runs: | + # ./build.sh --allow_running_as_root --skip_submodule_sync --config Release --update --build --parallel $(nproc --ignore=2) --build_shared_lib --cmake_extra_defines CMAKE_INSTALL_PREFIX=/usr BUILD_TESTING=off + # make install -C ./build/Linux/Release/ DESTDIR=${{targets.contextdir}} + # # make install -C ./build/Linux/Release/ + - uses: cmake/configure with: opts: | -S cmake \ + -Wno-dev \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DBUILD_TESTING=OFF \ + -DCMAKE_INSTALL_PREFIX=/usr \ -Donnxruntime_ENABLE_PYTHON=ON \ -Donnxruntime_BUILD_SHARED_LIB=ON \ -Donnxruntime_BUILD_UNIT_TESTS=OFF \ -Donnxruntime_ENABLE_TRAINING=ON \ - -Donnxruntime_ENABLE_LAZY_TENSOR=OFF \ -Donnxruntime_USE_DNNL=ON \ - -Donnxruntime_USE_PREINSTALLED_EIGEN=OFF \ - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DCMAKE_CXX_STANDARD=17 + + # -Donnxruntime_USE_PREINSTALLED_EIGEN=OFF \ + # -DCMAKE_BUILD_TYPE=None \ + # --compile-no-warning-as-error \ - uses: cmake/build From ad7b59858dab6e03c66a7a37a67303ac45831989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Exalta=C3=A7=C3=A3o?= Date: Thu, 10 Jul 2025 15:11:35 -0300 Subject: [PATCH 3/9] onnxruntime: initial first build (no python) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Arthur Exaltação --- onnxruntime.yaml | 75 +++++++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 33 deletions(-) diff --git a/onnxruntime.yaml b/onnxruntime.yaml index f09f0e26dc2..58558ef8a66 100644 --- a/onnxruntime.yaml +++ b/onnxruntime.yaml @@ -1,3 +1,5 @@ +#nolint:valid-pipeline-git-checkout-tag +# FIXME: REMOVE NOLINT package: name: onnxruntime version: 1.22.0 @@ -19,13 +21,16 @@ environment: - curl - eigen-dev - gcc-14-default + - gtest-dev - patch - - protobuf-c-dev - - protobuf-dev + - py3-build-base-dev + - py3-flatbuffers - py3-numpy - - py3.11-pytorch + - py3-packaging + - py3-protobuf + - py3-setuptools + - py3-wheel - python3 - - python3-dev - re2-dev - zlib-dev environment: @@ -35,8 +40,14 @@ pipeline: - uses: git-checkout with: repository: https://github.com/microsoft/onnxruntime.git - tag: v${{package.version}} - expected-commit: f217402897f40ebba457e2421bc0a4702771968e + # tag: v${{package.version}} + # expected-commit: f217402897f40ebba457e2421bc0a4702771968e + branch: main + expected-commit: d29328588e00bf2e578d904403fa5c6627754346 + + # - uses: patch + # with: + # patches: onnxruntime-use-system-flatbuffers.patch - runs: | # Find system nlohmann-json @@ -64,36 +75,34 @@ pipeline: -e '368aadd_library(nsync::nsync_cpp ALIAS nsync_cpp)' \ -i cmake/external/onnxruntime_external_deps.cmake - # - runs: | - # ./build.sh --allow_running_as_root --skip_submodule_sync --config Release --update --build --parallel $(nproc --ignore=2) --build_shared_lib --cmake_extra_defines CMAKE_INSTALL_PREFIX=/usr BUILD_TESTING=off - # make install -C ./build/Linux/Release/ DESTDIR=${{targets.contextdir}} - # # make install -C ./build/Linux/Release/ - - - uses: cmake/configure - with: - opts: | - -S cmake \ - -Wno-dev \ - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ - -DBUILD_TESTING=OFF \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -Donnxruntime_ENABLE_PYTHON=ON \ - -Donnxruntime_BUILD_SHARED_LIB=ON \ - -Donnxruntime_BUILD_UNIT_TESTS=OFF \ - -Donnxruntime_ENABLE_TRAINING=ON \ - -Donnxruntime_USE_DNNL=ON \ - -DCMAKE_CXX_STANDARD=17 - - # -Donnxruntime_USE_PREINSTALLED_EIGEN=OFF \ - # -DCMAKE_BUILD_TYPE=None \ - # --compile-no-warning-as-error \ - - - uses: cmake/build - - - uses: cmake/install + - runs: | + ./build.sh \ + --allow_running_as_root \ + --skip_submodule_sync \ + --config Release \ + --update --build --parallel $(nproc --ignore=2) \ + --build_shared_lib \ + --cmake_extra_defines CMAKE_INSTALL_PREFIX=/usr BUILD_TESTING=off CMAKE_CXX_STANDARD=17 + # Fixes a build issue where date-build's cmake_install.cmake file cannot be found. FIXME: remove the need for this somehow + cp ./build/Linux/Release/_deps/date-subbuild/cmake_install.cmake ./build/Linux/Release/_deps/date-build/ + make install -C ./build/Linux/Release/ DESTDIR=${{targets.contextdir}} update: enabled: true github: identifier: microsoft/onnxruntime strip-prefix: v + +subpackages: + - name: ${{package.name}}-dev + description: ${{package.name}} development libraries + pipeline: + - uses: split/dev + dependencies: + runtime: + - ${{package.name}} + test: + pipeline: + - uses: test/ldd-check + with: + packages: ${{package.name}}-dev From 75c12cbb7e62dc024ec920ae596c87417c05fcac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Exalta=C3=A7=C3=A3o?= Date: Thu, 10 Jul 2025 16:46:32 -0300 Subject: [PATCH 4/9] onnxruntime: attempt to build with python MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Arthur Exaltação --- onnxruntime.yaml | 61 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 19 deletions(-) diff --git a/onnxruntime.yaml b/onnxruntime.yaml index 58558ef8a66..32f1b32624a 100644 --- a/onnxruntime.yaml +++ b/onnxruntime.yaml @@ -2,11 +2,13 @@ # FIXME: REMOVE NOLINT package: name: onnxruntime - version: 1.22.0 + version: 1.22.1 epoch: 0 description: Cross-platform, high performance ML inferencing and training accelerator copyright: - license: MIT + resources: + memory: 64Gi environment: contents: @@ -32,6 +34,7 @@ environment: - py3-wheel - python3 - re2-dev + - samurai - zlib-dev environment: CXXFLAGS: "-fdelete-null-pointer-checks" @@ -40,14 +43,8 @@ pipeline: - uses: git-checkout with: repository: https://github.com/microsoft/onnxruntime.git - # tag: v${{package.version}} - # expected-commit: f217402897f40ebba457e2421bc0a4702771968e - branch: main - expected-commit: d29328588e00bf2e578d904403fa5c6627754346 - - # - uses: patch - # with: - # patches: onnxruntime-use-system-flatbuffers.patch + tag: v${{package.version}} + expected-commit: 89746dc19a0a1ae59ebf4b16df9acab8f99f3925 - runs: | # Find system nlohmann-json @@ -76,16 +73,42 @@ pipeline: -i cmake/external/onnxruntime_external_deps.cmake - runs: | - ./build.sh \ - --allow_running_as_root \ - --skip_submodule_sync \ - --config Release \ - --update --build --parallel $(nproc --ignore=2) \ - --build_shared_lib \ - --cmake_extra_defines CMAKE_INSTALL_PREFIX=/usr BUILD_TESTING=off CMAKE_CXX_STANDARD=17 - # Fixes a build issue where date-build's cmake_install.cmake file cannot be found. FIXME: remove the need for this somehow - cp ./build/Linux/Release/_deps/date-subbuild/cmake_install.cmake ./build/Linux/Release/_deps/date-build/ - make install -C ./build/Linux/Release/ DESTDIR=${{targets.contextdir}} + cmake \ + --compile-no-warning-as-error \ + -S cmake \ + -B build \ + -Wno-dev \ + -G Ninja \ + -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=OFF \ + -DCMAKE_CXX_STANDARD=17 + + cmake --build build + + cp -f build/_deps/date-subbuild/cmake_install.cmake build/_deps/date-build + cp -f build/_deps/cxxopts-subbuild/cmake_install.cmake build/_deps/cxxopts-build/ + cmake --install build + + - 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 + + - uses: python/build + + - uses: python/install update: enabled: true From 83fb9b5e4392ba8f422a0be4814b669ee757efdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Exalta=C3=A7=C3=A3o?= Date: Fri, 11 Jul 2025 10:39:24 -0300 Subject: [PATCH 5/9] onnxruntime: build for multiple versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Arthur Exaltação --- onnxruntime.yaml | 72 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 57 insertions(+), 15 deletions(-) diff --git a/onnxruntime.yaml b/onnxruntime.yaml index 32f1b32624a..b9bb9c535f9 100644 --- a/onnxruntime.yaml +++ b/onnxruntime.yaml @@ -1,5 +1,3 @@ -#nolint:valid-pipeline-git-checkout-tag -# FIXME: REMOVE NOLINT package: name: onnxruntime version: 1.22.1 @@ -10,6 +8,17 @@ package: resources: memory: 64Gi +vars: + pypi-package: onnxruntime + +data: + - name: py-versions + items: + 3.10: '310' + 3.11: '311' + 3.12: '312' + 3.13: '313' + environment: contents: packages: @@ -47,6 +56,10 @@ pipeline: 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 + # Find system nlohmann-json sed 's|3.10 ||g' \ -i cmake/external/onnxruntime_external_deps.cmake @@ -58,9 +71,6 @@ pipeline: -i cmake/onnxruntime_common.cmake \ -i cmake/onnxruntime_unittests.cmake - # Find system abseil-cpp - sed 's|ABSL_PATCH_COMMAND}|&\n\ \ \ \ \FIND_PACKAGE_ARGS NAMES absl|g' \ - -i cmake/external/abseil-cpp.cmake # Find system cxxopts sed 's|${DEP_SHA1_cxxopts}|&\n\ \ \ \ \FIND_PACKAGE_ARGS NAMES cxxopts|g' \ @@ -99,6 +109,8 @@ pipeline: cp -f build/_deps/cxxopts-subbuild/cmake_install.cmake build/_deps/cxxopts-build/ cmake --install build + - uses: strip + - name: Fix Python build runs: | # Manually fix https://github.com/microsoft/onnxruntime/issues/24570 @@ -106,16 +118,6 @@ pipeline: python setup.py --help # We have to call it like this once to generate the file we need. cp -rf build/onnxruntime/* onnxruntime - - uses: python/build - - - uses: python/install - -update: - enabled: true - github: - identifier: microsoft/onnxruntime - strip-prefix: v - subpackages: - name: ${{package.name}}-dev description: ${{package.name}} development libraries @@ -129,3 +131,43 @@ subpackages: - 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: + provider-priority: ${{range.value}} + 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 + provides: + - py3-${{vars.pypi-package}} + pipeline: + - uses: py/pip-build-install + test: + pipeline: + - uses: test/tw/pip-check + - 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.10-${{vars.pypi-package}} + - py3.11-${{vars.pypi-package}} + - py3.12-${{vars.pypi-package}} + - py3.13-${{vars.pypi-package}} + +update: + enabled: true + github: + identifier: microsoft/onnxruntime + strip-prefix: v From 674a65a7bef11c6e05844dc0536ef36455e4eb54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Exalta=C3=A7=C3=A3o?= Date: Fri, 11 Jul 2025 16:01:21 -0300 Subject: [PATCH 6/9] onnxruntime: add final python packaging + add py3-coloredlogs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Arthur Exaltação --- onnxruntime.yaml | 34 ++++++++++-------- py3-coloredlogs.yaml | 83 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 15 deletions(-) create mode 100644 py3-coloredlogs.yaml diff --git a/onnxruntime.yaml b/onnxruntime.yaml index b9bb9c535f9..953425acba8 100644 --- a/onnxruntime.yaml +++ b/onnxruntime.yaml @@ -5,18 +5,14 @@ package: description: Cross-platform, high performance ML inferencing and training accelerator copyright: - license: MIT - resources: - memory: 64Gi vars: pypi-package: onnxruntime data: + # Other versions seem to fail with `.so` ABI mismatches (missing symbols) - name: py-versions items: - 3.10: '310' - 3.11: '311' - 3.12: '312' 3.13: '313' environment: @@ -34,13 +30,13 @@ environment: - gcc-14-default - gtest-dev - patch - - py3-build-base-dev - - py3-flatbuffers - - py3-numpy - - py3-packaging - - py3-protobuf - - py3-setuptools - - py3-wheel + - py3-supported-build-base-dev + - py3-supported-flatbuffers + - py3-supported-numpy + - py3-supported-packaging + - py3-supported-protobuf + - py3-supported-setuptools + - py3-supported-wheel - python3 - re2-dev - samurai @@ -107,6 +103,7 @@ pipeline: cp -f build/_deps/date-subbuild/cmake_install.cmake build/_deps/date-build cp -f build/_deps/cxxopts-subbuild/cmake_install.cmake build/_deps/cxxopts-build/ + cmake --install build - uses: strip @@ -136,7 +133,6 @@ subpackages: name: py${{range.key}}-${{vars.pypi-package}} description: ${{vars.pypi-package}} installed for python${{range.key}} dependencies: - provider-priority: ${{range.value}} runtime: - py${{range.key}}-coloredlogs - py${{range.key}}-flatbuffers @@ -144,13 +140,21 @@ subpackages: - py${{range.key}}-packaging - py${{range.key}}-protobuf - py${{range.key}}-sympy - provides: - - py3-${{vars.pypi-package}} 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}} 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 From ba4a017ab65e28969972147f99ca78d983519651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Exalta=C3=A7=C3=A3o?= Date: Fri, 11 Jul 2025 16:21:15 -0300 Subject: [PATCH 7/9] onnxruntime: move to cmake pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Arthur Exaltação --- onnxruntime.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/onnxruntime.yaml b/onnxruntime.yaml index 953425acba8..b9e506bc2ea 100644 --- a/onnxruntime.yaml +++ b/onnxruntime.yaml @@ -78,13 +78,12 @@ pipeline: -e '368aadd_library(nsync::nsync_cpp ALIAS nsync_cpp)' \ -i cmake/external/onnxruntime_external_deps.cmake - - runs: | - cmake \ + - uses: cmake/configure + with: + output-dir: build + opts: | --compile-no-warning-as-error \ -S cmake \ - -B build \ - -Wno-dev \ - -G Ninja \ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ @@ -99,12 +98,17 @@ pipeline: -Donnxruntime_USE_PREINSTALLED_EIGEN=OFF \ -DCMAKE_CXX_STANDARD=17 - cmake --build build + - uses: cmake/build + with: + output-dir: build + - runs: | cp -f build/_deps/date-subbuild/cmake_install.cmake build/_deps/date-build cp -f build/_deps/cxxopts-subbuild/cmake_install.cmake build/_deps/cxxopts-build/ - cmake --install build + - uses: cmake/install + with: + output-dir: build - uses: strip From 48c494e728e0663c9ccff1e6339aa65826f92586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Exalta=C3=A7=C3=A3o?= Date: Sun, 13 Jul 2025 22:38:27 -0300 Subject: [PATCH 8/9] onnxruntime: clean package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Arthur Exaltação --- onnxruntime.yaml | 64 +++++++++++------------------------------------- 1 file changed, 14 insertions(+), 50 deletions(-) diff --git a/onnxruntime.yaml b/onnxruntime.yaml index b9e506bc2ea..5edb3638d86 100644 --- a/onnxruntime.yaml +++ b/onnxruntime.yaml @@ -10,38 +10,25 @@ vars: pypi-package: onnxruntime data: - # Other versions seem to fail with `.so` ABI mismatches (missing symbols) - name: py-versions items: + # Other versions seem to fail with `.so` ABI mismatches (missing symbols) 3.13: '313' environment: contents: packages: - abseil-cpp-dev - - bash - - build-base - - busybox - - ca-certificates-bundle - - cmake - - coreutils - - curl - eigen-dev - gcc-14-default - - gtest-dev - - patch - py3-supported-build-base-dev - - py3-supported-flatbuffers - py3-supported-numpy - - py3-supported-packaging - - py3-supported-protobuf - - py3-supported-setuptools - - py3-supported-wheel - python3 - re2-dev - - samurai - zlib-dev environment: + # This seems to be required to compile `abseil` + # FIXME: remove this eventually CXXFLAGS: "-fdelete-null-pointer-checks" pipeline: @@ -56,28 +43,6 @@ pipeline: sed 's|ABSL_PATCH_COMMAND}|&\n\ \ \ \ \FIND_PACKAGE_ARGS NAMES absl|g' \ -i cmake/external/abseil-cpp.cmake - # Find system nlohmann-json - sed 's|3.10 ||g' \ - -i cmake/external/onnxruntime_external_deps.cmake - - # Find system chrono-date - sed -e 's|${DEP_SHA1_date}|&\n \ \ \ \ \ \FIND_PACKAGE_ARGS NAMES date|g' \ - -e 's|date_interface|date::date-tz|g' \ - -i cmake/external/onnxruntime_external_deps.cmake \ - -i cmake/onnxruntime_common.cmake \ - -i cmake/onnxruntime_unittests.cmake - - - # Find system cxxopts - sed 's|${DEP_SHA1_cxxopts}|&\n\ \ \ \ \FIND_PACKAGE_ARGS NAMES cxxopts|g' \ - -i cmake/external/onnxruntime_external_deps.cmake - - # Find system nsync - # NOTE check line number after every release - sed -e 's|NAMES nsync|&_cpp|g' \ - -e '368aadd_library(nsync::nsync_cpp ALIAS nsync_cpp)' \ - -i cmake/external/onnxruntime_external_deps.cmake - - uses: cmake/configure with: output-dir: build @@ -95,16 +60,17 @@ pipeline: -Donnxruntime_ENABLE_LAZY_TENSOR=OFF \ -Donnxruntime_USE_MPI=ON \ -Donnxruntime_USE_DNNL=OFF \ - -Donnxruntime_USE_PREINSTALLED_EIGEN=OFF \ + -Donnxruntime_USE_PREINSTALLED_EIGEN=ON \ -DCMAKE_CXX_STANDARD=17 - uses: cmake/build with: output-dir: build - - runs: | - cp -f build/_deps/date-subbuild/cmake_install.cmake build/_deps/date-build - cp -f build/_deps/cxxopts-subbuild/cmake_install.cmake build/_deps/cxxopts-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: @@ -120,13 +86,15 @@ pipeline: 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 - dependencies: - runtime: - - ${{package.name}} test: pipeline: - uses: test/ldd-check @@ -169,13 +137,9 @@ subpackages: description: meta package providing ${{vars.pypi-package}} for supported python versions. dependencies: runtime: - - py3.10-${{vars.pypi-package}} - - py3.11-${{vars.pypi-package}} - - py3.12-${{vars.pypi-package}} - py3.13-${{vars.pypi-package}} update: enabled: true - github: - identifier: microsoft/onnxruntime + git: strip-prefix: v From bb6987d3de11c66b022653f68edfb3c7ec8ceed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Exalta=C3=A7=C3=A3o?= Date: Tue, 15 Jul 2025 09:58:54 -0300 Subject: [PATCH 9/9] onnxruntime: use github provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Arthur Exaltação --- onnxruntime.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onnxruntime.yaml b/onnxruntime.yaml index 5edb3638d86..a41e72b7969 100644 --- a/onnxruntime.yaml +++ b/onnxruntime.yaml @@ -141,5 +141,6 @@ subpackages: update: enabled: true - git: + github: + identifier: microsoft/onnxruntime strip-prefix: v