diff --git a/.github/workflows/build-windows-installer.yml b/.github/workflows/build-windows-installer.yml index 5ce9ad16a3..037e5f765d 100644 --- a/.github/workflows/build-windows-installer.yml +++ b/.github/workflows/build-windows-installer.yml @@ -21,6 +21,10 @@ jobs: name: Windows 10 Installer runs-on: [windows-2019] timeout-minutes: 50 + strategy: + fail-fast: false + matrix: + python-version: [3.9] steps: - name: Checkout Code @@ -61,9 +65,9 @@ jobs: # We can't upgrade to Python 3.8 until we have a miniupnpc binary - uses: actions/setup-python@v2 - name: Install Python 3.9 + name: Install Python ${{ matrix.python-version }} with: - python-version: "3.9" + python-version: ${{ matrix.python-version }} - name: Setup Node 16.x uses: actions/setup-node@v3 @@ -144,6 +148,12 @@ jobs: Expand-Archive -Path "$env:GITHUB_WORKSPACE\bladebit\bladebit.zip" -DestinationPath "$env:GITHUB_WORKSPACE\bladebit\" rm "$env:GITHUB_WORKSPACE\bladebit\bladebit.zip" + - name: Run install script + env: + INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} + run: | + .\Install.ps1 -d + - name: Build Windows installer with build_scripts\build_windows.ps1 env: CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }} @@ -153,7 +163,9 @@ jobs: $env:path="C:\Program` Files` (x86)\Microsoft` Visual` Studio\2019\Enterprise\SDK\ScopeCppSDK\vc15\VC\bin\;$env:path" $env:path="C:\Program` Files` (x86)\Windows` Kits\10\App` Certification` Kit;$env:path" git -C .\chia-blockchain-gui status - .\build_scripts\build_windows.ps1 + .\venv\Scripts\Activate.ps1 + cd .\build_scripts + .\build_windows.ps1 - name: Upload Windows exe's to artifacts uses: actions/upload-artifact@v3 diff --git a/build_scripts/build_windows.ps1 b/build_scripts/build_windows.ps1 index 35bc988f06..34d82643a6 100644 --- a/build_scripts/build_windows.ps1 +++ b/build_scripts/build_windows.ps1 @@ -3,61 +3,16 @@ $ErrorActionPreference = "Stop" mkdir build_scripts\win_build -Set-Location -Path ".\build_scripts\win_build" -PassThru git status -Write-Output " ---" -Write-Output "curl miniupnpc" -Write-Output " ---" -# download.chia.net is the CDN url behind all the files that are actually on pypi.chia.net/simple now -Invoke-WebRequest -Uri "https://download.chia.net/simple/miniupnpc/miniupnpc-2.2.2-cp39-cp39-win_amd64.whl" -OutFile "miniupnpc-2.2.2-cp39-cp39-win_amd64.whl" -Write-Output "Using win_amd64 python 3.9 wheel from https://github.com/miniupnp/miniupnp/pull/475 (2.2.0-RC1)" -Write-Output "Actual build from https://github.com/miniupnp/miniupnp/commit/7783ac1545f70e3341da5866069bde88244dd848" -If ($LastExitCode -gt 0){ - Throw "Failed to download miniupnpc!" -} -else -{ - Set-Location -Path - -PassThru - Write-Output "miniupnpc download successful." -} - -Write-Output " ---" -Write-Output "Create venv - python3.9 is required in PATH" -Write-Output " ---" -.\Install.ps1 -d -. .\venv\Scripts\Activate.ps1 - - -Write-Output " ---" -# The environment variable CHIA_INSTALLER_VERSION needs to be defined - if (-not (Test-Path env:CHIA_INSTALLER_VERSION)) { $env:CHIA_INSTALLER_VERSION = '0.0.0' Write-Output "WARNING: No environment variable CHIA_INSTALLER_VERSION set. Using 0.0.0" - } +} Write-Output "Chia Version is: $env:CHIA_INSTALLER_VERSION" Write-Output " ---" -Write-Output " ---" -Write-Output "Build chia-blockchain wheels" -Write-Output " ---" -pip wheel --use-pep517 --extra-index-url https://pypi.chia.net/simple/ -f . --wheel-dir=.\build_scripts\win_build . - -Write-Output " ---" -Write-Output "Install chia-blockchain wheels into venv with pip" -Write-Output " ---" - -Write-Output "pip install miniupnpc" -Set-Location -Path ".\build_scripts" -PassThru -pip install --no-index --find-links=.\win_build\ miniupnpc -# Write-Output "pip install setproctitle" -# pip install setproctitle==1.2.2 - -Write-Output "pip install chia-blockchain" -pip install --no-index --find-links=.\win_build\ chia-blockchain - Write-Output " ---" Write-Output "Use pyinstaller to create chia .exe's" Write-Output " ---"