diff --git a/.github/workflows/bigdl-build-portable-zip.yml b/.github/workflows/bigdl-build-portable-zip.yml index 50b86a857c5..a9bac241675 100644 --- a/.github/workflows/bigdl-build-portable-zip.yml +++ b/.github/workflows/bigdl-build-portable-zip.yml @@ -32,5 +32,21 @@ jobs: with: name: cpython-3.9-embed-zip path: ./PCbuild/amd64/en-us/cpython-embed-zip.zip - - \ No newline at end of file + build-portable-zip: + needs: build-cpython + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: cpython-3.9-embed-zip + path: ./python/llm/portable-zip/ + - name: Build Portable Zip + shell: cmd + run: | + cd .\python\llm\portable-zip + setup.bat --python-zip + - uses: actions/upload-artifact@v4 + with: + name: portable-zip + path: ./python/llm/portable-zip/bigdl-llm.zip diff --git a/python/llm/portable-zip/setup.bat b/python/llm/portable-zip/setup.bat index b509a2b2eb6..f428275edd6 100644 --- a/python/llm/portable-zip/setup.bat +++ b/python/llm/portable-zip/setup.bat @@ -1,7 +1,13 @@ :: download python and extract zip -powershell -Command "Start-BitsTransfer -Source https://www.python.org/ftp/python/3.9.13/python-3.9.13-embed-amd64.zip -Destination python-3.9.13-embed-amd64.zip" -powershell -Command "Expand-Archive .\python-3.9.13-embed-amd64.zip -DestinationPath .\python-embed" -del .\python-3.9.13-embed-amd64.zip +if "%1"=="--python-zip" ( + powershell -Command "Expand-Archive .\cpython-3.9-embed-zip.zip -DestinationPath ." + powershell -Command "Expand-Archive .\cpython-embed-zip.zip -DestinationPath .\python-embed" +) else ( + powershell -Command "Start-BitsTransfer -Source https://www.python.org/ftp/python/3.9.13/python-3.9.13-embed-amd64.zip -Destination python-3.9.13-embed-amd64.zip" + powershell -Command "Expand-Archive .\python-3.9.13-embed-amd64.zip -DestinationPath .\python-embed" + del .\python-3.9.13-embed-amd64.zip +) + set "python-embed=.\python-embed\python.exe"