From 6562c42cc47f9eee3a5d00fceffb1ff24328c533 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 21:43:20 -0800 Subject: [PATCH 01/27] Adding new gha workflow for windows --- .github/workflows/win-cpu-build.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/win-cpu-build.yml diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml new file mode 100644 index 000000000..a134d9c42 --- /dev/null +++ b/.github/workflows/win-cpu-build.yml @@ -0,0 +1,13 @@ +on: [ workflow_dispatch, push, pull_request] +jobs: + job: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Download OnnxRuntime + run: | + $url = "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-win-x64-1.16.3.zip" + $output = "onnxruntime-win-x64-1.16.3.zip" + Invoke-WebRequest -Uri $url -OutFile $output + Expand-Archive $output -DestinationPath $env:GITHUB_WORKSPACE + Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse From 87cba42f2b630f59f18e78a8b8aa8656c37ee70d Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 21:53:43 -0800 Subject: [PATCH 02/27] Update Unzip Onnxruntime --- .github/workflows/win-cpu-build.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index a134d9c42..a23eaaa28 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -1,4 +1,9 @@ on: [ workflow_dispatch, push, pull_request] +env: + ort_dir: "onnxruntime-win-x64-1.16.3" + ort_zip: ort_dir + ".zip" + ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-win-x64-1.16.3.zip" + jobs: job: runs-on: windows-latest @@ -6,8 +11,11 @@ jobs: - uses: actions/checkout@v2 - name: Download OnnxRuntime run: | - $url = "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-win-x64-1.16.3.zip" - $output = "onnxruntime-win-x64-1.16.3.zip" - Invoke-WebRequest -Uri $url -OutFile $output - Expand-Archive $output -DestinationPath $env:GITHUB_WORKSPACE - Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse + $env:ort_url = "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-win-x64-1.16.3.zip" + Invoke-WebRequest -Uri $env:ort_url -OutFile $env:ort_zip + - name: Unzip OnnxRuntime + run: | + Expand-Archive $env:ort_zip -DestinationPath . + Remove-Item -Path $env:ort_zip + Get-ChildItem -Path $env:GITHUB_WORKSPACE + From 5e274a878f383295d55a352e801bf5c83e9e3f88 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 21:54:56 -0800 Subject: [PATCH 03/27] Update Unzip Onnxruntime --- .github/workflows/win-cpu-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index a23eaaa28..a348b9b1b 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -1,7 +1,7 @@ on: [ workflow_dispatch, push, pull_request] env: ort_dir: "onnxruntime-win-x64-1.16.3" - ort_zip: ort_dir + ".zip" + ort_zip: $env:ort_dir + ".zip" ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-win-x64-1.16.3.zip" jobs: From bcc05246c2b4e554ace2d6c849f51cfdb3089c72 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 21:56:07 -0800 Subject: [PATCH 04/27] Update Unzip Onnxruntime --- .github/workflows/win-cpu-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index a348b9b1b..123fc5f58 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -1,7 +1,7 @@ on: [ workflow_dispatch, push, pull_request] env: ort_dir: "onnxruntime-win-x64-1.16.3" - ort_zip: $env:ort_dir + ".zip" + ort_zip: "$(ort_dir).zip" ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-win-x64-1.16.3.zip" jobs: From fef7911d3f70bd33b10530cea7e77287c91be42c Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 21:58:12 -0800 Subject: [PATCH 05/27] Update Unzip Onnxruntime --- .github/workflows/win-cpu-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index 123fc5f58..5115a2616 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -18,4 +18,8 @@ jobs: Expand-Archive $env:ort_zip -DestinationPath . Remove-Item -Path $env:ort_zip Get-ChildItem -Path $env:GITHUB_WORKSPACE + - name: Rename OnnxRuntime to ort + run: | + Rename-Item -Path $env:ort_dir -NewName ort + Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse From 55be208cb882c9629f418974f94977cf46f4ba42 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 22:01:15 -0800 Subject: [PATCH 06/27] Update Unzip Onnxruntime --- .github/workflows/win-cpu-build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index 5115a2616..ab6334254 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -9,6 +9,11 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 + - name: set up Visual Studio 2022 + uses: microsoft/setup-msbuild@v1.1 + with: + vs-version: '17.5' + cmake-version: '3.26' - name: Download OnnxRuntime run: | $env:ort_url = "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-win-x64-1.16.3.zip" @@ -22,4 +27,10 @@ jobs: run: | Rename-Item -Path $env:ort_dir -NewName ort Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse + - name: Build with CMake + run: | + mkdir build + cd build + cmake -G "Visual Studio 17 2022" -A x64 -DORT_ROOT=$env:GITHUB_WORKSPACE\ort .. + cmake --build . --config Release From e818af78e9a2eaa51ba65e6a1f8b4927248fd193 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 22:05:19 -0800 Subject: [PATCH 07/27] Build with windows --- .github/workflows/win-cpu-build.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index ab6334254..33f951be2 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -1,36 +1,43 @@ -on: [ workflow_dispatch, push, pull_request] +on: [ workflow_dispatch, push, pull_request ] env: - ort_dir: "onnxruntime-win-x64-1.16.3" - ort_zip: "$(ort_dir).zip" - ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-win-x64-1.16.3.zip" + ort_dir: "onnxruntime-win-x64-1.16.3" + ort_zip: "$(ort_dir).zip" + ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-win-x64-1.16.3.zip" jobs: job: runs-on: windows-latest steps: - uses: actions/checkout@v2 + - name: set up Visual Studio 2022 uses: microsoft/setup-msbuild@v1.1 with: vs-version: '17.5' - cmake-version: '3.26' + - name: Download OnnxRuntime run: | $env:ort_url = "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-win-x64-1.16.3.zip" Invoke-WebRequest -Uri $env:ort_url -OutFile $env:ort_zip + - name: Unzip OnnxRuntime run: | Expand-Archive $env:ort_zip -DestinationPath . Remove-Item -Path $env:ort_zip - Get-ChildItem -Path $env:GITHUB_WORKSPACE + - name: Rename OnnxRuntime to ort run: | - Rename-Item -Path $env:ort_dir -NewName ort - Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse + Rename-Item -Path $env:ort_dir -NewName ort + + - name: Git Submodule Update + run: | + git submodule update --init --recursive + - name: Build with CMake run: | mkdir build cd build cmake -G "Visual Studio 17 2022" -A x64 -DORT_ROOT=$env:GITHUB_WORKSPACE\ort .. cmake --build . --config Release + Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Filter *.dll -Recurse From 0ad9dbf7d19add5f8cb9a61e452445e27999f6cf Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 22:10:54 -0800 Subject: [PATCH 08/27] Build with windows --- .github/workflows/win-cpu-build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index 33f951be2..7f05f8324 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -37,7 +37,11 @@ jobs: run: | mkdir build cd build - cmake -G "Visual Studio 17 2022" -A x64 -DORT_ROOT=$env:GITHUB_WORKSPACE\ort .. + cmake -G "Visual Studio 17 2022" -A x64 .. cmake --build . --config Release Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Filter *.dll -Recurse + - name: verify build folder + run: | + cd build + Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Recurse From 62872ee9ecab28dd2905c86699d79b4bbd03b2b6 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 22:12:55 -0800 Subject: [PATCH 09/27] adding --parallel --- .github/workflows/win-cpu-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index 7f05f8324..a136ff711 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -38,7 +38,7 @@ jobs: mkdir build cd build cmake -G "Visual Studio 17 2022" -A x64 .. - cmake --build . --config Release + cmake --build . --config Release --parallel Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Filter *.dll -Recurse - name: verify build folder run: | From 801226db992752d6e1037421faee01e763a7308a Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 22:14:57 -0800 Subject: [PATCH 10/27] Clean up --- .github/workflows/win-cpu-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index a136ff711..26b00b7a2 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -39,9 +39,9 @@ jobs: cd build cmake -G "Visual Studio 17 2022" -A x64 .. cmake --build . --config Release --parallel - Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Filter *.dll -Recurse - name: verify build folder run: | cd build - Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Recurse + Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\ -Recurse +# TODO : adding shared library to the build From fec9d1242ee64e5b6d699b6132dc9f805ddb68df Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 22:18:33 -0800 Subject: [PATCH 11/27] Only Check Release folder --- .github/workflows/win-cpu-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index 26b00b7a2..bb5daa30a 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -42,6 +42,6 @@ jobs: - name: verify build folder run: | cd build - Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\ -Recurse + Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Recurse # TODO : adding shared library to the build From c9c26dcecdee0836da4c15460a9f4e3572cbe81b Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 22:20:20 -0800 Subject: [PATCH 12/27] Only Check Release folder --- .github/workflows/win-cpu-build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index bb5daa30a..14cef8289 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -1,8 +1,9 @@ on: [ workflow_dispatch, push, pull_request ] env: - ort_dir: "onnxruntime-win-x64-1.16.3" + ort_ver: "1.16.3" + ort_dir: "onnxruntime-win-x64-$(ort_ver)" ort_zip: "$(ort_dir).zip" - ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/onnxruntime-win-x64-1.16.3.zip" + ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v$(ort_ver)/$(ort_zip)" jobs: job: From 5a1bb0d4e81ba7148f70cc73811491acec0587d7 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 22:26:34 -0800 Subject: [PATCH 13/27] Only Check Release folder --- .github/workflows/win-cpu-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index 14cef8289..392b5a70f 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -1,9 +1,9 @@ on: [ workflow_dispatch, push, pull_request ] env: - ort_ver: "1.16.3" - ort_dir: "onnxruntime-win-x64-$(ort_ver)" + ort_version: "1.16.3" + ort_dir: "onnxruntime-win-x64-$(ort_version)" ort_zip: "$(ort_dir).zip" - ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v$(ort_ver)/$(ort_zip)" + ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v$(ort_version)/$(ort_zip)" jobs: job: From 8f2adeeebef63166e1c136075500f8ffead91d59 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 22:28:35 -0800 Subject: [PATCH 14/27] Only Check Release folder --- .github/workflows/win-cpu-build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index 392b5a70f..d4646890b 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -1,9 +1,8 @@ on: [ workflow_dispatch, push, pull_request ] env: - ort_version: "1.16.3" - ort_dir: "onnxruntime-win-x64-$(ort_version)" + ort_dir: "onnxruntime-win-x64-1.16.3" ort_zip: "$(ort_dir).zip" - ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v$(ort_version)/$(ort_zip)" + ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.16.3/$(ort_zip)" jobs: job: From ab42c325ed556724f33e52e17f8455afd66beae5 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 22:53:10 -0800 Subject: [PATCH 15/27] Only Check Release folder --- .github/workflows/win-cpu-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index d4646890b..a17bd03aa 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -37,7 +37,7 @@ jobs: run: | mkdir build cd build - cmake -G "Visual Studio 17 2022" -A x64 .. + cmake -G "Visual Studio 17 2022" -A x64 .. -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release cmake --build . --config Release --parallel - name: verify build folder run: | From 1d11b084d3e1dfaa961f14fcf0e6283f32a19f31 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 23:21:20 -0800 Subject: [PATCH 16/27] Implmenting placeholder for the missing OgaResult constructor --- src/ort_genai_c.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ort_genai_c.cpp b/src/ort_genai_c.cpp index 0403dd621..1db09029d 100644 --- a/src/ort_genai_c.cpp +++ b/src/ort_genai_c.cpp @@ -20,7 +20,8 @@ OrtEnv& GetOrtEnv() { extern "C" { struct OgaResult { - OgaResult(const char *what); + OgaResult(const char *what){} + // TODO: implement this constructor !!!! }; OgaResult* OgaCreateModel(const char* config_path, OgaDeviceType device_type, OgaModel** out) { From 08aa8dbf7fd88d6ff3c2652e5be52de113f9574a Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 23:37:47 -0800 Subject: [PATCH 17/27] Comment out Pybind because it is seeking static onnxruntime-genai libaries --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 562122a94..83d8527dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,12 +115,12 @@ add_executable (Tests ${test_srcs}) target_include_directories(Tests PRIVATE ${CMAKE_SOURCE_DIR}/ort/include) target_link_directories(Tests PRIVATE ${CMAKE_SOURCE_DIR}/ort/lib) target_link_libraries(Tests PRIVATE onnxruntime-genai ${ONNXRUNTIME_LIB}) - -pybind11_add_module(pybind ${pybind_srcs}) -target_include_directories(pybind PRIVATE ${CMAKE_SOURCE_DIR}/ort/include) -target_link_directories(pybind PRIVATE ${CMAKE_SOURCE_DIR}/ort/lib) -target_link_libraries(pybind PRIVATE onnxruntime-genai ${ONNXRUNTIME_LIB}) -set_target_properties(pybind PROPERTIES OUTPUT_NAME "onnxruntime_genai") +# +#pybind11_add_module(pybind ${pybind_srcs}) +#target_include_directories(pybind PRIVATE ${CMAKE_SOURCE_DIR}/ort/include) +#target_link_directories(pybind PRIVATE ${CMAKE_SOURCE_DIR}/ort/lib) +#target_link_libraries(pybind PRIVATE onnxruntime-genai ${ONNXRUNTIME_LIB}) +#set_target_properties(pybind PROPERTIES OUTPUT_NAME "onnxruntime_genai") # Visual C++ - /MP Multiple process build, /WX Warnings as errors # Enable: From a60db79e7ad67d57d0b481a8eb49995c6dff442d Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Thu, 18 Jan 2024 23:40:17 -0800 Subject: [PATCH 18/27] Comment out Test because it is seeking static onnxruntime-genai libaries --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 83d8527dc..4dcca781e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,10 +111,10 @@ else() set(ONNXRUNTIME_FILES "libonnxruntime*.so*") endif() -add_executable (Tests ${test_srcs}) -target_include_directories(Tests PRIVATE ${CMAKE_SOURCE_DIR}/ort/include) -target_link_directories(Tests PRIVATE ${CMAKE_SOURCE_DIR}/ort/lib) -target_link_libraries(Tests PRIVATE onnxruntime-genai ${ONNXRUNTIME_LIB}) +#add_executable (Tests ${test_srcs}) +#target_include_directories(Tests PRIVATE ${CMAKE_SOURCE_DIR}/ort/include) +#target_link_directories(Tests PRIVATE ${CMAKE_SOURCE_DIR}/ort/lib) +#target_link_libraries(Tests PRIVATE onnxruntime-genai ${ONNXRUNTIME_LIB}) # #pybind11_add_module(pybind ${pybind_srcs}) #target_include_directories(pybind PRIVATE ${CMAKE_SOURCE_DIR}/ort/include) From b0bd41b9abc97475136638090613974756fa83b3 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Fri, 19 Jan 2024 09:40:19 -0800 Subject: [PATCH 19/27] Make the GHA run on pull_request and manually triggers. --- .github/workflows/win-cpu-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index a17bd03aa..8f38dc7d4 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -1,4 +1,4 @@ -on: [ workflow_dispatch, push, pull_request ] +on: [ workflow_dispatch, pull_request ] env: ort_dir: "onnxruntime-win-x64-1.16.3" ort_zip: "$(ort_dir).zip" From ab36ee2273b256367f9083ba908cce15859bc3bd Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Fri, 19 Jan 2024 09:41:10 -0800 Subject: [PATCH 20/27] Remove TODO --- .github/workflows/win-cpu-build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-build.yml index 8f38dc7d4..99b2ec11f 100644 --- a/.github/workflows/win-cpu-build.yml +++ b/.github/workflows/win-cpu-build.yml @@ -43,5 +43,3 @@ jobs: run: | cd build Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Recurse -# TODO : adding shared library to the build - From 491de91b6360688b893111507e8ebe0c9f112809 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Fri, 19 Jan 2024 10:08:26 -0800 Subject: [PATCH 21/27] Rename yml file to make it consistent in the future. --- .github/workflows/{win-cpu-build.yml => win-cpu-x64-build.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{win-cpu-build.yml => win-cpu-x64-build.yml} (100%) diff --git a/.github/workflows/win-cpu-build.yml b/.github/workflows/win-cpu-x64-build.yml similarity index 100% rename from .github/workflows/win-cpu-build.yml rename to .github/workflows/win-cpu-x64-build.yml From a2d9028cf33f5ca15f668505deb2b8919e0aad77 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Fri, 19 Jan 2024 10:47:30 -0800 Subject: [PATCH 22/27] Adding a step to upload build artifact --- .github/workflows/win-cpu-x64-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index 99b2ec11f..6afc85665 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -43,3 +43,8 @@ jobs: run: | cd build Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Recurse + - name: upload artifact + uses: actions/upload-artifact@v2 + with: + name: onnxruntime-genai-win-cpu-x64 + path: $env:GITHUB_WORKSPACE\build\Release From a228364ef2187cfdae01415b17624d1ab92f8fd0 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Fri, 19 Jan 2024 10:49:32 -0800 Subject: [PATCH 23/27] Change steps names to make them more meaningful. --- .github/workflows/win-cpu-x64-build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index 6afc85665..239d22cd5 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -39,11 +39,13 @@ jobs: cd build cmake -G "Visual Studio 17 2022" -A x64 .. -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release cmake --build . --config Release --parallel - - name: verify build folder + + - name: Verify Build Artifacts run: | cd build Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Recurse - - name: upload artifact + + - name: Upload Build Artifacts uses: actions/upload-artifact@v2 with: name: onnxruntime-genai-win-cpu-x64 From 4492ec8090b76a24f6b2abe3f5d804974b466211 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Fri, 19 Jan 2024 10:51:06 -0800 Subject: [PATCH 24/27] Update artifact patten --- .github/workflows/win-cpu-x64-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index 239d22cd5..868d5de29 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -42,11 +42,10 @@ jobs: - name: Verify Build Artifacts run: | - cd build Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Recurse - name: Upload Build Artifacts uses: actions/upload-artifact@v2 with: name: onnxruntime-genai-win-cpu-x64 - path: $env:GITHUB_WORKSPACE\build\Release + path: $env:GITHUB_WORKSPACE\build\Release\*.dll From 206da4fdc5d3651800cff51be87bcb3a4611a4d1 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Fri, 19 Jan 2024 10:53:15 -0800 Subject: [PATCH 25/27] Update artifact patten --- .github/workflows/win-cpu-x64-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index 868d5de29..e4961846f 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -48,4 +48,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: onnxruntime-genai-win-cpu-x64 - path: $env:GITHUB_WORKSPACE\build\Release\*.dll + path: "$env:GITHUB_WORKSPACE\build\Release\*" From 09716b3a942d6c93016ca8cb28ea91f3bf08135d Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Fri, 19 Jan 2024 10:53:55 -0800 Subject: [PATCH 26/27] Update artifact patten --- .github/workflows/win-cpu-x64-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index e4961846f..d278aecb1 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -48,4 +48,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: onnxruntime-genai-win-cpu-x64 - path: "$env:GITHUB_WORKSPACE\build\Release\*" + path: "$(env:GITHUB_WORKSPACE)/build/Release/*" From dad69cdafb39f11e49856a1cae6ff661be783612 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Fri, 19 Jan 2024 10:57:04 -0800 Subject: [PATCH 27/27] Change steps names to make them more meaningful. --- .github/workflows/win-cpu-x64-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index d278aecb1..63474da06 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: set up Visual Studio 2022 + - name: Setup Visual Studio 2022 uses: microsoft/setup-msbuild@v1.1 with: vs-version: '17.5' @@ -45,7 +45,7 @@ jobs: Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Recurse - name: Upload Build Artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: onnxruntime-genai-win-cpu-x64 - path: "$(env:GITHUB_WORKSPACE)/build/Release/*" + path: build/Release/*