mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-11 18:58:59 +03:00
Durable editbin.exe path on Windows, start to extract installer version global constant (#267)
* remove some debugging in install.sh * Take 3 w/ Straya spec changes * Set path to editbin and check - macos env variable? * Move more version to env vars * set version back to 0.1.6 in ci runners for now
This commit is contained in:
parent
e4f46f03cc
commit
e47747fcaf
10
.github/workflows/build-macos.yml
vendored
10
.github/workflows/build-macos.yml
vendored
@ -5,7 +5,7 @@ on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Python 3.7 on macOS-latest
|
||||
name: MacOS-latest on Pyton 3.7
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@ -66,11 +66,17 @@ jobs:
|
||||
node-version: '12.x'
|
||||
|
||||
- name: Build MacOS DMG in Catalina
|
||||
env:
|
||||
CHIA_VERSION: 0.1.6
|
||||
run: |
|
||||
. ./activate
|
||||
cd build_scripts
|
||||
cd ./electron-react
|
||||
npm install
|
||||
npm audit fix
|
||||
cd ../build_scripts
|
||||
sh build_macos.sh
|
||||
|
||||
|
||||
- name: Test blockchain code with pytest
|
||||
run: |
|
||||
. ./activate
|
||||
|
2
.github/workflows/build-ubuntu.yml
vendored
2
.github/workflows/build-ubuntu.yml
vendored
@ -5,7 +5,7 @@ on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Python 3.7 and 3.8 on ubuntu-latest
|
||||
name: Ubuntu-latest on Python 3.7 + 3.8
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
9
.github/workflows/build-windows.yml
vendored
9
.github/workflows/build-windows.yml
vendored
@ -4,7 +4,7 @@ on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Python 3.7 on windows-latest
|
||||
name: Windows installer
|
||||
runs-on: [windows-latest]
|
||||
|
||||
steps:
|
||||
@ -18,13 +18,12 @@ jobs:
|
||||
with:
|
||||
python-version: "3.7"
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.0.0
|
||||
|
||||
- name: Build Windows installer with build_scripts\build_windows.ps1
|
||||
working-directory: ${{ github.workspace }}\build_scripts
|
||||
env:
|
||||
CHIA_VERSION: 0.1.6
|
||||
run: |
|
||||
git config --global core.longpaths true
|
||||
$env:path="C:\Program` Files` (x86)\Microsoft` Visual` Studio\2019\Enterprise\SDK\ScopeCppSDK\vc15\VC\bin\;$env:path"
|
||||
./build_windows.ps1
|
||||
|
||||
- name: Upload Windows exe's to artifacts
|
||||
|
@ -19,6 +19,8 @@ strategy:
|
||||
# Python38:
|
||||
# python.version: '3.8' # Disabled 3.8 because artifact names conflict
|
||||
# Also, installer can target one verison
|
||||
variables:
|
||||
CHIA_VERSION: "0.1.6"
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
@ -32,15 +34,9 @@ steps:
|
||||
python -m venv venv
|
||||
ln -s venv/bin/activate .
|
||||
. ./activate
|
||||
echo "which python, pip after activate"
|
||||
which python
|
||||
which pip
|
||||
python -m pip install --upgrade pip
|
||||
pip install wheel pep517
|
||||
node -v
|
||||
npm cache clean -f
|
||||
npm install -g n
|
||||
sudo n stable
|
||||
pip install -i https://download.chia.net/simple/ miniupnpc==2.1 setproctitle==1.1.10 cbor2==5.1.0
|
||||
displayName: "Install dependencies"
|
||||
|
||||
@ -52,7 +48,7 @@ steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '12.x'
|
||||
displayName: "Setup Node 12.xß"
|
||||
displayName: "Setup Node 12.x"
|
||||
|
||||
- script: |
|
||||
. ./activate
|
||||
@ -68,14 +64,11 @@ steps:
|
||||
displayName: "Install wheels"
|
||||
|
||||
# install-timelord.sh in venv
|
||||
- script: |
|
||||
. ./activate
|
||||
echo "which python"
|
||||
which python
|
||||
brew install boost
|
||||
sh install-timelord.sh
|
||||
./vdf_bench square_asm 400000
|
||||
displayName: "Install timelord"
|
||||
# - script: |
|
||||
# . ./activate
|
||||
# brew install boost
|
||||
# sh install-timelord.sh
|
||||
## displayName: "Install timelord"
|
||||
|
||||
# - script: |
|
||||
# . ./activate
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
if [ ! $CHIA_VERSION ]; then
|
||||
echo "No environment variable CHIA_VERSION set. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Installing npm and electron packagers"
|
||||
npm install electron-installer-dmg -g
|
||||
npm install electron-packager -g
|
||||
@ -24,5 +29,5 @@ mv Chia-darwin-x64 ../build_scripts/dist/
|
||||
cd ../build_scripts
|
||||
|
||||
echo "Create .dmg"
|
||||
electron-installer-dmg dist/Chia-darwin-x64/Chia.app Chia-0.1.6 --overwrite
|
||||
electron-installer-dmg dist/Chia-darwin-x64/Chia.app Chia-$CHIA_VERSION --overwrite
|
||||
ls -l
|
||||
|
@ -1,3 +1,9 @@
|
||||
# The environment variable CHIA_VERSION needs to be defined
|
||||
# $env:path should contain a path to editbin.exe
|
||||
|
||||
if (-not (Test-Path env:CHIA_VERSION)) { $env:CHIA_VERSION = '0.0.0' }
|
||||
Write-Output "Chia Version is: $env:CHIA_VERSION";
|
||||
|
||||
cd ..
|
||||
|
||||
mkdir build_scripts\win_build
|
||||
@ -45,7 +51,7 @@ pip install --no-index --find-links=.\win_build\ chia-blockchain
|
||||
Write-Output " ---";
|
||||
Write-Output "Use pyinstaller to create chia .exe's";
|
||||
Write-Output " ---";
|
||||
pyinstaller daemon_windows.spec
|
||||
pyinstaller --log-level INFO daemon_windows.spec
|
||||
|
||||
Write-Output " ---";
|
||||
Write-Output "Copy chia executables to electron-react/";
|
||||
@ -65,10 +71,14 @@ Write-Output "Electron package Windows Installer";
|
||||
Write-Output " ---";
|
||||
npm run build
|
||||
|
||||
Write-Output " ---";
|
||||
Write-Output "Increase the stack for chiapos";
|
||||
Start-Process "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\HostX64\x64\editbin.exe" -ArgumentList "/STACK:8000000 daemon/create_plots.exe" -Wait
|
||||
# editbin.exe needs to be in your path
|
||||
Start-Process "editbin.exe" -ArgumentList "/STACK:8000000 daemon/create_plots.exe" -Wait
|
||||
Write-Output " ---";
|
||||
|
||||
electron-packager . Chia-0.1.6 --asar.unpack="**/daemon/**" --overwrite --icon=./src/assets/img/chia.ico
|
||||
$packageName = "Chia-$env:CHIA_VERSION"
|
||||
electron-packager . $packageName --asar.unpack="**/daemon/**" --overwrite --icon=./src/assets/img/chia.ico
|
||||
node winstaller.js
|
||||
|
||||
Write-Output " ---";
|
||||
|
@ -24,11 +24,11 @@ block_cipher = None
|
||||
subcommand_modules = [f"{root}/src.cmds.%s" % _ for _ in SUBCOMMANDS]
|
||||
other = ["aiter.active_aiter", "aiter.aiter_forker", "aiter.aiter_to_iter", "aiter.azip", "aiter.flatten_aiter", "aiter.gated_aiter",
|
||||
"aiter.iter_to_aiter", "aiter.join_aiters", "aiter.map_aiter", "aiter.map_filter_aiter", "aiter.preload_aiter",
|
||||
"aiter.push_aiter", "aiter.sharable_aiter", "aiter.stoppable_aiter","src.wallet.websocket_server"]
|
||||
"aiter.push_aiter", "aiter.sharable_aiter", "aiter.stoppable_aiter"]
|
||||
|
||||
entry_points = ["src.cmds.check_plots",
|
||||
"src.cmds.create_plots",
|
||||
"src.wallet.websocket_server",
|
||||
"src.server.start_wallet",
|
||||
"src.server.start_full_node",
|
||||
"src.server.start_harvester",
|
||||
"src.server.start_farmer",
|
||||
@ -70,7 +70,7 @@ full_node = Analysis([f"{root}/src/server/start_full_node.py"],
|
||||
cipher=block_cipher,
|
||||
noarchive=False)
|
||||
|
||||
wallet = Analysis([f"{root}/src/wallet/websocket_server.py"],
|
||||
wallet = Analysis([f"{root}/src/server/start_wallet.py"],
|
||||
pathex=[f"{root}/venv/lib/python3.7/site-packages/aiter/", f"{root}"],
|
||||
binaries = [],
|
||||
datas=[(f"../src/util/english.txt", f"./src/util/"), version_data ],
|
||||
@ -174,7 +174,7 @@ wallet_exe = EXE(wallet_pyz,
|
||||
wallet.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name='websocket_server',
|
||||
name='wallet_server',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False)
|
||||
|
@ -27,12 +27,12 @@ block_cipher = None
|
||||
subcommand_modules = [f"../src.cmds.%s" % _ for _ in SUBCOMMANDS]
|
||||
other = ["aiter.active_aiter", "aiter.aiter_forker", "aiter.aiter_to_iter", "aiter.azip", "aiter.flatten_aiter", "aiter.gated_aiter",
|
||||
"aiter.iter_to_aiter", "aiter.join_aiters", "aiter.map_aiter", "aiter.map_filter_aiter", "aiter.preload_aiter",
|
||||
"aiter.push_aiter", "aiter.sharable_aiter", "aiter.stoppable_aiter","src.wallet.websocket_server", "win32timezone", "win32cred", "pywintypes", "win32ctypes.pywin32"]
|
||||
"aiter.push_aiter", "aiter.sharable_aiter", "aiter.stoppable_aiter", "win32timezone", "win32cred", "pywintypes", "win32ctypes.pywin32"]
|
||||
|
||||
entry_points = ["aiohttp", "aiohttp",
|
||||
"src.cmds.check_plots",
|
||||
"src.cmds.create_plots",
|
||||
"src.wallet.websocket_server",
|
||||
"src.server.start_wallet",
|
||||
"src.server.start_full_node",
|
||||
"src.server.start_harvester",
|
||||
"src.server.start_farmer",
|
||||
@ -73,7 +73,7 @@ full_node = Analysis([f"../src/server/start_full_node.py"],
|
||||
cipher=block_cipher,
|
||||
noarchive=False)
|
||||
|
||||
wallet = Analysis([f"../src/wallet/websocket_server.py"],
|
||||
wallet = Analysis([f"../src/server/start_wallet.py"],
|
||||
pathex=[f"../venv/lib/python3.7/site-packages/aiter/", f"../"],
|
||||
binaries = [],
|
||||
datas=[(f"../src/util/english.txt", f"./src/util/"), version_data ],
|
||||
@ -177,7 +177,7 @@ wallet_exe = EXE(wallet_pyz,
|
||||
wallet.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name='websocket_server',
|
||||
name='wallet_server',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False)
|
||||
|
@ -80,7 +80,6 @@ fi
|
||||
|
||||
if [ "$UBUNTU_PRE_2004" = "True" ]; then
|
||||
UBUNTU_PRE_2004=true # Unfortunately Python returns True when shell expects true
|
||||
echo "would have run npm"
|
||||
sudo npm install -g n
|
||||
sudo n stable
|
||||
export PATH="$PATH"
|
||||
|
Loading…
Reference in New Issue
Block a user