Merge commit 'd154105a6b35f94649f15bca4e3fb8a11a39e70e' into atari-merge_main_d154105a6b35f94649f15bca4e3fb8a11a39e70e

This commit is contained in:
Kyle Altendorf
2022-04-19 22:44:02 -04:00
375 changed files with 16539 additions and 6282 deletions
+17
View File
@@ -0,0 +1,17 @@
[run]
branch=True
relative_files=True
source=
chia
tests
concurrency=multiprocessing
parallel=True
[report]
precision = 1
exclude_lines =
pragma: no cover
abc\.abstractmethod
typing\.overload
^\s*\.\.\.\s*$
if typing.TYPE_CHECKING:
+75
View File
@@ -0,0 +1,75 @@
name: Benchmarks
on:
push:
branches:
- main
tags:
- '**'
pull_request:
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' && github.sha || '' }}
cancel-in-progress: true
jobs:
build:
name: Benchmarks
runs-on: benchmark
timeout-minutes: 30
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: [ 3.9 ]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
steps:
- 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: 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: 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: pytest
run: |
. ./activate
./venv/bin/py.test -n 0 -m benchmark tests
@@ -31,7 +31,7 @@ jobs:
- uses: Chia-Network/actions/clean-workspace@main
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
@@ -62,17 +62,17 @@ jobs:
SECRET: "${{ secrets.INSTALLER_UPLOAD_SECRET }}"
# Get the most recent release from chia-plotter-madmax
- uses: actions/github-script@v4
- uses: actions/github-script@v6
id: 'latest-madmax'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const releases = await github.repos.listReleases({
const release = await github.rest.repos.getLatestRelease({
owner: 'Chia-Network',
repo: 'chia-plotter-madmax',
});
return releases.data[0].tag_name;
return release.data.tag_name;
- name: Get latest madmax plotter
run: |
@@ -83,17 +83,17 @@ jobs:
chmod +x "$GITHUB_WORKSPACE/madmax/chia_plot_k34"
# Get the most recent release from bladebit
- uses: actions/github-script@v4
- uses: actions/github-script@v6
id: 'latest-bladebit'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const releases = await github.repos.listReleases({
const release = await github.rest.repos.getLatestRelease({
owner: 'Chia-Network',
repo: 'bladebit',
});
return releases.data[0].tag_name;
return release.data.tag_name;
- name: Get latest bladebit plotter
run: |
@@ -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
@@ -137,10 +137,11 @@ jobs:
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
if: steps.check_secrets.outputs.HAS_SECRET
run: |
GIT_SHORT_HASH=$(echo "${GITHUB_SHA}" | cut -c1-8)
CHIA_DEV_BUILD=${CHIA_INSTALLER_VERSION}-$GIT_SHORT_HASH
echo "CHIA_DEV_BUILD=$CHIA_DEV_BUILD" >>$GITHUB_ENV
aws s3 cp "$GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb" "s3://download.chia.net/dev/chia-blockchain_${CHIA_DEV_BUILD}_arm64.deb"
GIT_SHORT_HASH=$(echo "${GITHUB_SHA}" | cut -c1-8)
CHIA_DEV_BUILD=${CHIA_INSTALLER_VERSION}-$GIT_SHORT_HASH
echo "CHIA_DEV_BUILD=$CHIA_DEV_BUILD" >>$GITHUB_ENV
aws s3 cp "$GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb" "s3://download.chia.net/dev/chia-blockchain_${CHIA_DEV_BUILD}_arm64.deb"
aws s3 cp "$GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb" "s3://download.chia.net/dev/chia-blockchain-cli_${CHIA_DEV_BUILD}-1_arm64.deb"
- name: Create Checksums
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
@@ -149,6 +150,7 @@ jobs:
run: |
ls $GITHUB_WORKSPACE/build_scripts/final_installer/
sha256sum $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb > $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.sha256
sha256sum $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb > $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb.sha256
ls $GITHUB_WORKSPACE/build_scripts/final_installer/
- name: Install py3createtorrent
@@ -162,6 +164,7 @@ jobs:
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
run: |
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb -o $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.torrent --webseed https://download.chia.net/install/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb -o $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb.torrent --webseed https://download.chia.net/install/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb
ls $GITHUB_WORKSPACE/build_scripts/final_installer/
- name: Upload Beta Installer
@@ -171,16 +174,21 @@ jobs:
run: |
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb s3://download.chia.net/beta/chia-blockchain_arm64_latest_beta.deb
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.sha256 s3://download.chia.net/beta/chia-blockchain_arm64_latest_beta.deb.sha256
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb s3://download.chia.net/beta/chia-blockchain-cli_arm64_latest_beta.deb
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb.sha256 s3://download.chia.net/beta/chia-blockchain-cli_arm64_latest_beta.deb.sha256
- name: Upload Release Files
if: steps.check_secrets.outputs.HAS_SECRET && startsWith(github.ref, 'refs/tags/')
env:
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
run: |
ls $GITHUB_WORKSPACE/build_scripts/final_installer/
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb s3://download.chia.net/install/
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.sha256 s3://download.chia.net/install/
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.torrent s3://download.chia.net/torrents/
ls $GITHUB_WORKSPACE/build_scripts/final_installer/
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb s3://download.chia.net/install/
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.sha256 s3://download.chia.net/install/
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_arm64.deb.torrent s3://download.chia.net/torrents/
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb s3://download.chia.net/install/
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb.sha256 s3://download.chia.net/install/
aws s3 cp $GITHUB_WORKSPACE/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_arm64.deb.torrent s3://download.chia.net/torrents/
- name: Get tag name
if: startsWith(github.ref, 'refs/tags/')
+36 -28
View File
@@ -30,7 +30,7 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
@@ -49,7 +49,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
@@ -67,7 +67,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -96,17 +96,17 @@ jobs:
SECRET: "${{ secrets.INSTALLER_UPLOAD_SECRET }}"
# Get the most recent release from chia-plotter-madmax
- uses: actions/github-script@v4
- uses: actions/github-script@v6
id: 'latest-madmax'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const releases = await github.repos.listReleases({
const release = await github.rest.repos.getLatestRelease({
owner: 'Chia-Network',
repo: 'chia-plotter-madmax',
});
return releases.data[0].tag_name;
return release.data.tag_name;
- name: Get latest madmax plotter
run: |
@@ -117,17 +117,17 @@ jobs:
chmod +x "$GITHUB_WORKSPACE/madmax/chia_plot_k34"
# Get the most recent release from bladebit
- uses: actions/github-script@v4
- uses: actions/github-script@v6
id: 'latest-bladebit'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const releases = await github.repos.listReleases({
const release = await github.rest.repos.getLatestRelease({
owner: 'Chia-Network',
repo: 'bladebit',
});
return releases.data[0].tag_name;
return release.data.tag_name;
- name: Get latest bladebit plotter
run: |
@@ -139,12 +139,11 @@ jobs:
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
sh install.sh
- name: Setup Node 16.x
uses: actions/setup-node@v2.4.1
uses: actions/setup-node@v3
with:
node-version: '16.x'
@@ -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
@@ -178,22 +178,24 @@ jobs:
- name: Upload to s3
if: steps.check_secrets.outputs.HAS_SECRET
env:
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
run: |
GIT_SHORT_HASH=$(echo "${GITHUB_SHA}" | cut -c1-8)
CHIA_DEV_BUILD=${CHIA_INSTALLER_VERSION}-$GIT_SHORT_HASH
echo "CHIA_DEV_BUILD=$CHIA_DEV_BUILD" >>$GITHUB_ENV
ls ${{ github.workspace }}/build_scripts/final_installer/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb s3://download.chia.net/dev/chia-blockchain_${CHIA_DEV_BUILD}_amd64.deb
GIT_SHORT_HASH=$(echo "${GITHUB_SHA}" | cut -c1-8)
CHIA_DEV_BUILD=${CHIA_INSTALLER_VERSION}-$GIT_SHORT_HASH
echo "CHIA_DEV_BUILD=$CHIA_DEV_BUILD" >>$GITHUB_ENV
ls ${{ github.workspace }}/build_scripts/final_installer/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb s3://download.chia.net/dev/chia-blockchain_${CHIA_DEV_BUILD}_amd64.deb
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_amd64.deb s3://download.chia.net/dev/chia-blockchain-cli_${CHIA_DEV_BUILD}-1_amd64.deb
- name: Create Checksums
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
env:
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
run: |
ls ${{ github.workspace }}/build_scripts/final_installer/
sha256sum ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb > ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb.sha256
ls ${{ github.workspace }}/build_scripts/final_installer/
ls ${{ github.workspace }}/build_scripts/final_installer/
sha256sum ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb > ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb.sha256
sha256sum ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_amd64.deb > ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_amd64.deb.sha256
ls ${{ github.workspace }}/build_scripts/final_installer/
- name: Install py3createtorrent
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
@@ -206,6 +208,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
run: |
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb -o ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb.torrent --webseed https://download.chia.net/install/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb
py3createtorrent -f -t udp://tracker.opentrackr.org:1337/announce ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_amd64.deb -o ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_amd64.deb.torrent --webseed https://download.chia.net/install/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_amd64.deb
ls
- name: Upload Beta Installer
@@ -215,15 +218,20 @@ jobs:
run: |
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb s3://download.chia.net/beta/chia-blockchain_amd64_latest_beta.deb
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb.sha256 s3://download.chia.net/beta/chia-blockchain_amd64_latest_beta.deb.sha256
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_amd64.deb s3://download.chia.net/beta/chia-blockchain-cli_amd64_latest_beta.deb
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_amd64.deb.sha256 s3://download.chia.net/beta/chia-blockchain-cli_amd64_latest_beta.deb.sha256
- name: Upload Release Files
env:
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
if: steps.check_secrets.outputs.HAS_SECRET && startsWith(github.ref, 'refs/tags/')
run: |
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb s3://download.chia.net/install/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb.sha256 s3://download.chia.net/install/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb.torrent s3://download.chia.net/torrents/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb s3://download.chia.net/install/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb.sha256 s3://download.chia.net/install/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain_${CHIA_INSTALLER_VERSION}_amd64.deb.torrent s3://download.chia.net/torrents/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_amd64.deb s3://download.chia.net/install/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_amd64.deb.sha256 s3://download.chia.net/install/
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/chia-blockchain-cli_${CHIA_INSTALLER_VERSION}-1_amd64.deb.torrent s3://download.chia.net/torrents/
- name: Get tag name
if: startsWith(github.ref, 'refs/tags/')
+13 -13
View File
@@ -31,7 +31,7 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
@@ -65,17 +65,17 @@ jobs:
SECRET: "${{ secrets.INSTALLER_UPLOAD_SECRET }}"
# Get the most recent release from chia-plotter-madmax
- uses: actions/github-script@v4
- uses: actions/github-script@v6
id: 'latest-madmax'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const releases = await github.repos.listReleases({
const release = await github.rest.repos.getLatestRelease({
owner: 'Chia-Network',
repo: 'chia-plotter-madmax',
});
return releases.data[0].tag_name;
return release.data.tag_name;
- name: Get latest madmax plotter
run: |
@@ -86,17 +86,17 @@ jobs:
chmod +x "$GITHUB_WORKSPACE/madmax/chia_plot_k34"
# Get the most recent release from bladebit
- uses: actions/github-script@v4
- uses: actions/github-script@v6
id: 'latest-bladebit'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const releases = await github.repos.listReleases({
const release = await github.rest.repos.getLatestRelease({
owner: 'Chia-Network',
repo: 'bladebit',
});
return releases.data[0].tag_name;
return release.data.tag_name;
- name: Get latest bladebit plotter
run: |
@@ -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
+13 -14
View File
@@ -29,7 +29,7 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
@@ -70,7 +70,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
@@ -88,7 +88,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -104,17 +104,17 @@ jobs:
p12-password: ${{ secrets.APPLE_DEV_ID_APP_PASS }}
# Get the most recent release from chia-plotter-madmax
- uses: actions/github-script@v4
- uses: actions/github-script@v6
id: 'latest-madmax'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const releases = await github.repos.listReleases({
const release = await github.rest.repos.getLatestRelease({
owner: 'Chia-Network',
repo: 'chia-plotter-madmax',
});
return releases.data[0].tag_name;
return release.data.tag_name;
- name: Get latest madmax plotter
run: |
@@ -127,31 +127,30 @@ jobs:
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
sh install.sh
- name: Setup Node 16.x
uses: actions/setup-node@v2.4.1
uses: actions/setup-node@v3
with:
node-version: '16.x'
- 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
@@ -191,8 +190,8 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.INSTALLER_UPLOAD_SECRET }}
AWS_REGION: us-west-2
run: |
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}.dmg s3://download.chia.net/beta/Chia_latest_beta.dmg
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}.dmg.sha256 s3://download.chia.net/beta/Chia_latest_beta.dmg.sha256
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}.dmg s3://download.chia.net/beta/Chia-intel_latest_beta.dmg
aws s3 cp ${{ github.workspace }}/build_scripts/final_installer/Chia-${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}.dmg.sha256 s3://download.chia.net/beta/Chia-intel_latest_beta.dmg.sha256
- name: Upload Release Files
if: steps.check_secrets.outputs.HAS_AWS_SECRET && startsWith(github.ref, 'refs/tags/')
@@ -29,7 +29,7 @@ jobs:
- uses: Chia-Network/actions/clean-workspace@main
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
@@ -78,17 +78,17 @@ jobs:
p12-password: ${{ secrets.APPLE_DEV_ID_APP_PASS }}
# Get the most recent release from chia-plotter-madmax
- uses: actions/github-script@v4
- uses: actions/github-script@v6
id: 'latest-madmax'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const releases = await github.repos.listReleases({
const release = await github.rest.repos.getLatestRelease({
owner: 'Chia-Network',
repo: 'chia-plotter-madmax',
});
return releases.data[0].tag_name;
return release.data.tag_name;
- name: Get latest madmax plotter
run: |
@@ -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
@@ -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
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_blockchain
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test blockchain code with pytest
run: |
. ./activate
./venv/bin/py.test tests/blockchain/test_*.py -s -v --durations 0
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: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
+22 -4
View File
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_clvm
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -67,7 +70,6 @@ jobs:
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
@@ -77,7 +79,23 @@ jobs:
- name: Test clvm code with pytest
run: |
. ./activate
./venv/bin/py.test tests/clvm/test_*.py -s -v --durations 0 -n auto
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: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-cmds
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,37 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-cmds code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/cmds/test_*.py -s -v --durations 0
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: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-consensus
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,37 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-consensus code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/consensus/test_*.py -s -v --durations 0
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: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-custom_types
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,37 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-custom_types code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/custom_types/test_*.py -s -v --durations 0
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: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-daemon
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,25 +65,25 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
@@ -88,13 +91,29 @@ jobs:
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
sh install-timelord.sh -n
./vdf_bench square_asm 400000
- name: Test core-daemon code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/daemon/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/daemon/test_*.py --durations=10 -n 0 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-data_layer
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,37 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-data_layer code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/data_layer/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/data_layer/test_*.py --durations=10 -n 0 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-full_node-full_sync
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-full_node-full_sync code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/full_node/full_sync/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/full_node/full_sync/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-full_node-stores
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-full_node-stores code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/full_node/stores/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/full_node/stores/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-full_node
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-full_node code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/full_node/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/full_node/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-server
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-server code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/server/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/server/test_*.py --durations=10 -n 0 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
+35 -20
View File
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-ssl
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-ssl code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/ssl/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/ssl/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-util
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-util code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/util/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/util/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
+35 -20
View File
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_farmer_harvester
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test farmer_harvester code with pytest
run: |
. ./activate
./venv/bin/py.test tests/farmer_harvester/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/farmer_harvester/test_*.py --durations=10 -n 0 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_generator
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,37 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test generator code with pytest
run: |
. ./activate
./venv/bin/py.test tests/generator/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/generator/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -0,0 +1,115 @@
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
name: MacOS plot_sync Tests
on:
push:
branches:
- main
tags:
- '**'
pull_request:
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' && github.sha || '' }}
cancel-in-progress: true
jobs:
build:
name: MacOS plot_sync Tests
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_plot_sync
steps:
- 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: Create keychain for CI use
run: |
security create-keychain -p foo chiachain
security default-keychain -s chiachain
security unlock-keychain -p foo chiachain
security set-keychain-settings -t 7200 -u chiachain
- 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:
# 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-
- name: Cache test blocks and plots
uses: actions/cache@v2
id: test-blocks-plots
with:
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
run: |
brew install boost
sh install.sh -d
# Omitted installing Timelord
- name: Test plot_sync code with pytest
run: |
. ./activate
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/plot_sync/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
+34 -15
View File
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_plotting
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,25 +65,25 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
@@ -90,7 +93,23 @@ jobs:
- name: Test plotting code with pytest
run: |
. ./activate
./venv/bin/py.test tests/plotting/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/plotting/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
+35 -20
View File
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_pools
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test pools code with pytest
run: |
. ./activate
./venv/bin/py.test tests/pools/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/pools/test_*.py --durations=10 -n 2 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_simulation
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,25 +65,25 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
@@ -88,13 +91,29 @@ jobs:
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
sh install-timelord.sh -n
./vdf_bench square_asm 400000
- name: Test simulation code with pytest
run: |
. ./activate
./venv/bin/py.test tests/simulation/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/simulation/test_*.py --durations=10 -n 0 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
+24 -23
View File
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_tools
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,37 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test tools code with pytest
run: |
. ./activate
./venv/bin/py.test tests/tools/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/tools/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
+24 -23
View File
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_util
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,37 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test util code with pytest
run: |
. ./activate
./venv/bin/py.test tests/util/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/util/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-cat_wallet
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-cat_wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/cat_wallet/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/cat_wallet/test_*.py --durations=10 -n 0 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-db_wallet
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,37 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-db_wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/db_wallet/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/db_wallet/test_*.py --durations=10 -n 0 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-did_wallet
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,37 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-did_wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/did_wallet/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/did_wallet/test_*.py --durations=10 -n 0 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-rl_wallet
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,37 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-rl_wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/rl_wallet/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/rl_wallet/test_*.py --durations=10 -n 0 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-rpc
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-rpc code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/rpc/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/rpc/test_*.py --durations=10 -n 0 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-simple_sync
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-simple_sync code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/simple_sync/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/simple_sync/test_*.py --durations=10 -n 0 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-sync
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-sync code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/sync/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/sync/test_*.py --durations=10 -n 0 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
+36 -21
View File
@@ -22,17 +22,20 @@ jobs:
build:
name: MacOS wallet Tests
runs-on: ${{ matrix.os }}
timeout-minutes: 30
timeout-minutes: 40
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.8, 3.9]
os: [macOS-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_weight_proof
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -54,7 +57,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
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 }}
@@ -62,39 +65,51 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: |
brew install boost
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test weight_proof code with pytest
run: |
. ./activate
./venv/bin/py.test tests/weight_proof/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/weight_proof/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_blockchain
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test blockchain code with pytest
run: |
. ./activate
./venv/bin/py.test tests/blockchain/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/blockchain/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
+23 -11
View File
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_clvm
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,7 +58,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
@@ -64,13 +67,6 @@ jobs:
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- 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: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
@@ -82,7 +78,23 @@ jobs:
- name: Test clvm code with pytest
run: |
. ./activate
./venv/bin/py.test tests/clvm/test_*.py -s -v --durations 0 -n auto -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/clvm/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-cmds
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,14 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
@@ -90,16 +73,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-cmds code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/cmds/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/cmds/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-consensus
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,14 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
@@ -90,16 +73,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-consensus code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/consensus/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/consensus/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-custom_types
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,14 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
@@ -90,16 +73,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-custom_types code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/custom_types/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/custom_types/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-daemon
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -93,13 +90,29 @@ jobs:
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
sh install-timelord.sh -n
./vdf_bench square_asm 400000
- name: Test core-daemon code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/daemon/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/daemon/test_*.py --durations=10 -n 0 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-data_layer
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,14 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
@@ -90,16 +73,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-data_layer code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/data_layer/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/data_layer/test_*.py --durations=10 -n 0 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-full_node-full_sync
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-full_node-full_sync code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/full_node/full_sync/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/full_node/full_sync/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-full_node-stores
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-full_node-stores code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/full_node/stores/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/full_node/stores/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
- name: Check resource usage
run: |
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-full_node
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-full_node code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/full_node/test_*.py -s -v --durations 0
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/full_node/test_*.py --durations=10 -n 4 -m "not benchmark"
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
- name: Check resource usage
run: |
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-server
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-server code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/server/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/server/test_*.py --durations=10 -n 0 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-ssl
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-ssl code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/ssl/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/ssl/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-util
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core-util code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/util/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/util/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
+36 -27
View File
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test core code with pytest
run: |
. ./activate
./venv/bin/py.test tests/core/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_farmer_harvester
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test farmer_harvester code with pytest
run: |
. ./activate
./venv/bin/py.test tests/farmer_harvester/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/farmer_harvester/test_*.py --durations=10 -n 0 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_generator
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,14 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
@@ -90,16 +73,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test generator code with pytest
run: |
. ./activate
./venv/bin/py.test tests/generator/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/generator/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -0,0 +1,117 @@
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
name: Ubuntu plot_sync Test
on:
push:
branches:
- main
tags:
- '**'
pull_request:
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' && github.sha || '' }}
cancel-in-progress: true
jobs:
build:
name: Ubuntu plot_sync Test
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_plot_sync
steps:
- 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: Cache npm
uses: actions/cache@v3
with:
path: ~/.npm
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: 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 test blocks and plots
uses: actions/cache@v2
id: test-blocks-plots
with:
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:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
run: |
sh install.sh -d
# Omitted installing Timelord
- name: Test plot_sync code with pytest
run: |
. ./activate
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/plot_sync/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
#
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
#
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_plotting
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -95,7 +92,23 @@ jobs:
- name: Test plotting code with pytest
run: |
. ./activate
./venv/bin/py.test tests/plotting/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/plotting/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
+36 -27
View File
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_pools
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test pools code with pytest
run: |
. ./activate
./venv/bin/py.test tests/pools/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/pools/test_*.py --durations=10 -n 2 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_simulation
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -93,13 +90,29 @@ jobs:
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
sh install-timelord.sh -n
./vdf_bench square_asm 400000
- name: Test simulation code with pytest
run: |
. ./activate
./venv/bin/py.test tests/simulation/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/simulation/test_*.py --durations=10 -n 0 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
+25 -30
View File
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_tools
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,14 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
@@ -90,16 +73,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test tools code with pytest
run: |
. ./activate
./venv/bin/py.test tests/tools/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/tools/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
+25 -30
View File
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_util
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,14 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
@@ -90,16 +73,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test util code with pytest
run: |
. ./activate
./venv/bin/py.test tests/util/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/util/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-cat_wallet
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-cat_wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/cat_wallet/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/cat_wallet/test_*.py --durations=10 -n 0 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-db_wallet
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,14 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
@@ -90,16 +73,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-db_wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/db_wallet/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/db_wallet/test_*.py --durations=10 -n 0 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-did_wallet
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,14 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
@@ -90,16 +73,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-did_wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/did_wallet/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/did_wallet/test_*.py --durations=10 -n 0 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-rl_wallet
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,14 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
with:
repository: 'Chia-Network/test-cache'
path: '.chia'
ref: '0.28.0'
fetch-depth: 1
- name: Link home directory
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
# Omitted checking out blocks and plots repo Chia-Network/test-cache
- name: Run install script
env:
@@ -90,16 +73,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-rl_wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/rl_wallet/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/rl_wallet/test_*.py --durations=10 -n 0 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-rpc
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-rpc code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/rpc/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/rpc/test_*.py --durations=10 -n 0 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-simple_sync
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-simple_sync code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/simple_sync/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/simple_sync/test_*.py --durations=10 -n 0 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-sync
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet-sync code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/sync/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/sync/test_*.py --durations=10 -n 0 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
+37 -28
View File
@@ -22,17 +22,20 @@ jobs:
build:
name: Ubuntu wallet Test
runs-on: ${{ matrix.os }}
timeout-minutes: 30
timeout-minutes: 40
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test wallet code with pytest
run: |
. ./activate
./venv/bin/py.test tests/wallet/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/wallet/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
@@ -29,10 +29,13 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
env:
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_weight_proof
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -42,7 +45,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -55,34 +58,28 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout test blocks and plots
uses: actions/checkout@v2
- 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: Link home directory
- name: Checkout test blocks and plots
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
run: |
cd $HOME
ln -s $GITHUB_WORKSPACE/.chia
echo "$HOME/.chia"
ls -al $HOME/.chia
- 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
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:
@@ -90,16 +87,28 @@ jobs:
run: |
sh install.sh -d
- name: Install timelord
run: |
. ./activate
sh install-timelord.sh
./vdf_bench square_asm 400000
# Omitted installing Timelord
- name: Test weight_proof code with pytest
run: |
. ./activate
./venv/bin/py.test tests/weight_proof/test_*.py -s -v --durations 0 -p no:monitor
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/weight_proof/test_*.py --durations=10 -n 4 -m "not benchmark" -p no:monitor
- name: Process coverage data
run: |
venv/bin/coverage combine --rcfile=.coveragerc .coverage.*
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml"
venv/bin/coverage report --rcfile=.coveragerc --show-missing
- name: Publish coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
if-no-files-found: error
# Omitted resource usage check
+13 -11
View File
@@ -23,7 +23,7 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
@@ -38,7 +38,7 @@ jobs:
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache npm
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -51,7 +51,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v2.1.6
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
@@ -65,7 +65,7 @@ jobs:
python-version: "3.9.11"
- name: Setup Node 16.x
uses: actions/setup-node@v2.4.1
uses: actions/setup-node@v3
with:
node-version: '16.x'
@@ -105,17 +105,17 @@ jobs:
deactivate
# Get the most recent release from chia-plotter-madmax
- uses: actions/github-script@v4
- uses: actions/github-script@v6
id: 'latest-madmax'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const releases = await github.repos.listReleases({
const release = await github.rest.repos.getLatestRelease({
owner: 'Chia-Network',
repo: 'chia-plotter-madmax',
});
return releases.data[0].tag_name;
return release.data.tag_name;
- name: Get latest madmax plotter
run: |
@@ -124,17 +124,17 @@ jobs:
Invoke-WebRequest https://github.com/Chia-Network/chia-plotter-madmax/releases/download/${{ steps.latest-madmax.outputs.result }}/chia_plot_k34-${{ steps.latest-madmax.outputs.result }}.exe -OutFile "$env:GITHUB_WORKSPACE\madmax\chia_plot_k34.exe"
# Get the most recent release from bladebit
- uses: actions/github-script@v4
- uses: actions/github-script@v6
id: 'latest-bladebit'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const releases = await github.repos.listReleases({
const release = await github.rest.repos.getLatestRelease({
owner: 'Chia-Network',
repo: 'bladebit',
});
return releases.data[0].tag_name;
return release.data.tag_name;
- name: Get latest bladebit plotter
run: |
@@ -145,17 +145,19 @@ jobs:
- name: Build Windows installer with build_scripts\build_windows.ps1
env:
CHIA_INSTALLER_VERSION: ${{ steps.version_number.outputs.CHIA_INSTALLER_VERSION }}
WIN_CODE_SIGN_PASS: ${{ secrets.WIN_CODE_SIGN_PASS }}
HAS_SECRET: ${{ steps.check_secrets.outputs.HAS_SIGNING_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"
git -C .\chia-blockchain-gui status
.\build_scripts\build_windows.ps1
- name: Upload Windows exe's to artifacts
uses: actions/upload-artifact@v2.2.2
with:
name: Windows-Exe
name: chia-installers-windows-exe-intel
path: ${{ github.workspace }}\chia-blockchain-gui\Chia-win32-x64\
- name: Upload Installer to artifacts
+1 -1
View File
@@ -40,7 +40,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
+3 -2
View File
@@ -8,7 +8,7 @@ jobs:
update_ca_module:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "${{ github.event.inputs.chia_ref }}"
@@ -20,7 +20,7 @@ jobs:
cd ./mozilla-ca
git pull origin main
- name: "Create Pull Request"
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v4
with:
base: main
body: "Newest Mozilla CA cert"
@@ -28,5 +28,6 @@ jobs:
commit-message: "adding ca updates"
delete-branch: true
reviewers: "wjblanke,emlowe"
assignees: "wallentx"
title: "CA Cert updates"
token: "${{ secrets.GITHUB_TOKEN }}"
+1 -1
View File
@@ -14,6 +14,6 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.3
+2 -2
View File
@@ -49,13 +49,13 @@ jobs:
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v4.8.1
uses: github/super-linter@v4.9.2
# uses: docker://github/super-linter:v3.10.2
env:
VALIDATE_ALL_CODEBASE: true
+9 -4
View File
@@ -28,7 +28,7 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -40,7 +40,6 @@ jobs:
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: sh install.sh
- name: Run install-gui script
@@ -125,6 +124,10 @@ jobs:
if: ${{ matrix.distribution.type == 'arch' }}
run: |
pacman --noconfirm --refresh base --sync git sudo
# The behavior we follow in install.sh is unique with Arch in that
# we leave it to the user to install the appropriate version of python,
# so we need to install python here in order for the test to succeed.
pacman --noconfirm -U --needed https://archive.archlinux.org/packages/p/python/python-3.9.9-1-x86_64.pkg.tar.zst
- name: Prepare CentOS
if: ${{ matrix.distribution.type == 'centos' }}
@@ -175,16 +178,18 @@ jobs:
apt-get --yes update
apt-get install --yes git lsb-release sudo
- name: Add safe git directory
run: git config --global --add safe.directory $GITHUB_WORKSPACE
# after installing git so we use that copy
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
BUILD_VDF_CLIENT: "N"
run: sh install.sh -a
- name: Run chia --help
+1 -1
View File
@@ -23,7 +23,7 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
+4
View File
@@ -298,3 +298,7 @@ tags
[._]*.un~
# End of https://www.toptal.com/developers/gitignore/api/python,git,vim
# Ignore the binaries that are pulled for the installer
/bladebit/
/madmax/
-1
View File
@@ -134,7 +134,6 @@ extend_skip=
chia/wallet/dlo_wallet/dlo_wallet.py
chia/wallet/lineage_proof.py
chia/wallet/payment.py
chia/wallet/puzzles/genesis_checkers.py
chia/wallet/puzzles/load_clvm.py
chia/wallet/puzzles/prefarm/make_prefarm_ph.py
chia/wallet/puzzles/prefarm/spend_prefarm.py
+6 -1
View File
@@ -6,6 +6,11 @@ repos:
entry: ./tests/build-workflows.py --fail-on-update
language: python
pass_filenames: false
- id: check-sql
name: Validate SQL statements
entry: ./tests/check_sql_statements.py
language: python
pass_filenames: false
- repo: local
hooks:
- id: init_py_files
@@ -55,7 +60,7 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.940
rev: v0.942
hooks:
- id: mypy
additional_dependencies: [filelock, pytest, pytest-asyncio, types-aiofiles, types-click, types-setuptools, types-PyYAML]
+70 -3
View File
@@ -8,6 +8,76 @@ for setuptools_scm/PEP 440 reasons.
## [Unreleased]
## 1.3.4 Chia blockchain 2022-4-19
## What's Changed
### Added
- Creating an offer now allows you to edit the exchange between two tokens that will auto calculate either the sending token amount or the receiving token amount
- When making an offer, makers can now create an offer including a fee to help get the transaction into the mempool when an offer is accepted
- Implemented `chia rpc` command
- New RPC `get_coin_records_by_hint` - Get coins for a given hint (Thanks @freddiecoleman)
- Add maker fee to remaining offer RPCs
- Add healthcheck endpoint to rpc services
- Optional wallet type parameter for `get_wallets` and `wallet show`
- Add `select_coins` RPC method by (Thanks @ftruzzi)
- Added `-n`/`--new-address` option to `chia wallet get_address`
- New DBWrapper supporting concurrent readers
- Added `config.yaml` option to run the `full_node` in single-threaded mode
- Build cli only version of debs
- Add `/get_stray_cats` API for accessing unknown CATs
### Changed
- Left navigation bar in the GUI has been reorganized and icons have been updated
- Settings has been moved to the new left hand nav bar
- Token selection has been changed to a permanent column in the GUI instead of the drop down list along
- Manage token option has been added at the bottom of the Token column to all users to show/hide token wallets
- Users can show/hide token wallets. If you have auto-discover cats in config.yaml turned off, new tokens will still show up there, but those wallets wont get created until the token has been toggled on for the first time
- CATs now have a link to Taildatabase.com to look up the Asset ID
- Ongoing improvements to the internal test framework for speed and reliability.
- Significant harvester protocol update: You will need to update your farmer and all your harvesters as this is a breaking change in the harvester protocol. The new protocol solves many scaling issues. In particular, the protocol supports sending delta changes to the farmer - so for example, adding plots to a farm results in only the new plots being reported. We recommend you update your farmer first.
- Updated clvm_tools to 0.4.4
- Updated clvm_tools_rs to 0.1.7
- Changed code to use by default the Rust implementation of clvm_tools (clvm_tools_rs)
- Consolidated socket library to aiohttp and removed websockets dependency
- During node startup, missing blocks in the DB will throw an exception
- Updated cryptography to 36.0.2
- The rust implementation of CLVM is now called `chia_rs` instead of `clvm_rs`.
- Updated code to use improved rust interface `run_generator2`
- Code improvements to prefer connecting to a local trusted node over untrusted nodes
### Fixed
- Fixed issues with claiming self-pool rewards with and without a fee
- Fixed wallet creation in edge cases around chain reorgs
- Harvester: Reuse legacy refresh interval if new params aren't available
- Fixed typos `lastest` > `latest` (Thanks @daverof)
- Fixed typo in command line argument parsing for `chia db validate`
- Improved backwards compatibility for node RPC calls `get_blockchain_state` and `get_additions_and_removals`
- Fixed issue where `--root_path` option was not honored by `chia configure` CLI command
- Fixed cases where node DB was not created initially using v2 format
- Improved error messages from `chia db upgrade`
- Capitalized display of `Rpc` -> `RPC` in `chia show -s` by (Thanks @hugepants)
- Improved handling of chain reorgs with atomic rollback for the wallet
- Handled cases where one node doesn't have the coin we are looking for
- Fixed timelord installation for Debian
- Checked for requesting items when creating an offer
- Minor output formatting/enhancements for `chia wallet show`
- Fixed typo and index issues in wallet database
- Used the rust clvm version instead of python in more places
- Fixed trailing bytes shown in CAT asset ID row when using `chia wallet show`
- Maintain all chain state during reorg until the new fork has been fully validated
- Improved performance of `get_coin_records_by_names` by using proper index (Thanks @roseiliend)
- Improved handling of unknown pending balances
- Improved plot load times
### Known Issues
- You cannot install and run chia blockchain using the macOS packaged DMG on macOS Mojave (10.14).
- Pending transactions are not retried correctly and so can be stuck in the pending state unless manually removed and re-submitted
## 1.3.3 Chia blockchain 2022-4-02
### Fixed
@@ -49,7 +119,6 @@ for setuptools_scm/PEP 440 reasons.
- Update the database queries for the `block_count_metrics` RPC endpoint to utilize indexes effectively for V2 DBs.
- Several improvements to tests.
## 1.3.0 Chia blockchain 2022-3-07
### Added:
@@ -139,7 +208,6 @@ for setuptools_scm/PEP 440 reasons.
- Workaround: Restart the GUI, or clear unconfirmed TX.
- Claiming rewards when self-pooling using CLI will show an error message, but it will actually create the transaction.
## 1.2.11 Chia blockchain 2021-11-4
Farmers rejoice: today's release integrates two plotters in broad use in the Chia community: Bladebit, created by @harold-b, and Madmax, created by @madMAx43v3r. Both of these plotters bring significant improvements in plotting time. More plotting info [here](https://github.com/Chia-Network/chia-blockchain/wiki/Alternative--Plotters).
@@ -174,7 +242,6 @@ This release also includes several important performance improvements as a resul
- PlotNFT transactions via CLI (e.g. `chia plotnft join`) now accept a fee parameter, but it is not yet operable.
## 1.2.10 Chia blockchain 2021-10-25
We have some great improvements in this release: We launched our migration of keys to a common encrypted keyring.yaml file, and we secure this with an optional passphrase in both GUI and CLI. We've added a passphrase hint in case you forget your passphrase. More info on our [wiki](https://github.com/Chia-Network/chia-blockchain/wiki/Passphrase-Protected-Chia-Keys-and-Key-Storage-Migration). We also launched a new Chialisp compiler in clvm_tools_rs which substantially improves compile time for Chialisp developers. We also addressed a widely reported issue in which a system failure, such as a power outage, would require some farmers to sync their full node from zero. This release also includes several other improvements and fixes.
+2 -2
View File
@@ -25,7 +25,7 @@ We ask that external contributors create a fork of the `main` branch for any fea
Members of the Chia organization may create feature branches from the `main` branch.
In the event an emergency fix is required for the release version of Chia, members of the Chia organization will create a feature branch from the current release branch `1.0.0`.
In the event an emergency fix is required for the release version of Chia, members of the Chia organization will create a feature branch from the current release branch `latest`.
## Branching Strategy
@@ -93,7 +93,7 @@ workflow.
3. Install BlackConnect plugin
4. Set to run python black on save
5. Set line length to 120
6. Install these linters https://github.com/Chia-Network/chia-blockchain/tree/main/.github/linters
6. Install the linters in the root directory
## Testnets and review environments
+61 -10
View File
@@ -1,5 +1,16 @@
param(
[Parameter(HelpMessage="install development dependencies")]
[switch]$d = $False
)
$ErrorActionPreference = "Stop"
$extras = @()
if ($d)
{
$extras += "dev"
}
if ([Environment]::Is64BitOperatingSystem -eq $false)
{
Write-Output "Chia requires a 64-bit Windows installation"
@@ -32,28 +43,68 @@ if ($null -eq (Get-Command py -ErrorAction SilentlyContinue))
Exit 1
}
$pythonVersion = (py --version).split(" ")[1]
if ([version]$pythonVersion -lt [version]"3.7.0")
$supportedPythonVersions = "3.9", "3.8", "3.7"
if (Test-Path env:INSTALL_PYTHON_VERSION)
{
Write-Output "Found Python version:" $pythonVersion
Write-Output "Installation requires Python 3.7 or later"
Exit 1
$pythonVersion = $env:INSTALL_PYTHON_VERSION
}
Write-Output "Python version is:" $pythonVersion
else
{
foreach ($version in $supportedPythonVersions)
{
try
{
py -$version --version 2>&1 >$null
$result = $?
}
catch
{
$result = $false
}
if ($result)
{
$pythonVersion = $version
break
}
}
$openSSLVersionStr = (py -c 'import ssl; print(ssl.OPENSSL_VERSION)')
$openSSLVersion = (py -c 'import ssl; print(ssl.OPENSSL_VERSION_NUMBER)')
if (-not $pythonVersion)
{
$reversedPythonVersions = $supportedPythonVersions.clone()
[array]::Reverse($reversedPythonVersions)
$reversedPythonVersions = $reversedPythonVersions -join ", "
Write-Output "No usable Python version found, supported versions are: $reversedPythonVersions"
Exit 1
}
}
$fullPythonVersion = (py -$pythonVersion --version).split(" ")[1]
Write-Output "Python version is: $fullPythonVersion"
$openSSLVersionStr = (py -$pythonVersion -c 'import ssl; print(ssl.OPENSSL_VERSION)')
$openSSLVersion = (py -$pythonVersion -c 'import ssl; print(ssl.OPENSSL_VERSION_NUMBER)')
if ($openSSLVersion -lt 269488367)
{
Write-Output "Found Python with OpenSSL version:" $openSSLVersionStr
Write-Output "Anything before 1.1.1n is vulnerable to CVE-2022-0778."
}
py -m venv venv
if ($extras.length -gt 0)
{
$extras_cli = $extras -join ","
$extras_cli = "[$extras_cli]"
}
else
{
$extras_cli = ""
}
py -$pythonVersion -m venv venv
venv\scripts\python -m pip install --upgrade pip setuptools wheel
venv\scripts\pip install --extra-index-url https://pypi.chia.net/simple/ miniupnpc==2.2.2
venv\scripts\pip install --editable . --extra-index-url https://pypi.chia.net/simple/
venv\scripts\pip install --editable ".$extras_cli" --extra-index-url https://pypi.chia.net/simple/
Write-Output ""
Write-Output "Chia blockchain .\Install.ps1 complete."
+4 -2
View File
@@ -17,7 +17,7 @@ from chia.full_node.hint_store import HintStore
from chia.types.blockchain_format.program import SerializedProgram
from chia.types.blockchain_format.sized_bytes import bytes32
from chia.util.db_version import lookup_db_version
from chia.util.db_wrapper import DBWrapper
from chia.util.db_wrapper import DBWrapper2
from chia.util.ints import uint32
# the first transaction block. Each byte in transaction_height_delta is the
@@ -57,7 +57,9 @@ async def main(db_path: Path):
await connection.execute("pragma query_only=ON")
db_version: int = await lookup_db_version(connection)
db_wrapper = DBWrapper(connection, db_version=db_version)
db_wrapper = DBWrapper2(connection, db_version=db_version)
await db_wrapper.add_connection(await aiosqlite.connect(db_path))
block_store = await BlockStore.create(db_wrapper)
hint_store = await HintStore.create(db_wrapper)
coin_store = await CoinStore.create(db_wrapper)
+8 -9
View File
@@ -7,7 +7,7 @@ import os
import sys
from benchmarks.utils import clvm_generator
from chia.util.db_wrapper import DBWrapper
from chia.util.db_wrapper import DBWrapper2
from chia.util.ints import uint128, uint64, uint32, uint8
from utils import (
rewards,
@@ -40,7 +40,7 @@ random.seed(123456789)
async def run_add_block_benchmark(version: int):
verbose: bool = "--verbose" in sys.argv
db_wrapper: DBWrapper = await setup_db("block-store-benchmark.db", version)
db_wrapper: DBWrapper2 = await setup_db("block-store-benchmark.db", version)
# keep track of benchmark total time
all_test_time = 0.0
@@ -218,7 +218,6 @@ async def run_add_block_benchmark(version: int):
await block_store.set_in_chain([(header_hash,)])
header_hashes.append(header_hash)
await block_store.set_peak(header_hash)
await db_wrapper.db.commit()
stop = monotonic()
total_time += stop - start
@@ -288,10 +287,10 @@ async def run_add_block_benchmark(version: int):
print("profiling get_full_blocks_at")
start = monotonic()
for h in range(1, block_height):
blocks = await block_store.get_full_blocks_at([h])
for hi in range(1, block_height):
blocks = await block_store.get_full_blocks_at([hi])
assert len(blocks) == 1
assert blocks[0].height == h
assert blocks[0].height == hi
stop = monotonic()
total_time += stop - start
@@ -352,8 +351,8 @@ async def run_add_block_benchmark(version: int):
start = monotonic()
for i in range(100):
h = random.randint(1, block_height - 100)
blocks = await block_store.get_block_records_in_range(h, h + 99)
hi = random.randint(1, block_height - 100)
blocks = await block_store.get_block_records_in_range(hi, hi + 99)
assert len(blocks) == 100
stop = monotonic()
@@ -411,7 +410,7 @@ async def run_add_block_benchmark(version: int):
print(f"database size: {db_size/1000000:.3f} MB")
finally:
await db_wrapper.db.close()
await db_wrapper.close()
if __name__ == "__main__":
+3 -7
View File
@@ -7,7 +7,7 @@ from typing import List, Tuple
import os
import sys
from chia.util.db_wrapper import DBWrapper
from chia.util.db_wrapper import DBWrapper2
from chia.types.blockchain_format.sized_bytes import bytes32
from chia.types.blockchain_format.coin import Coin
from chia.util.ints import uint64, uint32
@@ -37,7 +37,7 @@ def make_coins(num: int) -> Tuple[List[Coin], List[bytes32]]:
async def run_new_block_benchmark(version: int):
verbose: bool = "--verbose" in sys.argv
db_wrapper: DBWrapper = await setup_db("coin-store-benchmark.db", version)
db_wrapper: DBWrapper2 = await setup_db("coin-store-benchmark.db", version)
# keep track of benchmark total time
all_test_time = 0.0
@@ -75,7 +75,6 @@ async def run_new_block_benchmark(version: int):
additions,
removals,
)
await db_wrapper.db.commit()
# 19 seconds per block
timestamp += 19
@@ -117,7 +116,6 @@ async def run_new_block_benchmark(version: int):
additions,
removals,
)
await db_wrapper.db.commit()
stop = monotonic()
# 19 seconds per block
@@ -168,7 +166,6 @@ async def run_new_block_benchmark(version: int):
additions,
removals,
)
await db_wrapper.db.commit()
stop = monotonic()
@@ -218,7 +215,6 @@ async def run_new_block_benchmark(version: int):
additions,
removals,
)
await db_wrapper.db.commit()
stop = monotonic()
# 19 seconds per block
@@ -305,7 +301,7 @@ async def run_new_block_benchmark(version: int):
print(f"all tests completed in {all_test_time:0.4f}s")
finally:
await db_wrapper.db.close()
await db_wrapper.close()
db_size = os.path.getsize(Path("coin-store-benchmark.db"))
print(f"database size: {db_size/1000000:.3f} MB")
+3 -3
View File
@@ -17,14 +17,14 @@ from chia.util.streamable import Streamable, streamable
_version = 1
@dataclass(frozen=True)
@streamable
@dataclass(frozen=True)
class BenchmarkInner(Streamable):
a: str
@dataclass(frozen=True)
@streamable
@dataclass(frozen=True)
class BenchmarkMiddle(Streamable):
a: uint64
b: List[bytes32]
@@ -33,8 +33,8 @@ class BenchmarkMiddle(Streamable):
e: BenchmarkInner
@dataclass(frozen=True)
@streamable
@dataclass(frozen=True)
class BenchmarkClass(Streamable):
a: Optional[BenchmarkMiddle]
b: Optional[BenchmarkMiddle]
+8 -10
View File
@@ -3,7 +3,7 @@ from chia.util.ints import uint64, uint32, uint8
from chia.consensus.coinbase import create_farmer_coin, create_pool_coin
from chia.types.blockchain_format.classgroup import ClassgroupElement
from chia.types.blockchain_format.coin import Coin
from chia.types.blockchain_format.sized_bytes import bytes32
from chia.types.blockchain_format.sized_bytes import bytes32, bytes100
from chia.types.blockchain_format.vdf import VDFInfo, VDFProof
from chia.types.blockchain_format.foliage import Foliage, FoliageBlockData, FoliageTransactionBlock, TransactionsInfo
from chia.types.blockchain_format.pool_target import PoolTarget
@@ -12,7 +12,7 @@ from chia.types.blockchain_format.proof_of_space import ProofOfSpace
from chia.types.blockchain_format.reward_chain_block import RewardChainBlock
from chia.types.full_block import FullBlock
from chia.util.ints import uint128
from chia.util.db_wrapper import DBWrapper
from chia.util.db_wrapper import DBWrapper2
from typing import Tuple
from pathlib import Path
from datetime import datetime
@@ -56,9 +56,7 @@ def rand_bytes(num) -> bytes:
def rand_hash() -> bytes32:
# TODO: address hint errors and remove ignores
# error: Incompatible return value type (got "bytes", expected "bytes32") [return-value]
return rand_bytes(32) # type: ignore[return-value]
return bytes32(rand_bytes(32))
def rand_g1() -> G1Element:
@@ -72,9 +70,7 @@ def rand_g2() -> G2Element:
def rand_class_group_element() -> ClassgroupElement:
# TODO: address hint errors and remove ignores
# error: Argument 1 to "ClassgroupElement" has incompatible type "bytes"; expected "bytes100" [arg-type]
return ClassgroupElement(rand_bytes(100)) # type: ignore[arg-type]
return ClassgroupElement(bytes100(rand_bytes(100)))
def rand_vdf() -> VDFInfo:
@@ -176,7 +172,7 @@ def rand_full_block() -> FullBlock:
return full_block
async def setup_db(name: str, db_version: int) -> DBWrapper:
async def setup_db(name: str, db_version: int) -> DBWrapper2:
db_filename = Path(name)
try:
os.unlink(db_filename)
@@ -197,7 +193,9 @@ async def setup_db(name: str, db_version: int) -> DBWrapper:
await connection.execute("pragma journal_mode=wal")
await connection.execute("pragma synchronous=full")
return DBWrapper(connection, db_version)
ret = DBWrapper2(connection, db_version)
await ret.add_connection(await aiosqlite.connect(db_filename))
return ret
def get_commit_hash() -> str:
+6
View File
@@ -0,0 +1,6 @@
Package: chia-blockchain-cli
Version: {{ CHIA_INSTALLER_VERSION }}
Architecture: {{ PLATFORM }}
Maintainer: Chia Network Inc <hello@chia.net>
Description: Chia Blockchain
Chia is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure.
+20 -3
View File
@@ -1,5 +1,7 @@
#!/bin/bash
set -o errexit
if [ ! "$1" ]; then
echo "This script requires either amd64 of arm64 as an argument"
exit 1
@@ -10,18 +12,17 @@ else
PLATFORM="$1"
DIR_NAME="chia-blockchain-linux-arm64"
fi
export PLATFORM
pip install setuptools_scm
# The environment variable CHIA_INSTALLER_VERSION needs to be defined
# If the env variable NOTARIZE and the username and password variables are
# set, this will attempt to Notarize the signed DMG
CHIA_INSTALLER_VERSION=$(python installer-version.py)
if [ ! "$CHIA_INSTALLER_VERSION" ]; then
echo "WARNING: No environment variable CHIA_INSTALLER_VERSION set. Using 0.0.0."
CHIA_INSTALLER_VERSION="0.0.0"
fi
echo "Chia Installer Version is: $CHIA_INSTALLER_VERSION"
export CHIA_INSTALLER_VERSION
echo "Installing npm and electron packagers"
cd npm_linux_deb || exit
@@ -43,6 +44,19 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
exit $LAST_EXIT_CODE
fi
# Builds CLI only .deb
# need j2 for templating the control file
pip install j2cli
CLI_DEB_BASE="chia-blockchain-cli_$CHIA_INSTALLER_VERSION-1_$PLATFORM"
mkdir -p "dist/$CLI_DEB_BASE/opt/chia"
mkdir -p "dist/$CLI_DEB_BASE/usr/bin"
mkdir -p "dist/$CLI_DEB_BASE/DEBIAN"
j2 -o "dist/$CLI_DEB_BASE/DEBIAN/control" assets/deb/control.j2
cp -r dist/daemon/* "dist/$CLI_DEB_BASE/opt/chia/"
ln -s ../../opt/chia/chia "dist/$CLI_DEB_BASE/usr/bin/chia"
dpkg-deb --build --root-owner-group "dist/$CLI_DEB_BASE"
# CLI only .deb done
cp -r dist/daemon ../chia-blockchain-gui/packages/gui
cd .. || exit
cd chia-blockchain-gui || exit
@@ -93,4 +107,7 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
exit $LAST_EXIT_CODE
fi
# Move the cli only deb into final installers as well, so it gets uploaded as an artifact
mv "dist/$CLI_DEB_BASE.deb" final_installer/
ls final_installer/
+2 -3
View File
@@ -1,5 +1,7 @@
#!/bin/bash
set -o errexit
if [ ! "$1" ]; then
echo "This script requires either amd64 of arm64 as an argument"
exit 1
@@ -12,11 +14,8 @@ else
DIR_NAME="chia-blockchain-linux-arm64"
fi
pip install setuptools_scm
# The environment variable CHIA_INSTALLER_VERSION needs to be defined
# If the env variable NOTARIZE and the username and password variables are
# set, this will attempt to Notarize the signed DMG
CHIA_INSTALLER_VERSION=$(python installer-version.py)
if [ ! "$CHIA_INSTALLER_VERSION" ]; then
echo "WARNING: No environment variable CHIA_INSTALLER_VERSION set. Using 0.0.0."
+1 -4
View File
@@ -1,12 +1,9 @@
#!/bin/bash
set -euo pipefail
set -o errexit -o nounset
pip install setuptools_scm
# The environment variable CHIA_INSTALLER_VERSION needs to be defined.
# If the env variable NOTARIZE and the username and password variables are
# set, this will attempt to Notarize the signed DMG.
CHIA_INSTALLER_VERSION=$(python installer-version.py)
if [ ! "$CHIA_INSTALLER_VERSION" ]; then
echo "WARNING: No environment variable CHIA_INSTALLER_VERSION set. Using 0.0.0."
+1 -4
View File
@@ -1,12 +1,9 @@
#!/bin/bash
set -euo pipefail
set -o errexit -o nounset
pip install setuptools_scm
# The environment variable CHIA_INSTALLER_VERSION needs to be defined.
# If the env variable NOTARIZE and the username and password variables are
# set, this will attempt to Notarize the signed DMG.
CHIA_INSTALLER_VERSION=$(python installer-version.py)
if [ ! "$CHIA_INSTALLER_VERSION" ]; then
echo "WARNING: No environment variable CHIA_INSTALLER_VERSION set. Using 0.0.0."
-3
View File
@@ -32,12 +32,9 @@ python -m pip install --upgrade pip
pip install wheel pep517
pip install pywin32
pip install pyinstaller==4.9
pip install setuptools_scm
Write-Output " ---"
Write-Output "Get CHIA_INSTALLER_VERSION"
# The environment variable CHIA_INSTALLER_VERSION needs to be defined
$env:CHIA_INSTALLER_VERSION = python .\build_scripts\installer-version.py -win
if (-not (Test-Path env:CHIA_INSTALLER_VERSION)) {
$env:CHIA_INSTALLER_VERSION = '0.0.0'
+2
View File
@@ -1,6 +1,8 @@
#!/bin/bash
# Cleans up files/directories that may be left over from previous runs for a clean slate before starting a new build
set -o errexit
PWD=$(pwd)
rm -rf ../venv || true
+100 -30
View File
@@ -1,5 +1,7 @@
import aiosqlite
import random
from dataclasses import dataclass
from typing import Optional, List, Dict, Tuple, Any
from chia.types.blockchain_format.sized_bytes import bytes32
@@ -8,7 +10,8 @@ from chia.types.blockchain_format.program import Program, SerializedProgram
from chia.util.ints import uint64, uint32
from chia.util.hash import std_hash
from chia.util.errors import Err, ValidationError
from chia.util.db_wrapper import DBWrapper
from chia.util.db_wrapper import DBWrapper2
from chia.util.streamable import Streamable, streamable
from chia.types.coin_record import CoinRecord
from chia.types.spend_bundle import SpendBundle
from chia.types.generator_types import BlockGenerator
@@ -35,26 +38,49 @@ and is designed so that you could test with it and then swap in a real rpc clien
"""
class SimFullBlock:
def __init__(self, generator: Optional[BlockGenerator], height: uint32):
self.height = height # Note that height is not on a regular FullBlock
self.transactions_generator = generator
@streamable
@dataclass(frozen=True)
class SimFullBlock(Streamable):
transactions_generator: Optional[BlockGenerator]
height: uint32 # Note that height is not on a regular FullBlock
class SimBlockRecord:
def __init__(self, rci: List[Coin], height: uint32, timestamp: uint64):
self.reward_claims_incorporated = rci
self.height = height
self.prev_transaction_block_height = uint32(height - 1) if height > 0 else 0
self.timestamp = timestamp
self.is_transaction_block = True
self.header_hash = std_hash(bytes(height))
self.prev_transaction_block_hash = std_hash(std_hash(height))
@streamable
@dataclass(frozen=True)
class SimBlockRecord(Streamable):
reward_claims_incorporated: List[Coin]
height: uint32
prev_transaction_block_height: uint32
timestamp: uint64
is_transaction_block: bool
header_hash: bytes32
prev_transaction_block_hash: bytes32
@classmethod
def create(cls, rci: List[Coin], height: uint32, timestamp: uint64):
return cls(
rci,
height,
uint32(height - 1 if height > 0 else 0),
timestamp,
True,
std_hash(bytes(height)),
std_hash(std_hash(height)),
)
@streamable
@dataclass(frozen=True)
class SimStore(Streamable):
timestamp: uint64
block_height: uint32
block_records: List[SimBlockRecord]
blocks: List[SimFullBlock]
class SpendSim:
connection: aiosqlite.Connection
db_wrapper: DBWrapper2
mempool_manager: MempoolManager
block_records: List[SimBlockRecord]
blocks: List[SimFullBlock]
@@ -63,20 +89,49 @@ class SpendSim:
defaults: ConsensusConstants
@classmethod
async def create(cls, defaults=DEFAULT_CONSTANTS):
async def create(cls, db_path=None, defaults=DEFAULT_CONSTANTS):
self = cls()
self.connection = await aiosqlite.connect(":memory:")
coin_store = await CoinStore.create(DBWrapper(self.connection))
if db_path is None:
uri = f"file:db_{random.randint(0, 99999999)}?mode=memory&cache=shared"
else:
uri = f"file:{db_path}"
connection = await aiosqlite.connect(uri, uri=True)
self.db_wrapper = DBWrapper2(connection)
await self.db_wrapper.add_connection(await aiosqlite.connect(uri, uri=True))
coin_store = await CoinStore.create(self.db_wrapper)
self.mempool_manager = MempoolManager(coin_store, defaults)
self.block_records = []
self.blocks = []
self.timestamp = 1
self.block_height = 0
self.defaults = defaults
return self
# Load the next data if there is any
async with self.db_wrapper.write_db() as conn:
await conn.execute("CREATE TABLE IF NOT EXISTS block_data(data blob PRIMARY_KEY)")
cursor = await conn.execute("SELECT * from block_data")
row = await cursor.fetchone()
await cursor.close()
if row is not None:
store_data = SimStore.from_bytes(row[0])
self.timestamp = store_data.timestamp
self.block_height = store_data.block_height
self.block_records = store_data.block_records
self.blocks = store_data.blocks
self.mempool_manager.peak = self.block_records[-1]
else:
self.timestamp = 1
self.block_height = 0
self.block_records = []
self.blocks = []
return self
async def close(self):
await self.connection.close()
async with self.db_wrapper.write_db() as conn:
c = await conn.execute("DELETE FROM block_data")
await c.close()
c = await conn.execute(
"INSERT INTO block_data VALUES(?)",
(bytes(SimStore(self.timestamp, self.block_height, self.block_records, self.blocks)),),
)
await c.close()
await self.db_wrapper.close()
async def new_peak(self):
await self.mempool_manager.new_peak(self.block_records[-1], [])
@@ -92,12 +147,13 @@ class SpendSim:
async def all_non_reward_coins(self) -> List[Coin]:
coins = set()
cursor = await self.mempool_manager.coin_store.coin_record_db.execute(
"SELECT * from coin_record WHERE coinbase=0 AND spent=0 ",
)
rows = await cursor.fetchall()
async with self.mempool_manager.coin_store.db_wrapper.read_db() as conn:
cursor = await conn.execute(
"SELECT * from coin_record WHERE coinbase=0 AND spent=0 ",
)
rows = await cursor.fetchall()
await cursor.close()
await cursor.close()
for row in rows:
coin = Coin(bytes32(bytes.fromhex(row[6])), bytes32(bytes.fromhex(row[5])), uint64.from_bytes(row[7]))
coins.add(coin)
@@ -158,7 +214,7 @@ class SpendSim:
# SimBlockRecord is created
generator: Optional[BlockGenerator] = await self.generate_transaction_generator(generator_bundle)
self.block_records.append(
SimBlockRecord(
SimBlockRecord.create(
[pool_coin, farmer_coin],
next_block_height,
self.timestamp,
@@ -217,6 +273,20 @@ class SimClient:
async def get_coin_record_by_name(self, name: bytes32) -> CoinRecord:
return await self.service.mempool_manager.coin_store.get_coin_record(name)
async def get_coin_records_by_names(
self,
names: List[bytes32],
start_height: Optional[int] = None,
end_height: Optional[int] = None,
include_spent_coins: bool = False,
) -> List[CoinRecord]:
kwargs: Dict[str, Any] = {"include_spent_coins": include_spent_coins, "names": names}
if start_height is not None:
kwargs["start_height"] = start_height
if end_height is not None:
kwargs["end_height"] = end_height
return await self.service.mempool_manager.coin_store.get_coin_records_by_names(**kwargs)
async def get_coin_records_by_parent_ids(
self,
parent_ids: List[bytes32],
+3 -1
View File
@@ -10,6 +10,7 @@ from chia.cmds.keys import keys_cmd
from chia.cmds.netspace import netspace_cmd
from chia.cmds.passphrase import passphrase_cmd
from chia.cmds.plots import plots_cmd
from chia.cmds.rpc import rpc_cmd
from chia.cmds.show import show_cmd
from chia.cmds.start import start_cmd
from chia.cmds.stop import stop_cmd
@@ -123,7 +124,7 @@ def run_daemon_cmd(ctx: click.Context, wait_for_unlock: bool) -> None:
wait_for_unlock = wait_for_unlock and Keychain.is_keyring_locked()
asyncio.get_event_loop().run_until_complete(async_run_daemon(ctx.obj["root_path"], wait_for_unlock=wait_for_unlock))
asyncio.run(async_run_daemon(ctx.obj["root_path"], wait_for_unlock=wait_for_unlock))
cli.add_command(keys_cmd)
@@ -132,6 +133,7 @@ cli.add_command(wallet_cmd)
cli.add_command(plotnft_cmd)
cli.add_command(configure_cmd)
cli.add_command(init_cmd)
cli.add_command(rpc_cmd)
cli.add_command(show_cmd)
cli.add_command(start_cmd)
cli.add_command(stop_cmd)
+4 -6
View File
@@ -1,10 +1,9 @@
from pathlib import Path
from typing import Dict, Optional
from typing import Optional
import click
from chia.util.config import get_config_lock, load_config, save_config, str2bool
from chia.util.default_root import DEFAULT_ROOT_PATH
from chia.util.config import lock_and_load_config, save_config, str2bool
def configure(
@@ -25,8 +24,7 @@ def configure(
seeder_nameserver: str,
enable_data_server: str = "",
):
with get_config_lock(root_path, "config.yaml"):
config: Dict = load_config(DEFAULT_ROOT_PATH, "config.yaml", acquire_lock=False)
with lock_and_load_config(root_path, "config.yaml") as config:
change_made = False
if set_node_introducer:
try:
@@ -76,7 +74,7 @@ def configure(
levels = ["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG", "NOTSET"]
if set_log_level in levels:
config["logging"]["log_level"] = set_log_level
print(f"Logging level updated. Check {DEFAULT_ROOT_PATH}/log/debug.log")
print(f"Logging level updated. Check {root_path}/log/debug.log")
change_made = True
else:
print(f"Logging level not updated. Use one of: {levels}")
+10 -3
View File
@@ -19,8 +19,14 @@ def db_cmd() -> None:
help="don't update config file to point to new database. When specifying a "
"custom output file, the config will not be updated regardless",
)
@click.option(
"--force",
default=False,
is_flag=True,
help="force conversion despite warnings",
)
@click.pass_context
def db_upgrade_cmd(ctx: click.Context, no_update_config: bool, **kwargs) -> None:
def db_upgrade_cmd(ctx: click.Context, no_update_config: bool, force: bool, **kwargs) -> None:
try:
in_db_path = kwargs.get("input")
@@ -29,7 +35,8 @@ def db_upgrade_cmd(ctx: click.Context, no_update_config: bool, **kwargs) -> None
Path(ctx.obj["root_path"]),
None if in_db_path is None else Path(in_db_path),
None if out_db_path is None else Path(out_db_path),
no_update_config,
no_update_config=no_update_config,
force=force,
)
except RuntimeError as e:
print(f"FAILED: {e}")
@@ -46,7 +53,7 @@ def db_upgrade_cmd(ctx: click.Context, no_update_config: bool, **kwargs) -> None
@click.pass_context
def db_validate_cmd(ctx: click.Context, validate_blocks: bool, **kwargs) -> None:
try:
in_db_path = kwargs.get("input")
in_db_path = kwargs.get("db")
db_validate_func(
Path(ctx.obj["root_path"]),
None if in_db_path is None else Path(in_db_path),
+72 -22
View File
@@ -1,9 +1,13 @@
from typing import Dict, Optional
import platform
from pathlib import Path
import shutil
import sys
from time import time
import textwrap
import os
from chia.util.config import load_config, save_config, get_config_lock
from chia.util.config import load_config, lock_and_load_config, save_config
from chia.util.path import mkdir, path_from_root
from chia.util.ints import uint32
from chia.types.blockchain_format.sized_bytes import bytes32
@@ -17,8 +21,10 @@ def db_upgrade_func(
root_path: Path,
in_db_path: Optional[Path] = None,
out_db_path: Optional[Path] = None,
*,
no_update_config: bool = False,
):
force: bool = False,
) -> None:
update_config: bool = in_db_path is None and out_db_path is None and not no_update_config
@@ -40,16 +46,66 @@ def db_upgrade_func(
out_db_path = path_from_root(root_path, db_path_replaced)
mkdir(out_db_path.parent)
convert_v1_to_v2(in_db_path, out_db_path)
total, used, free = shutil.disk_usage(out_db_path.parent)
in_db_size = in_db_path.stat().st_size
if free < in_db_size:
no_free: bool = free < in_db_size * 0.6
strength: str
if no_free:
strength = "probably not enough"
else:
strength = "very little"
print(f"there is {strength} free space on the volume where the output database will be written:")
print(f" {out_db_path}")
print(
f"free space: {free / 1024 / 1024 / 1024:0.2f} GiB expected about "
f"{in_db_size / 1024 / 1024 / 1024:0.2f} GiB"
)
if no_free and not force:
print("to override this check and convert anyway, pass --force")
return
if update_config:
print("updating config.yaml")
with get_config_lock(root_path, "config.yaml"):
config = load_config(root_path, "config.yaml", acquire_lock=False)
new_db_path = db_pattern.replace("_v1_", "_v2_")
config["full_node"]["database_path"] = new_db_path
print(f"database_path: {new_db_path}")
save_config(root_path, "config.yaml", config)
try:
convert_v1_to_v2(in_db_path, out_db_path)
if update_config:
print("updating config.yaml")
with lock_and_load_config(root_path, "config.yaml") as config:
new_db_path = db_pattern.replace("_v1_", "_v2_")
config["full_node"]["database_path"] = new_db_path
print(f"database_path: {new_db_path}")
save_config(root_path, "config.yaml", config)
except RuntimeError as e:
print(f"conversion failed with error: {e}.")
except Exception as e:
print(
textwrap.dedent(
f"""\
conversion failed with error: {e}.
The target v2 database is left in place (possibly in an incomplete state)
{out_db_path}
If the failure was caused by a full disk, ensure the volumes of your
temporary- and target directory have sufficient free space."""
)
)
if platform.system() == "Windows":
temp_dir = None
# this is where GetTempPath() looks
# https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppatha
if "TMP" in os.environ:
temp_dir = os.environ["TMP"]
elif "TEMP" in os.environ:
temp_dir = os.environ["TEMP"]
elif "USERPROFILE" in os.environ:
temp_dir = os.environ["USERPROFILE"]
if temp_dir is not None:
print(f"your temporary directory may be {temp_dir}")
temp_env = "TMP"
else:
temp_env = "SQLITE_TMPDIR"
print(f'you can specify the "{temp_env}" environment variable to control the temporary directory to be used')
print(f"\n\nLEAVING PREVIOUS DB FILE UNTOUCHED {in_db_path}\n")
@@ -67,16 +123,13 @@ def convert_v1_to_v2(in_path: Path, out_path: Path) -> None:
from contextlib import closing
if not in_path.exists():
print(f"input file doesn't exist. {in_path}")
raise RuntimeError(f"can't find {in_path}")
raise RuntimeError(f"input file doesn't exist. {in_path}")
if in_path == out_path:
print(f"output file is the same as the input {in_path}")
raise RuntimeError("invalid conversion files")
raise RuntimeError(f"output file is the same as the input {in_path}")
if out_path.exists():
print(f"output file already exists. {out_path}")
raise RuntimeError("already exists")
raise RuntimeError(f"output file already exists. {out_path}")
print(f"opening file for reading: {in_path}")
with closing(sqlite3.connect(in_path)) as in_db:
@@ -84,8 +137,7 @@ def convert_v1_to_v2(in_path: Path, out_path: Path) -> None:
with closing(in_db.execute("SELECT * from database_version")) as cursor:
row = cursor.fetchone()
if row is not None and row[0] != 1:
print(f"blockchain database already version {row[0]}\nDone")
raise RuntimeError("already v2")
raise RuntimeError(f"blockchain database already version {row[0]}. Won't convert")
except sqlite3.OperationalError:
pass
@@ -120,8 +172,7 @@ def convert_v1_to_v2(in_path: Path, out_path: Path) -> None:
with closing(in_db.execute("SELECT header_hash, height from block_records WHERE is_peak = 1")) as cursor:
peak_row = cursor.fetchone()
if peak_row is None:
print("v1 database does not have a peak block, there is no blockchain to convert")
raise RuntimeError("no blockchain")
raise RuntimeError("v1 database does not have a peak block, there is no blockchain to convert")
peak_hash = bytes32(bytes.fromhex(peak_row[0]))
peak_height = uint32(peak_row[1])
print(f"peak: {peak_hash.hex()} height: {peak_height}")
@@ -161,7 +212,6 @@ def convert_v1_to_v2(in_path: Path, out_path: Path) -> None:
while True:
row_2 = cursor_2.fetchone()
if row_2 is None:
print(f"ERROR: could not find block {hh.hex()}")
raise RuntimeError(f"block {hh.hex()} not found")
if bytes.fromhex(row_2[0]) == hh:
break

Some files were not shown because too many files have changed in this diff Show More