Skip to content

Commit

Permalink
chore: Added onnx patxh
Browse files Browse the repository at this point in the history
  • Loading branch information
joda01 committed Oct 22, 2024
1 parent 30e37dc commit 62c4f6b
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 7 deletions.
43 changes: 37 additions & 6 deletions .github/workflows/update-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,39 @@ on:
- main

jobs:

apply-patches:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- name: Set up Conan
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Conan
env:
CONAN_IMAGEC_ARTIFACTORY_PW: ${{ secrets.CONAN_IMAGEC_ARTIFACTORY_PW }}
run: |
sudo apt-get update
sudo apt-get install -y libva-dev libvdpau-dev xkb-data
sudo pip install conan
sudo chmod 777 -R /root
sudo conan remote add imageclibs https://imagec.org:4431/artifactory/api/conan/imageclibs
sudo conan remote login imageclibs writer -p $CONAN_IMAGEC_ARTIFACTORY_PW
- name: Apply onnx patche
run: |
cd recipes/onnx/all
conan create . --version=1.17.0
conan upload onnx/1.17.0 -r=imageclibs
build-linux-cache:
needs:
- apply-patches
runs-on: ubuntu-22.04

steps:
Expand Down Expand Up @@ -51,6 +83,8 @@ jobs:
sudo conan upload --list=pkglist.json -r=imageclibs -c
build-macos-cache:
needs:
- apply-patches
runs-on: macos-14

steps:
Expand Down Expand Up @@ -80,8 +114,11 @@ jobs:
conan install . --profile profiles/profile_macos --output-folder=build --build=missing --format=json > build.json
conan list --graph=build.json --format=json > pkglist.json
conan upload --list=pkglist.json -r=imageclibs -c

build-windows-cache:
needs:
- apply-patches
runs-on: windows-latest

steps:
Expand Down Expand Up @@ -111,9 +148,3 @@ jobs:
conan install . --profile profiles/profile_win_mingw --output-folder=build --build=missing --format=json > build.json
conan list --graph=build.json --format=json > pkglist.json
conan upload --list=pkglist.json -r=imageclibs -c
- name: Build patches
run: |
cd recipes/onnx/all
conan create . --version=1.17.0
conan upload onnx/1.17.0 -r=imageclibs
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def requirements(self):
self.requires("nlohmann_json/3.11.3")
self.requires("libxlsxwriter/1.1.8")
self.requires("duckdb/1.1.0")
# self.requires("onnx/1.17.0")
self.requires("onnx/1.17.0")
self.requires("xkbcommon/1.6.0", override=True)
self.requires("libpq/15.5", override=True)

Expand Down
6 changes: 6 additions & 0 deletions recipes/onnx/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ sources:
"1.13.1":
url: "https://github.com/onnx/onnx/archive/refs/tags/v1.13.1.tar.gz"
sha256: "090d3e10ec662a98a2a72f1bf053f793efc645824f0d4b779e0ce47468a0890e"

patches:
"1.17.0":
- patch_file: "patches/1.17.0-0001-undef-optional.patch"
patch_description: "#undef OPTIONAL macro from windows.h, mingw header in onnx/onnx-data_pb.h"
patch_type: "portability"
7 changes: 7 additions & 0 deletions recipes/onnx/all/patches/1.17.0-0001-undef-optional.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--- a/onnx/onnx-data_pb.h
+++ b/onnx/onnx-data_pb.h
@@ -5,3 +5,3 @@
#pragma once
-
+#undef OPTIONAL
// clang-format off

0 comments on commit 62c4f6b

Please sign in to comment.