Skip to content

Commit

Permalink
Merge branch 'main' into jack-cat-coinselection
Browse files Browse the repository at this point in the history
  • Loading branch information
jack60612 committed Apr 11, 2022
2 parents 618fbae + a48fd43 commit d9b0ef5
Show file tree
Hide file tree
Showing 269 changed files with 6,619 additions and 3,152 deletions.
76 changes: 41 additions & 35 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
tags:
- '**'
- '**'
pull_request:
branches:
- '**'
Expand All @@ -25,45 +25,51 @@ jobs:
max-parallel: 4
matrix:
python-version: [ 3.9 ]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet

steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Clean workspace
uses: Chia-Network/actions/clean-workspace@main

- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- 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@v3
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@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install ubuntu dependencies
run: |
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python${{ matrix.python-version }}-venv python${{ matrix.python-version }}-distutils git -y
- name: Checkout test blocks and plots
uses: actions/checkout@v3
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.29.0'
fetch-depth: 1

- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
run: |
sh install.sh -d
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
run: |
sh install.sh -d
- name: pytest
run: |
. ./activate
./venv/bin/py.test -n 0 -m benchmark tests
- name: pytest
run: |
. ./activate
./venv/bin/py.test -n 0 -m benchmark tests
12 changes: 6 additions & 6 deletions .github/workflows/build-linux-arm64-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,23 +105,23 @@ jobs:
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
sh install.sh
- name: Build arm64 .deb package
env:
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
run: |
. ./activate
ldd --version
cd ./chia-blockchain-gui
git status
cd ../build_scripts
git -C ./chia-blockchain-gui status
. ./activate
cd ./build_scripts
sh build_linux_deb.sh arm64
- name: Upload Linux artifacts
uses: actions/upload-artifact@v2
with:
name: Linux-ARM-64-Installer
name: chia-installers-linux-deb-arm64
path: ${{ github.workspace }}/build_scripts/final_installer/

- name: Configure AWS Credentials
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-linux-installer-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ jobs:
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
sh install.sh
Expand All @@ -153,18 +152,19 @@ jobs:
sudo apt-get install -y jq
- name: Build .deb package
env:
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
run: |
. ./activate
ldd --version
cd ./chia-blockchain-gui
git status
cd ../build_scripts
git -C ./chia-blockchain-gui status
. ./activate
cd ./build_scripts
sh build_linux_deb.sh amd64
- name: Upload Linux artifacts
uses: actions/upload-artifact@v2
with:
name: Linux-Installers
name: chia-installers-linux-deb-intel
path: ${{ github.workspace }}/build_scripts/final_installer/

- name: Configure AWS Credentials
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-linux-installer-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,23 @@ jobs:
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
sh install.sh
- name: Build .rpm package
env:
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
run: |
. ./activate
ldd --version
cd ./chia-blockchain-gui
git status
cd ../build_scripts
git -C ./chia-blockchain-gui status
. ./activate
cd ./build_scripts
sh build_linux_rpm.sh amd64
- name: Upload Linux artifacts
uses: actions/upload-artifact@v2
with:
name: Linux-Installers
name: chia-installers-linux-rpm-intel
path: ${{ github.workspace }}/build_scripts/final_installer/

- name: Configure AWS Credentials
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/build-macos-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ jobs:
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
sh install.sh
Expand All @@ -138,20 +137,20 @@ jobs:

- name: Build MacOS DMG
env:
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
NOTARIZE: ${{ steps.check_secrets.outputs.HAS_APPLE_SECRET }}
APPLE_NOTARIZE_USERNAME: "${{ secrets.APPLE_NOTARIZE_USERNAME }}"
APPLE_NOTARIZE_PASSWORD: "${{ secrets.APPLE_NOTARIZE_PASSWORD }}"
run: |
git -C ./chia-blockchain-gui status
. ./activate
cd ./chia-blockchain-gui
git status
cd ../build_scripts
cd ./build_scripts
sh build_macos.sh
- name: Upload MacOS artifacts
uses: actions/upload-artifact@v2
with:
name: Chia-Installer-MacOS-intel-dmg
name: chia-installers-macos-dmg-intel
path: ${{ github.workspace }}/build_scripts/final_installer/

- name: Create Checksums
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/build-macos-m1-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ jobs:
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
arch -arm64 sh install.sh
Expand All @@ -111,21 +110,21 @@ jobs:
- name: Build MacOS DMG
env:
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
NOTARIZE: ${{ steps.check_secrets.outputs.HAS_APPLE_SECRET }}
APPLE_NOTARIZE_USERNAME: "${{ secrets.APPLE_NOTARIZE_USERNAME }}"
APPLE_NOTARIZE_PASSWORD: "${{ secrets.APPLE_NOTARIZE_PASSWORD }}"
run: |
export PATH=$(brew --prefix node@16)/bin:$PATH
git -C ./chia-blockchain-gui status
. ./activate
cd ./chia-blockchain-gui
arch -arm64 git status
cd ../build_scripts
cd ./build_scripts
arch -arm64 sh build_macos_m1.sh
- name: Upload MacOS artifacts
uses: actions/upload-artifact@v2
with:
name: Chia-Installer-MacOS-arm64-dmg
name: chia-installers-macos-dmg-arm64
path: ${{ github.workspace }}/build_scripts/final_installer/

- name: Install AWS CLI
Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/build-test-macos-blockchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,21 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v3
- name: Cache test blocks and plots
uses: actions/cache@v2
id: test-blocks-plots
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
path: |
${{ github.workspace }}/.chia/blocks
${{ github.workspace }}/.chia/test-plots
key: 0.29.0

- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf -
mkdir ${{ github.workspace }}/.chia
mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia
- name: Run install script
env:
Expand All @@ -85,7 +93,7 @@ jobs:
- name: Test blockchain code with pytest
run: |
. ./activate
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/blockchain/test_*.py -s -v --durations 0 -n 4 -m "not benchmark"
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/blockchain/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-macos-clvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Test clvm code with pytest
run: |
. ./activate
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/clvm/test_*.py -s -v --durations 0 -n 4 -m "not benchmark"
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/clvm/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/build-test-macos-core-cmds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v3
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
# Omitted checking out blocks and plots repo Chia-Network/test-cache

- name: Run install script
env:
Expand All @@ -85,7 +79,7 @@ jobs:
- name: Test core-cmds code with pytest
run: |
. ./activate
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/cmds/test_*.py -s -v --durations 0 -n 4 -m "not benchmark"
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/cmds/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/build-test-macos-core-consensus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v3
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
# Omitted checking out blocks and plots repo Chia-Network/test-cache

- name: Run install script
env:
Expand All @@ -85,7 +79,7 @@ jobs:
- name: Test core-consensus code with pytest
run: |
. ./activate
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/consensus/test_*.py -s -v --durations 0 -n 4 -m "not benchmark"
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/consensus/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/build-test-macos-core-custom_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v3
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
# Omitted checking out blocks and plots repo Chia-Network/test-cache

- name: Run install script
env:
Expand All @@ -85,7 +79,7 @@ jobs:
- name: Test core-custom_types code with pytest
run: |
. ./activate
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/custom_types/test_*.py -s -v --durations 0 -n 4 -m "not benchmark"
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/custom_types/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
Expand Down
Loading

0 comments on commit d9b0ef5

Please sign in to comment.