From b2d792e7c4eba24c47279f6a42b389af88673f2d Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 17:41:48 -0700 Subject: [PATCH 01/34] Create win.yml --- .github/workflows/win.yml | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/win.yml diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml new file mode 100644 index 00000000000..cf705cb4ebf --- /dev/null +++ b/.github/workflows/win.yml @@ -0,0 +1,55 @@ +name: WindowsRelease + +on: + push: + branches: [ master, rel-* ] + pull_request: + branches: [ master, rel-* ] + + +jobs: + build: + runs-on: windows-latest + strategy: + matrix: + python-version: [3.6] + architecture: ['x64'] + steps: + - uses: actions/checkout@v2 + - name: Checkout submodules + shell: bash + run: | + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + architecture: ${{ matrix.architecture }} + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + # pytest 6.0 made deprecation warnings fail by default, pinning pytest to 5.4.3. + # TODO replace deprecated function with the suggested one. https://docs.pytest.org/en/stable/deprecations.html#id5 + pip install pytest==5.4.3 nbval numpy wheel + + - name: Checkout Protobuf + uses: actions/checkout@release + with: + name: protocolbuffers/protobuf + ref: refs/tags/v3.11.3 + + - name: Build wheel + run: | + $Env:USE_MSVC_STATIC_RUNTIME=1 + $Env:ONNX_ML=1 + $Env:CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON -DONNX_USE_LITE_PROTO=ON -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{ matrix.architecture }}-windows-static" + python setup.py bdist_wheel + Get-ChildItem -Path dist/*.whl | foreach {pip install --upgrade $_.fullname} + pytest + # TODO: upload to PyPI automatically + - uses: actions/upload-artifact@v1 + with: + name: wheels + path: dist From 4b49012113e072dda6844fefbe7516223d04a3ed Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 17:43:57 -0700 Subject: [PATCH 02/34] Update win.yml --- .github/workflows/win.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index cf705cb4ebf..f66c99ff2c2 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -35,7 +35,7 @@ jobs: pip install pytest==5.4.3 nbval numpy wheel - name: Checkout Protobuf - uses: actions/checkout@release + uses: actions/checkout@master with: name: protocolbuffers/protobuf ref: refs/tags/v3.11.3 From 4e941c433c69fafc1531bc8d54e4fdea3e3c5b20 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 17:48:30 -0700 Subject: [PATCH 03/34] Update win.yml --- .github/workflows/win.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index f66c99ff2c2..451c2faca27 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -15,6 +15,12 @@ jobs: python-version: [3.6] architecture: ['x64'] steps: + - name: Checkout Protobuf + uses: actions/checkout@master + with: + repository: protocolbuffers/protobuf + ref: refs/tags/v3.11.3 + - uses: actions/checkout@v2 - name: Checkout submodules shell: bash @@ -32,13 +38,7 @@ jobs: python -m pip install --upgrade pip # pytest 6.0 made deprecation warnings fail by default, pinning pytest to 5.4.3. # TODO replace deprecated function with the suggested one. https://docs.pytest.org/en/stable/deprecations.html#id5 - pip install pytest==5.4.3 nbval numpy wheel - - - name: Checkout Protobuf - uses: actions/checkout@master - with: - name: protocolbuffers/protobuf - ref: refs/tags/v3.11.3 + pip install pytest==5.4.3 nbval numpy wheel - name: Build wheel run: | From 2a9abe9578e33d7874398f453996582536deebbf Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 17:54:32 -0700 Subject: [PATCH 04/34] Update win.yml --- .github/workflows/win.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 451c2faca27..17e475a5b69 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -15,12 +15,19 @@ jobs: python-version: [3.6] architecture: ['x64'] steps: + - name: Show Working directory + run: dir + - name: Checkout Protobuf uses: actions/checkout@master with: repository: protocolbuffers/protobuf ref: refs/tags/v3.11.3 - + path: ./protobuf_dir + + - name: Show Working directory + run: dir + - uses: actions/checkout@v2 - name: Checkout submodules shell: bash @@ -33,6 +40,10 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} + + - name: Show Working directory + run: dir + - name: Install python dependencies run: | python -m pip install --upgrade pip From 6b4b7d4bfe25be5d3485903d7ae83489f476dcdd Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 17:59:13 -0700 Subject: [PATCH 05/34] Update win.yml --- .github/workflows/win.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 17e475a5b69..dba06c6c920 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -23,12 +23,16 @@ jobs: with: repository: protocolbuffers/protobuf ref: refs/tags/v3.11.3 - path: ./protobuf_dir + path: ../protobuf_dir - name: Show Working directory run: dir - - uses: actions/checkout@v2 + - name: Checkout ONNX + uses: actions/checkout@v2 + with: + path: . + - name: Checkout submodules shell: bash run: | From c4f57c351d1d9b474a2f061163223973eea41412 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 18:00:22 -0700 Subject: [PATCH 06/34] Update win.yml --- .github/workflows/win.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index dba06c6c920..c8c0650c401 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -23,7 +23,7 @@ jobs: with: repository: protocolbuffers/protobuf ref: refs/tags/v3.11.3 - path: ../protobuf_dir + path: ./protobuf_dir - name: Show Working directory run: dir @@ -31,7 +31,7 @@ jobs: - name: Checkout ONNX uses: actions/checkout@v2 with: - path: . + path: ./onnx - name: Checkout submodules shell: bash From 7a86c0153b13a3221dcffa38a64b7ea2bee601ef Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 18:03:07 -0700 Subject: [PATCH 07/34] Update win.yml --- .github/workflows/win.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index c8c0650c401..4ab3f9d3c03 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -36,9 +36,12 @@ jobs: - name: Checkout submodules shell: bash run: | - auth_header="$(git config --local --get http.https://github.com/.extraheader)" - git submodule sync --recursive - git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 + dir + cd onnx + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: From cbee4d575e075eeafbbfaded86e53de915016228 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 20:54:03 -0700 Subject: [PATCH 08/34] Update win.yml --- .github/workflows/win.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 4ab3f9d3c03..c523f1f1765 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -24,7 +24,16 @@ jobs: repository: protocolbuffers/protobuf ref: refs/tags/v3.11.3 path: ./protobuf_dir - + + - name: Install Protobuf + run: | + mkdir protobuf_install + cd protobuf_dir + cd cmake + cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=../../protobuf_install -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF + msbuild protobuf.sln /m /p:Configuration=Release + msbuild INSTALL.vcxproj /p:Configuration=Release + - name: Show Working directory run: dir From 06aa2aba8684d6da08c3ad702ca8d3e30e84ede1 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 20:58:20 -0700 Subject: [PATCH 09/34] Update win.yml --- .github/workflows/win.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index c523f1f1765..8df37a2e4d1 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -25,6 +25,9 @@ jobs: ref: refs/tags/v3.11.3 path: ./protobuf_dir + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + - name: Install Protobuf run: | mkdir protobuf_install From f3e568f493ee5f84b70cd12226b61fa863e0f32b Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 21:00:53 -0700 Subject: [PATCH 10/34] Update win.yml --- .github/workflows/win.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 8df37a2e4d1..1a87b83223b 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -14,10 +14,7 @@ jobs: matrix: python-version: [3.6] architecture: ['x64'] - steps: - - name: Show Working directory - run: dir - + steps: - name: Checkout Protobuf uses: actions/checkout@master with: @@ -28,9 +25,13 @@ jobs: - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.0.2 + - name: Show Working directory + run: dir + - name: Install Protobuf run: | mkdir protobuf_install + dir cd protobuf_dir cd cmake cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=../../protobuf_install -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF From ff1f856946e72e9fb4691cef88fad15a9903417f Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 21:03:47 -0700 Subject: [PATCH 11/34] Update win.yml --- .github/workflows/win.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 1a87b83223b..042c90fbd81 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -26,14 +26,18 @@ jobs: uses: microsoft/setup-msbuild@v1.0.2 - name: Show Working directory - run: dir + run: | + dir + mkdir protobuf_install + dir - name: Install Protobuf run: | - mkdir protobuf_install dir cd protobuf_dir + dir cd cmake + dir cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=../../protobuf_install -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF msbuild protobuf.sln /m /p:Configuration=Release msbuild INSTALL.vcxproj /p:Configuration=Release From 17e55fb60f81f1b6d5f5b5c5cdda90772cf0ac42 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 21:24:25 -0700 Subject: [PATCH 12/34] Update win.yml --- .github/workflows/win.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 042c90fbd81..d976982fdb2 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -20,27 +20,26 @@ jobs: with: repository: protocolbuffers/protobuf ref: refs/tags/v3.11.3 - path: ./protobuf_dir + path: ./protobuf_root/protobuf - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.0.2 - name: Show Working directory + working-directory: ./protobuf_root run: | dir mkdir protobuf_install dir - name: Install Protobuf + working-directory: ./protobuf_root/protobuf run: | - dir - cd protobuf_dir dir cd cmake dir cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=../../protobuf_install -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF - msbuild protobuf.sln /m /p:Configuration=Release - msbuild INSTALL.vcxproj /p:Configuration=Release + - name: Show Working directory run: dir From 7584873262b082776a374405ba61b83a3e325db9 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 21:32:32 -0700 Subject: [PATCH 13/34] Update win.yml --- .github/workflows/win.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index d976982fdb2..48ef809b61b 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -33,10 +33,8 @@ jobs: dir - name: Install Protobuf - working-directory: ./protobuf_root/protobuf - run: | - dir - cd cmake + working-directory: ./protobuf_root/protobuf/cmake + run: | dir cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=../../protobuf_install -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF From 73a54fe967c1ab8222321aada9707ebd47dbd8b6 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 21:41:21 -0700 Subject: [PATCH 14/34] Update win.yml --- .github/workflows/win.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 48ef809b61b..7db688f9ffd 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -36,7 +36,7 @@ jobs: working-directory: ./protobuf_root/protobuf/cmake run: | dir - cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=../../protobuf_install -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF + cmake -G "Visual Studio 16 2019" -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF - name: Show Working directory From 60856d9c99c90177915e4c664fc926b38431187e Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 21:47:28 -0700 Subject: [PATCH 15/34] Update win.yml --- .github/workflows/win.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 7db688f9ffd..f20be890762 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -37,7 +37,9 @@ jobs: run: | dir cmake -G "Visual Studio 16 2019" -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF - + msbuild protobuf.sln /m /p:Configuration=Release + msbuild INSTALL.vcxproj /p:Configuration=Release + - name: Show Working directory run: dir @@ -52,6 +54,7 @@ jobs: run: | dir cd onnx + dir auth_header="$(git config --local --get http.https://github.com/.extraheader)" git submodule sync --recursive git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 @@ -61,10 +64,7 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} - - - name: Show Working directory - run: dir - + - name: Install python dependencies run: | python -m pip install --upgrade pip @@ -73,6 +73,7 @@ jobs: pip install pytest==5.4.3 nbval numpy wheel - name: Build wheel + working-directory: ./onnx run: | $Env:USE_MSVC_STATIC_RUNTIME=1 $Env:ONNX_ML=1 @@ -81,7 +82,8 @@ jobs: Get-ChildItem -Path dist/*.whl | foreach {pip install --upgrade $_.fullname} pytest # TODO: upload to PyPI automatically + - uses: actions/upload-artifact@v1 with: name: wheels - path: dist + path: ./onnx/dist From a5169c6cbe69a4e207b650e80d1d3ab0be8cea11 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 21:59:32 -0700 Subject: [PATCH 16/34] Update win.yml --- .github/workflows/win.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index f20be890762..846880a8663 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -36,11 +36,10 @@ jobs: working-directory: ./protobuf_root/protobuf/cmake run: | dir - cmake -G "Visual Studio 16 2019" -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF + cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=../../protobuf_install -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF . msbuild protobuf.sln /m /p:Configuration=Release msbuild INSTALL.vcxproj /p:Configuration=Release - - name: Show Working directory run: dir From 4012dd8d2e6e8035826402e516debb2495ac0067 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 22:28:00 -0700 Subject: [PATCH 17/34] Update win.yml --- .github/workflows/win.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 846880a8663..a7d6d326fa9 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -40,8 +40,19 @@ jobs: msbuild protobuf.sln /m /p:Configuration=Release msbuild INSTALL.vcxproj /p:Configuration=Release - - name: Show Working directory - run: dir + - name: Set path variable + working-directory: ./protobuf_root/protobuf_install + run: | + dir + $current_dir = Get-Location + $current-dir + echo "{current-dir}" >> $GITHUB_PATH + + + - name: Check PATH variable + run: | + $x = Get-ChildItem Env:Path + $x.Value - name: Checkout ONNX uses: actions/checkout@v2 From a91d64f204ef35f92c82325c78c9bca26598de4f Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 22:42:06 -0700 Subject: [PATCH 18/34] Update win.yml --- .github/workflows/win.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index a7d6d326fa9..3e685d7936d 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -45,8 +45,8 @@ jobs: run: | dir $current_dir = Get-Location - $current-dir - echo "{current-dir}" >> $GITHUB_PATH + $current_dir + echo "{current_dir}" >> $GITHUB_PATH - name: Check PATH variable From 6612dd772cbd869ebc5b30f0ecd34b0e0c5528fe Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 23:05:47 -0700 Subject: [PATCH 19/34] Update win.yml --- .github/workflows/win.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 3e685d7936d..ecd7f513142 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -49,10 +49,10 @@ jobs: echo "{current_dir}" >> $GITHUB_PATH - - name: Check PATH variable + - name: Check Protobuf Installation + working-directory: ./protobuf_root/protobuf_install run: | - $x = Get-ChildItem Env:Path - $x.Value + dir - name: Checkout ONNX uses: actions/checkout@v2 @@ -85,6 +85,13 @@ jobs: - name: Build wheel working-directory: ./onnx run: | + $workspace_dir = $GITHUB_WORKSPACE + $protoc_path = Join-Path -Path $GITHUB_WORKSPACE -ChildPath "protobuf_root\protobuf_install\bin" + $protobuf_lib = Join-Path -Path $GITHUB_WORKSPACE -ChildPath "protobuf_root\protobuf_install\lib" + $protobuf_include = Join-Path -Path $GITHUB_WORKSPACE -ChildPath "protobuf_root\protobuf_install\include" + $Env:PATH="$ENV:PATH;$protoc_path;$protobuf_lib;$protobuf_include" + $($Env:PATH).Split(';') + $Env:USE_MSVC_STATIC_RUNTIME=1 $Env:ONNX_ML=1 $Env:CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON -DONNX_USE_LITE_PROTO=ON -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{ matrix.architecture }}-windows-static" From 61be071c465c5cb7444800eba40bfe2be1633076 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 23:22:35 -0700 Subject: [PATCH 20/34] Update win.yml --- .github/workflows/win.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index ecd7f513142..fdb7ae6022c 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -39,6 +39,12 @@ jobs: cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=../../protobuf_install -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF . msbuild protobuf.sln /m /p:Configuration=Release msbuild INSTALL.vcxproj /p:Configuration=Release + dir + $current_dir = Get-Location + $protoc_path = Join-Path -Path $current_dir -ChildPath "Release" + $Env:PATH="$ENV:PATH;$protoc_path" + $($Env:PATH).Split(';') + protoc - name: Set path variable working-directory: ./protobuf_root/protobuf_install @@ -84,12 +90,7 @@ jobs: - name: Build wheel working-directory: ./onnx - run: | - $workspace_dir = $GITHUB_WORKSPACE - $protoc_path = Join-Path -Path $GITHUB_WORKSPACE -ChildPath "protobuf_root\protobuf_install\bin" - $protobuf_lib = Join-Path -Path $GITHUB_WORKSPACE -ChildPath "protobuf_root\protobuf_install\lib" - $protobuf_include = Join-Path -Path $GITHUB_WORKSPACE -ChildPath "protobuf_root\protobuf_install\include" - $Env:PATH="$ENV:PATH;$protoc_path;$protobuf_lib;$protobuf_include" + run: | $($Env:PATH).Split(';') $Env:USE_MSVC_STATIC_RUNTIME=1 From 478f2a5c8df4e3831f6bc24ebf68f1d5d282934f Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Thu, 29 Oct 2020 23:35:04 -0700 Subject: [PATCH 21/34] Update win.yml --- .github/workflows/win.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index fdb7ae6022c..aea82e9ee5c 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -43,16 +43,15 @@ jobs: $current_dir = Get-Location $protoc_path = Join-Path -Path $current_dir -ChildPath "Release" $Env:PATH="$ENV:PATH;$protoc_path" - $($Env:PATH).Split(';') - protoc - + echo "$protoc_path" >> $GITHUB_PATH + - name: Set path variable working-directory: ./protobuf_root/protobuf_install run: | dir - $current_dir = Get-Location - $current_dir - echo "{current_dir}" >> $GITHUB_PATH + $($Env:PATH).Split(';') + protoc + - name: Check Protobuf Installation From b5af77ab6e29ec3064c0452431c45cd3d4d2a940 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Fri, 30 Oct 2020 09:55:23 -0700 Subject: [PATCH 22/34] Update win.yml --- .github/workflows/win.yml | 59 +++++++++++++++------------------------ 1 file changed, 22 insertions(+), 37 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index aea82e9ee5c..3f392212d40 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -24,41 +24,7 @@ jobs: - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.0.2 - - - name: Show Working directory - working-directory: ./protobuf_root - run: | - dir - mkdir protobuf_install - dir - - - name: Install Protobuf - working-directory: ./protobuf_root/protobuf/cmake - run: | - dir - cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=../../protobuf_install -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF . - msbuild protobuf.sln /m /p:Configuration=Release - msbuild INSTALL.vcxproj /p:Configuration=Release - dir - $current_dir = Get-Location - $protoc_path = Join-Path -Path $current_dir -ChildPath "Release" - $Env:PATH="$ENV:PATH;$protoc_path" - echo "$protoc_path" >> $GITHUB_PATH - - - name: Set path variable - working-directory: ./protobuf_root/protobuf_install - run: | - dir - $($Env:PATH).Split(';') - protoc - - - - - name: Check Protobuf Installation - working-directory: ./protobuf_root/protobuf_install - run: | - dir - + - name: Checkout ONNX uses: actions/checkout@v2 with: @@ -88,14 +54,33 @@ jobs: pip install pytest==5.4.3 nbval numpy wheel - name: Build wheel - working-directory: ./onnx run: | $($Env:PATH).Split(';') + echo "Install protobuf" + dir + cd ./protobuf_root/protobuf/cmake + dir + mkdir protobuf_install + cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=./protobuf_install -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF . + msbuild protobuf.sln /m /p:Configuration=Release + msbuild INSTALL.vcxproj /p:Configuration=Release + echo "Protobuf installation complete." + echo "Set paths" + dir + cd protobuf_install + $current_dir = Get-Location + $protoc_path = Join-Path -Path $current_dir -ChildPath "bin" + $Env:PATH="$ENV:PATH;$protoc_path" + $($Env:PATH).Split(';') + protoc + cd ../../../../onnx + dir + echo "Install ONNX" $Env:USE_MSVC_STATIC_RUNTIME=1 $Env:ONNX_ML=1 $Env:CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON -DONNX_USE_LITE_PROTO=ON -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{ matrix.architecture }}-windows-static" - python setup.py bdist_wheel + python setup.py bdist_wheel --project-dir ./onnx Get-ChildItem -Path dist/*.whl | foreach {pip install --upgrade $_.fullname} pytest # TODO: upload to PyPI automatically From 9e7f36a601888a288f665f09cd9979f060ac2a0b Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Fri, 30 Oct 2020 10:14:31 -0700 Subject: [PATCH 23/34] Update win.yml --- .github/workflows/win.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 3f392212d40..fd82bded00a 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -68,6 +68,7 @@ jobs: echo "Set paths" dir cd protobuf_install + dir $current_dir = Get-Location $protoc_path = Join-Path -Path $current_dir -ChildPath "bin" $Env:PATH="$ENV:PATH;$protoc_path" From bd6382dab7613ea722a70eb2d852e0c260404a95 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Fri, 30 Oct 2020 10:22:42 -0700 Subject: [PATCH 24/34] Update win.yml --- .github/workflows/win.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index fd82bded00a..38c16e39605 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -67,10 +67,12 @@ jobs: echo "Protobuf installation complete." echo "Set paths" dir - cd protobuf_install + cd Release + dir + cd .. dir $current_dir = Get-Location - $protoc_path = Join-Path -Path $current_dir -ChildPath "bin" + $protoc_path = Join-Path -Path $current_dir -ChildPath "Release" $Env:PATH="$ENV:PATH;$protoc_path" $($Env:PATH).Split(';') protoc From be642dccb944f16eed767691ceca097b3e72973f Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Fri, 30 Oct 2020 10:42:00 -0700 Subject: [PATCH 25/34] Update win.yml --- .github/workflows/win.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 38c16e39605..62cfef15db9 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -77,7 +77,7 @@ jobs: $($Env:PATH).Split(';') protoc - cd ../../../../onnx + cd ../../../onnx dir echo "Install ONNX" $Env:USE_MSVC_STATIC_RUNTIME=1 From 6a285158874c92f57d46aa90ad4a07c451111b59 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Fri, 30 Oct 2020 10:50:28 -0700 Subject: [PATCH 26/34] Update win.yml --- .github/workflows/win.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 62cfef15db9..be68c1ccd1b 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -83,7 +83,7 @@ jobs: $Env:USE_MSVC_STATIC_RUNTIME=1 $Env:ONNX_ML=1 $Env:CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON -DONNX_USE_LITE_PROTO=ON -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{ matrix.architecture }}-windows-static" - python setup.py bdist_wheel --project-dir ./onnx + python setup.py bdist_wheel Get-ChildItem -Path dist/*.whl | foreach {pip install --upgrade $_.fullname} pytest # TODO: upload to PyPI automatically From 299e935082e08798477eebbd080dbaf654cb3824 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Fri, 30 Oct 2020 14:12:14 -0700 Subject: [PATCH 27/34] Update win.yml --- .github/workflows/win.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index be68c1ccd1b..5be49452386 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -74,6 +74,9 @@ jobs: $current_dir = Get-Location $protoc_path = Join-Path -Path $current_dir -ChildPath "Release" $Env:PATH="$ENV:PATH;$protoc_path" + cd .. + $current_dir = Get-Location + $protoc_path = Join-Path -Path $current_dir -ChildPath "src" $($Env:PATH).Split(';') protoc From 1c29938f347b8795de767b2d22e9453b018e696c Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Fri, 30 Oct 2020 14:26:19 -0700 Subject: [PATCH 28/34] Update win.yml --- .github/workflows/win.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 5be49452386..e97131442d2 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -66,7 +66,6 @@ jobs: msbuild INSTALL.vcxproj /p:Configuration=Release echo "Protobuf installation complete." echo "Set paths" - dir cd Release dir cd .. @@ -76,7 +75,8 @@ jobs: $Env:PATH="$ENV:PATH;$protoc_path" cd .. $current_dir = Get-Location - $protoc_path = Join-Path -Path $current_dir -ChildPath "src" + $protobuf_include_path = Join-Path -Path $current_dir -ChildPath "src" + $Env:PATH="$ENV:PATH;$protobuf_include_path" $($Env:PATH).Split(';') protoc From b42eb4b92e8d44b5128acd72b61b018fe3d5bab5 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Fri, 30 Oct 2020 14:32:12 -0700 Subject: [PATCH 29/34] Update win.yml --- .github/workflows/win.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index e97131442d2..137e7c5fd72 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -80,7 +80,7 @@ jobs: $($Env:PATH).Split(';') protoc - cd ../../../onnx + cd ../../onnx dir echo "Install ONNX" $Env:USE_MSVC_STATIC_RUNTIME=1 From 750012cc17f6313ac08b989c474e7e493c75be83 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Fri, 30 Oct 2020 15:07:51 -0700 Subject: [PATCH 30/34] Update win.yml --- .github/workflows/win.yml | 41 +++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 137e7c5fd72..1e96ac0b16b 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -22,9 +22,6 @@ jobs: ref: refs/tags/v3.11.3 path: ./protobuf_root/protobuf - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 - - name: Checkout ONNX uses: actions/checkout@v2 with: @@ -33,13 +30,19 @@ jobs: - name: Checkout submodules shell: bash run: | - dir cd onnx - dir auth_header="$(git config --local --get http.https://github.com/.extraheader)" git submodule sync --recursive git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + - name: Checkout ONNX + uses: actions/checkout@v2 + with: + path: ./onnx + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: @@ -55,32 +58,25 @@ jobs: - name: Build wheel run: | - $($Env:PATH).Split(';') echo "Install protobuf" - dir - cd ./protobuf_root/protobuf/cmake + cd ./protobuf_root/protobuf + $protobuf_dir = Get-Location + cd ./cmake dir mkdir protobuf_install - cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=./protobuf_install -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF . + cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=./protobuf_install -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF . msbuild protobuf.sln /m /p:Configuration=Release msbuild INSTALL.vcxproj /p:Configuration=Release echo "Protobuf installation complete." - echo "Set paths" - cd Release - dir - cd .. - dir - $current_dir = Get-Location - $protoc_path = Join-Path -Path $current_dir -ChildPath "Release" - $Env:PATH="$ENV:PATH;$protoc_path" - cd .. - $current_dir = Get-Location - $protobuf_include_path = Join-Path -Path $current_dir -ChildPath "src" - $Env:PATH="$ENV:PATH;$protobuf_include_path" + + echo "Set paths" + $protoc_path = Join-Path -Path $protobuf_dir -ChildPath "cmake\Release" + $protobuf_include_path = Join-Path -Path $protobuf_dir -ChildPath "src" + $Env:PATH="$ENV:PATH;$protoc_path;$protobuf_include_path" $($Env:PATH).Split(';') protoc - cd ../../onnx + cd ../../../onnx dir echo "Install ONNX" $Env:USE_MSVC_STATIC_RUNTIME=1 @@ -89,7 +85,6 @@ jobs: python setup.py bdist_wheel Get-ChildItem -Path dist/*.whl | foreach {pip install --upgrade $_.fullname} pytest - # TODO: upload to PyPI automatically - uses: actions/upload-artifact@v1 with: From 88c829d6bd69882cc29741b5c37bf2a0f69a6b26 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Sun, 1 Nov 2020 16:10:36 -0800 Subject: [PATCH 31/34] Update win.yml --- .github/workflows/win.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 1e96ac0b16b..40fbad2e66a 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -22,12 +22,20 @@ jobs: ref: refs/tags/v3.11.3 path: ./protobuf_root/protobuf + - name: Checkout Protobuf submodules + shell: bash + run: | + cd ./protobuf_root/protobuf + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 + - name: Checkout ONNX uses: actions/checkout@v2 with: path: ./onnx - - name: Checkout submodules + - name: Checkout ONNX submodules shell: bash run: | cd onnx @@ -37,12 +45,7 @@ jobs: - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.0.2 - - - name: Checkout ONNX - uses: actions/checkout@v2 - with: - path: ./onnx - + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: @@ -56,7 +59,7 @@ jobs: # TODO replace deprecated function with the suggested one. https://docs.pytest.org/en/stable/deprecations.html#id5 pip install pytest==5.4.3 nbval numpy wheel - - name: Build wheel + - name: Build ONNX wheel run: | echo "Install protobuf" cd ./protobuf_root/protobuf @@ -81,7 +84,7 @@ jobs: echo "Install ONNX" $Env:USE_MSVC_STATIC_RUNTIME=1 $Env:ONNX_ML=1 - $Env:CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON -DONNX_USE_LITE_PROTO=ON -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{ matrix.architecture }}-windows-static" + $Env:CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON -DONNX_USE_LITE_PROTO=ON" python setup.py bdist_wheel Get-ChildItem -Path dist/*.whl | foreach {pip install --upgrade $_.fullname} pytest From ce8009676cc93ecdc0125c3ac450d578e1178594 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Sun, 1 Nov 2020 16:42:35 -0800 Subject: [PATCH 32/34] Update win.yml --- .github/workflows/win.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 40fbad2e66a..a1ee2e5dbf1 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -62,20 +62,21 @@ jobs: - name: Build ONNX wheel run: | echo "Install protobuf" - cd ./protobuf_root/protobuf - $protobuf_dir = Get-Location - cd ./cmake - dir + cd ./protobuf_root + $protobuf_root_dir = Get-Location mkdir protobuf_install - cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=./protobuf_install -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF . + cd ./protobuf/cmake + dir + cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX="../../protobuf_install" -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF . msbuild protobuf.sln /m /p:Configuration=Release msbuild INSTALL.vcxproj /p:Configuration=Release echo "Protobuf installation complete." echo "Set paths" - $protoc_path = Join-Path -Path $protobuf_dir -ChildPath "cmake\Release" - $protobuf_include_path = Join-Path -Path $protobuf_dir -ChildPath "src" - $Env:PATH="$ENV:PATH;$protoc_path;$protobuf_include_path" + $protoc_path = Join-Path -Path $protobuf_root_dir -ChildPath "protobuf_install\bin" + $protoc_lib_path = Join-Path -Path $protobuf_root_dir -ChildPath "protobuf_install\lib" + $protobuf_include_path = Join-Path -Path $protobuf_root_dir -ChildPath "protobuf_install\include" + $Env:PATH="$ENV:PATH;$protoc_path;$protoc_lib_path;$protobuf_include_path" $($Env:PATH).Split(';') protoc From 9faa91a9e9e8b0a5e47c4287022b7e192fce4e7c Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Sun, 1 Nov 2020 17:00:42 -0800 Subject: [PATCH 33/34] Update win.yml --- .github/workflows/win.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index a1ee2e5dbf1..06497ba92d4 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: python-version: [3.6] - architecture: ['x64'] + architecture: ['x64', 'x86'] steps: - name: Checkout Protobuf uses: actions/checkout@master From 3d612a9b025ece1793adc26baff9cab4cfbd5192 Mon Sep 17 00:00:00 2001 From: Ashwini Khade Date: Sun, 1 Nov 2020 17:25:43 -0800 Subject: [PATCH 34/34] Update win.yml --- .github/workflows/win.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 06497ba92d4..cfdf171f44a 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -61,13 +61,18 @@ jobs: - name: Build ONNX wheel run: | + $arch = 'x64' + if ('${{ matrix.architecture }}' -eq 'x86') { + $arch = 'Win32' + } echo "Install protobuf" cd ./protobuf_root $protobuf_root_dir = Get-Location mkdir protobuf_install cd ./protobuf/cmake dir - cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX="../../protobuf_install" -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF . + + cmake -G "Visual Studio 16 2019" -A $arch -DCMAKE_INSTALL_PREFIX="../../protobuf_install" -DCMAKE_BUILD_TYPE=Release -Dprotobuf_MSVC_STATIC_RUNTIME=ON -DProtobuf_USE_STATIC_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF . msbuild protobuf.sln /m /p:Configuration=Release msbuild INSTALL.vcxproj /p:Configuration=Release echo "Protobuf installation complete."