Skip to content

Commit

Permalink
GUI to a separate repo (Chia-Network#859)
Browse files Browse the repository at this point in the history
* GUI to a separate repo

* correct repo name, codeql to just python

* fetch-depth: 0 is indeed needed

* remove debug ls's

* Switch to a submodule

* update blockchain gitignore

* Return omitted cd to install-gui.sh
  • Loading branch information
hoffmang9 authored Feb 8, 2021
1 parent 75a858c commit 0febb51
Show file tree
Hide file tree
Showing 346 changed files with 109 additions and 56,562 deletions.
14 changes: 0 additions & 14 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@

version: 2
updates:
# Enable version updates for npm
- package-ecosystem: "npm"
# Look for `package.json` and `lock` files in the `root` directory
directory: "electron-react "
# Check the npm registry for updates every day (weekdays)
schedule:
interval: "weekly"
day: "tuesday"
target-branch: "dev"
pull-request-branch-name:
# Separate sections of the branch name with a hyphen
# for example, `dependabot-npm_and_yarn-next_js-acorn-6.4.1`
separator: "-"

# Enable version updates for Python
- package-ecosystem: "pip"
# Look for a `Dockerfile` in the `root` directory
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/build-macos-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
# we need fetch-depth 0 so setuptools_scm can resolve tags
submodules: recursive

- name: Setup Python environment
uses: actions/setup-python@v2
Expand Down Expand Up @@ -84,6 +84,13 @@ jobs:
p12-file-base64: ${{ secrets.APPLE_DEV_ID_APP }}
p12-password: ${{ secrets.APPLE_DEV_ID_APP_PASS }}

- name: Checkout GUI
uses: actions/checkout@v2
with:
repository: 'Chia-Network/chia-blockchain-gui'
ref: 'main'
path: './chia-blockchain-gui'

- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
Expand All @@ -104,7 +111,7 @@ jobs:
run: |
. ./activate
clang --version
cd ./electron-react
cd ./chia-blockchain-gui
npm install
npm audit fix
cd ../build_scripts
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-test-macos-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
# we need fetch-depth 0 so setuptools_scm can resolve tags

- name: Setup Python environment
uses: actions/setup-python@v2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-test-macos-wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
# we need fetch-depth 0 so setuptools_scm can resolve tags

- name: Setup Python environment
uses: actions/setup-python@v2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-test-ubuntu-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
# we need fetch-depth 0 so setuptools_scm can resolve tags

- name: Setup Python environment
uses: actions/setup-python@v2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-test-ubuntu-wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
# we need fetch-depth 0 so setuptools_scm can resolve tags

- name: Setup Python environment
uses: actions/setup-python@v2
Expand Down
146 changes: 77 additions & 69 deletions .github/workflows/build-windows-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,83 +17,91 @@ jobs:
timeout-minutes: 30

steps:
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/dev' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Cancel previous runs on the same branch
if: ${{ github.ref != 'refs/heads/dev' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0
# we need fetch-depth 0 so setuptools_scm can resolve tags
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive

- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache npm
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache npm
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache pip
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Test for secrets access
id: check_secrets
shell: bash
run: |
unset HAS_SECRET
if [ -n "$SECRET" ]; then HAS_SECRET='true' ; fi
echo ::set-output name=HAS_SECRET::${HAS_SECRET}
env:
SECRET: "${{ secrets.WIN_CODE_SIGN_CERT }}"
# We can't upgrade to Python 3.8 until we have a miniupnpc binary
- uses: actions/setup-python@v2
name: Install Python 3.7
with:
python-version: "3.7"

- name: Decode code signing cert into an encrypted file
if: steps.check_secrets.outputs.HAS_SECRET
uses: kitek/[email protected]
with:
encoded-value: ${{ secrets.WIN_CODE_SIGN_CERT }}
destination-file: .\electron-react\win_code_sign_cert.p12
- name: Checkout GUI
uses: actions/checkout@v2
with:
repository: 'Chia-Network/chia-blockchain-gui'
ref: 'main'
path: 'chia-blockchain-gui'

- uses: actions/setup-python@v2
name: Install Python 3.7
with:
python-version: "3.7"
- name: Test for secrets access
id: check_secrets
shell: bash
run: |
unset HAS_SECRET
if [ -n "$SECRET" ]; then HAS_SECRET='true' ; fi
echo ::set-output name=HAS_SECRET::${HAS_SECRET}
env:
SECRET: "${{ secrets.WIN_CODE_SIGN_CERT }}"

- name: Build Windows installer with build_scripts\build_windows.ps1
env:
WIN_CODE_SIGN_PASS: ${{ secrets.WIN_CODE_SIGN_PASS }}
HAS_SECRET: ${{ steps.check_secrets.outputs.HAS_SECRET }}
run: |
$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"
.\build_scripts\build_windows.ps1
- name: Decode code signing cert into an encrypted file
if: steps.check_secrets.outputs.HAS_SECRET
uses: kitek/[email protected]
with:
encoded-value: ${{ secrets.WIN_CODE_SIGN_CERT }}
destination-file: .\chia-blockchain-gui\win_code_sign_cert.p12

- name: Upload Windows exe's to artifacts
uses: actions/[email protected]
with:
name: Windows-Exe
path: ${{ github.workspace }}\electron-react\Chia-win32-x64\
- name: Build Windows installer with build_scripts\build_windows.ps1
env:
WIN_CODE_SIGN_PASS: ${{ secrets.WIN_CODE_SIGN_PASS }}
HAS_SECRET: ${{ steps.check_secrets.outputs.HAS_SECRET }}
run: |
$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"
.\build_scripts\build_windows.ps1
- name: Upload Installer to artifacts
uses: actions/[email protected]
with:
name: Windows-Installers
path: ${{ github.workspace }}\electron-react\release-builds\
- name: Upload Windows exe's to artifacts
uses: actions/[email protected]
with:
name: Windows-Exe
path: ${{ github.workspace }}\chia-blockchain-gui\Chia-win32-x64\

- name: Upload Installer to artifacts
uses: actions/[email protected]
with:
name: Windows-Installers
path: ${{ github.workspace }}\chia-blockchain-gui\release-builds\
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'python' ]
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ name: GithHub Super Linter
on:
push:
branches-ignore:
- 'master'
- 'main'
pull_request:
branches-ignore:
- 'master'
- 'main'

###############
# Set the Job #
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
uses: docker://github/super-linter:v3.10.2
env:
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: master
DEFAULT_BRANCH: main
LINTER_RULES_PATH: .github/linters
PYTHON_BLACK_CONFIG_FILE: .python-black
VALIDATE_BASH: true
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/upload-pypi-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
# we need fetch-depth 0 so setuptools_scm can resolve tags

- uses: actions/setup-python@v2
name: Install Python
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ vdf_bench
main.sym

# Dev config react
electron-react/src/dev_config.js
# chia-blockchain-gui/src/dev_config.js
# React built app
electron-react/.eslintcache
electron-react/build
chia-blockchain-gui/.eslintcache
chia-blockchain-gui/build
build_scripts/dist
build_scripts/*.Dmg
electron-react/src/locales/_build
chia-blockchain-gui/src/locales/_build
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "chia-blockchain-gui"]
path = chia-blockchain-gui
url = https://github.com/Chia-Network/chia-blockchain-gui.git
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ for setuptools_scm/PEP 440 reasons.

### Changed

- The GUI is now in a seperate repository from chia-blockchain, [chia-blockchain-gui](https://github.com/Chia-Network/chia-blockchain-gui). The installers and install scripts have been updated and it continues to follow basically the same install steps. Note that the GUI directory will now be `chia-blockchain-gui`.

### Fixed
- The GUI was incorrectly reporting the time frame that the netspace estimate it displays utilizes. It is technically 312.5 minutes, on average, over the trailing 1000 sub blocks.
Expand Down
6 changes: 2 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ strategy:
matrix:
Mojave DMG:
python.version: "3.8"
# Python38:
# python.version: '3.8' # Disabled 3.8 because artifact names conflict
# Also, installer can target one verison

variables:
- group: Apple-Notarize-Variables
Expand Down Expand Up @@ -65,7 +62,8 @@ steps:

- script: |
. ./activate
cd ./electron-react
git submodule update --init --recursive
cd ./chia-blockchain-gui
npm install
npm audit fix
npm run locale:extract
Expand Down
4 changes: 2 additions & 2 deletions build_scripts/build_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ mkdir dist
echo "Create executeables with pyinstaller"
pip install pyinstaller==4.2
sudo pyinstaller --log-level=INFO daemon.spec
cp -r dist/daemon ../electron-react
cp -r dist/daemon ../chia-blockchain-gui
cd .. || exit
cd electron-react || exit
cd chia-blockchain-gui || exit

echo "npm build"
npm install
Expand Down
6 changes: 3 additions & 3 deletions build_scripts/build_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ Write-Output " ---"
pyinstaller --log-level INFO daemon_windows.spec

Write-Output " ---"
Write-Output "Copy chia executables to electron-react\"
Write-Output "Copy chia executables to chia-blockchain-gui\"
Write-Output " ---"
Copy-Item "dist\daemon" -Destination "..\electron-react\" -Recurse
Set-Location -Path "..\electron-react" -PassThru
Copy-Item "dist\daemon" -Destination "..\chia-blockchain-gui\" -Recurse
Set-Location -Path "..\chia-blockchain-gui" -PassThru

Write-Output " ---"
Write-Output "Prepare Electron packager"
Expand Down
1 change: 1 addition & 0 deletions chia-blockchain-gui
Submodule chia-blockchain-gui added at 995a77
10 changes: 0 additions & 10 deletions electron-react/.editorconfig

This file was deleted.

2 changes: 0 additions & 2 deletions electron-react/.env

This file was deleted.

3 changes: 0 additions & 3 deletions electron-react/.eslintignore

This file was deleted.

Loading

0 comments on commit 0febb51

Please sign in to comment.