Skip to content

Commit

Permalink
Chia 1.7.0b code
Browse files Browse the repository at this point in the history
  • Loading branch information
BTCgreen-Network committed Jan 16, 2023
1 parent 89a081f commit 21ad1e4
Show file tree
Hide file tree
Showing 1,717 changed files with 367,131 additions and 636,683 deletions.
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
max-line-length = 120
exclude = ./typings/**/*
ignore = E203,W503
per-file-ignores =
tests/util/build_network_protocol_files.py:F405
tests/util/test_network_protocol_files.py:F405
tests/util/test_network_protocol_json.py:F405
tests/util/protocol_messages_json.py:E501
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ contact_links:
- about: Ask a question or request support here
name: Ask for Support
url: >-
https://github.com/BTCgreen-Network/shibgreen-blockchain/discussions/new?category=support
https://github.com/SHIBgreen-Network/shibgreen-blockchain/discussions/new?category=support
- about: Request a new feature or idea here
name: Make a Request
url: >-
https://github.com/BTCgreen-Network/shibgreen-blockchain/discussions/new?category=ideas
https://github.com/SHIBgreen-Network/shibgreen-blockchain/discussions/new?category=ideas
- about: Get support on the SHIBgreen Discord chat channels.
name: Join the Discord.io support chat
url: 'https://discord.gg/TgJyxsEFFc'
40 changes: 40 additions & 0 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Install shibgreen-blockchain"

description: "Run the platform appropriate installer script."

inputs:
python-version:
description: "Value to be set for INSTALL_PYTHON_VERSION."
required: false
default: ""
development:
description: "Install development dependencies."
required: false
default: ""
automated:
description: "Automated install, no questions."
required: false
default: "true"
command-prefix:
description: "Text to place before the command such as `arch -arm64` for non-native macOS runners."
required: false
default: ""

runs:
using: "composite"
steps:
- name: Run install script (macOS, Ubuntu)
if: runner.os == 'macos' || runner.os == 'linux'
shell: bash
env:
INSTALL_PYTHON_VERSION: ${{ inputs.python-version }}
run: |
${{ inputs.command-prefix }} sh install.sh ${{ inputs.development && '-d' || '' }} ${{ inputs.automated == 'true' && '-a' || '' }}
- name: Run install script (Windows)
if: runner.os == 'windows'
shell: pwsh
env:
INSTALL_PYTHON_VERSION: ${{ inputs.python-version }}
run: |
${{ inputs.command-prefix }} ./Install.ps1 ${{ inputs.development && '-d' || '' }}
119 changes: 59 additions & 60 deletions .github/workflows/build-linux-installer-deb.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Build Installer - Linux DEB AMD64
name: 📦🚀 Build Installer - Linux DEB AMD64

on:
workflow_dispatch:
push:
branches:
- 'long_lived/**'
Expand All @@ -13,24 +12,24 @@ on:
branches:
- '**'

concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
cancel-in-progress: true

jobs:
build:
name: Linux amd64 DEB Installer
runs-on: ${{ matrix.os }}
timeout-minutes: 40
runs-on: ubuntu-latest
container: chianetwork/ubuntu-18.04-builder:latest
timeout-minutes: 120
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: [3.8]
os: [ubuntu-18.04]

steps:
- uses: Chia-Network/actions/clean-workspace@main

- name: Add safe git directory
uses: Chia-Network/actions/git-mark-workspace-safe@main

- name: Checkout Code
uses: actions/checkout@v3
with:
Expand All @@ -40,37 +39,19 @@ jobs:
- name: Cleanup any leftovers that exist from previous runs
run: bash build_scripts/clean-runner.sh || true

- name: Setup Python environment
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Cache npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Get pip cache dir
id: pip-cache
- name: Set Env
if: github.event_name == 'release' && github.event.action == 'published'
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v3
with:
# Note that new runners may break this https://github.com/actions/cache/issues/292
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
PRE_RELEASE=$(jq -r '.release.prerelease' "$GITHUB_EVENT_PATH")
RELEASE_TAG=$(jq -r '.release.tag_name' "$GITHUB_EVENT_PATH")
echo "RELEASE=true" >>$GITHUB_ENV
echo "PRE_RELEASE=$PRE_RELEASE" >>$GITHUB_ENV
echo "RELEASE_TAG=$RELEASE_TAG" >>$GITHUB_ENV
if [ $PRE_RELEASE = false ]; then
echo "FULL_RELEASE=true" >>$GITHUB_ENV
else
echo "FULL_RELEASE=false" >>$GITHUB_ENV
fi
# Create our own venv outside of the git directory JUST for getting the ACTUAL version so that install can't break it
- name: Get version number
Expand Down Expand Up @@ -105,6 +86,7 @@ jobs:
# Get the most recent release from bladebit
- uses: actions/github-script@v6
if: '!github.event.release.prerelease'
id: 'latest-bladebit'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -117,49 +99,66 @@ jobs:
return release.data.tag_name;
- name: Get latest bladebit plotter
if: '!github.event.release.prerelease'
run: |
mkdir "$GITHUB_WORKSPACE/bladebit"
wget -O /tmp/bladebit.tar.gz https://github.com/Chia-Network/bladebit/releases/download/${{ steps.latest-bladebit.outputs.result }}/bladebit-${{ steps.latest-bladebit.outputs.result }}-ubuntu-x86-64.tar.gz
tar -xvzf /tmp/bladebit.tar.gz -C $GITHUB_WORKSPACE/bladebit
chmod +x "$GITHUB_WORKSPACE/bladebit/bladebit"
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
- name: Get latest prerelease bladebit plotter
if: env.PRE_RELEASE == 'true'
run: |
PRERELEASE_URL=$(curl -Ls -H "Accept: application/vnd.github+json" "https://api.github.com/repos/Chia-Network/bladebit/releases" | jq -r 'map(select(.prerelease)) | first.assets[] | select(.browser_download_url | endswith("ubuntu-x86-64.tar.gz")).browser_download_url')
mkdir "$GITHUB_WORKSPACE/bladebit"
wget -O /tmp/bladebit.tar.gz $PRERELEASE_URL
tar -xvzf /tmp/bladebit.tar.gz -C $GITHUB_WORKSPACE/bladebit
chmod +x "$GITHUB_WORKSPACE/bladebit/bladebit"
- uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
development: true

- uses: chia-network/actions/activate-venv@main

- name: Prepare GUI cache
id: gui-ref
run: |
sh install.sh -d
gui_ref=$(git submodule status shibgreen-blockchain-gui | sed -e 's/^ //g' -e 's/ shibgreen-blockchain-gui.*$//g')
echo "${gui_ref}"
echo "::set-output name=GUI_REF::${gui_ref}"
- name: Setup Node 16.x
uses: actions/setup-node@v3
- name: Cache GUI
uses: actions/cache@v3
id: cache-gui
with:
node-version: '16.x'
path: ./shibgreen-blockchain-gui
key: ${{ runner.os }}-deb-shibgreen-blockchain-gui-${{ steps.gui-ref.outputs.GUI_REF }}

- name: Add jq
- if: steps.cache-gui.outputs.cache-hit != 'true'
name: Build GUI
continue-on-error: false
run: |
sudo apt-get install -y jq
cd ./build_scripts
bash build_linux_deb-1-gui.sh
- name: Build .deb package
env:
SHIBGREEN_INSTALLER_VERSION: ${{ steps.version_number.outputs.SHIBGREEN_INSTALLER_VERSION }}
run: |
ldd --version
git -C ./shibgreen-blockchain-gui status
. ./activate
cd ./build_scripts
sh build_linux_deb.sh amd64
sh build_linux_deb-2-installer.sh amd64
- name: Upload Linux artifacts
uses: actions/upload-artifact@v3
with:
name: shibgreen-installers-linux-deb-intel
path: ${{ github.workspace }}/build_scripts/final_installer/

- name: Create Checksums
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
env:
SHIBGREEN_INSTALLER_VERSION: ${{ steps.version_number.outputs.SHIBGREEN_INSTALLER_VERSION }}
- name: Remove working files to exclude from cache
run: |
ls ${{ github.workspace }}/build_scripts/final_installer/
sha256sum ${{ github.workspace }}/build_scripts/final_installer/shibgreen-blockchain_${SHIBGREEN_INSTALLER_VERSION}_amd64.deb > ${{ github.workspace }}/build_scripts/final_installer/shibgreen-blockchain_${SHIBGREEN_INSTALLER_VERSION}_amd64.deb.sha256
sha256sum ${{ github.workspace }}/build_scripts/final_installer/shibgreen-blockchain-cli_${SHIBGREEN_INSTALLER_VERSION}-1_amd64.deb > ${{ github.workspace }}/build_scripts/final_installer/shibgreen-blockchain-cli_${SHIBGREEN_INSTALLER_VERSION}-1_amd64.deb.sha256
ls ${{ github.workspace }}/build_scripts/final_installer/
rm -rf ./shibgreen-blockchain-gui/packages/gui/daemon
122 changes: 0 additions & 122 deletions .github/workflows/build-macos-installer.yml

This file was deleted.

Loading

0 comments on commit 21ad1e4

Please sign in to comment.