Compare commits
19 Commits
main
...
explore_te
Author | SHA1 | Date |
---|---|---|
Kyle Altendorf | f1e4670a6a | |
Kyle Altendorf | 4c748a0e4d | |
Kyle Altendorf | 659c7f8609 | |
Kyle Altendorf | 497fbd4e20 | |
Kyle Altendorf | 69037310a1 | |
Kyle Altendorf | e99c696d43 | |
Kyle Altendorf | 3127898f46 | |
Kyle Altendorf | 7196e92200 | |
Kyle Altendorf | e6f79fca10 | |
Kyle Altendorf | a0f4579692 | |
Kyle Altendorf | 3fa9b9f2d1 | |
Kyle Altendorf | f2130db777 | |
Kyle Altendorf | ed21e93a2a | |
Kyle Altendorf | 58947e19a0 | |
Kyle Altendorf | 4d72c4f575 | |
Kyle Altendorf | 4bf4e6f3b2 | |
Kyle Altendorf | 152e9a1a6b | |
Kyle Altendorf | f1e1a4f236 | |
Kyle Altendorf | 3d2d3f550d |
|
@ -9,6 +9,11 @@ omit=
|
|||
concurrency=multiprocessing, thread
|
||||
parallel=True
|
||||
|
||||
[paths]
|
||||
source =
|
||||
chia/
|
||||
venv/**/site-packages/chia/
|
||||
|
||||
[report]
|
||||
precision = 1
|
||||
exclude_lines =
|
||||
|
|
|
@ -11,6 +11,10 @@ inputs:
|
|||
description: "Install development dependencies."
|
||||
required: false
|
||||
default: ""
|
||||
editable:
|
||||
description: "Install as editable source."
|
||||
required: false
|
||||
default: "true"
|
||||
legacy_keyring:
|
||||
description: "Install legacy keyring dependencies."
|
||||
required: false
|
||||
|
@ -33,7 +37,7 @@ runs:
|
|||
env:
|
||||
INSTALL_PYTHON_VERSION: ${{ inputs.python-version }}
|
||||
run: |
|
||||
${{ inputs.command-prefix }} sh install.sh ${{ inputs.development && '-d' || '' }} ${{ inputs.legacy_keyring && '-l' || '' }} ${{ inputs.automated == 'true' && '-a' || '' }}
|
||||
${{ inputs.command-prefix }} sh install.sh ${{ inputs.development && '-d' || '' }} ${{ (inputs.editable != 'true') && '-i' || '' }} ${{ inputs.legacy_keyring && '-l' || '' }} ${{ inputs.automated == 'true' && '-a' || '' }}
|
||||
|
||||
- name: Run install script (Windows)
|
||||
if: runner.os == 'windows'
|
||||
|
@ -41,4 +45,4 @@ runs:
|
|||
env:
|
||||
INSTALL_PYTHON_VERSION: ${{ inputs.python-version }}
|
||||
run: |
|
||||
${{ inputs.command-prefix }} ./Install.ps1 ${{ inputs.development && '-d' || '' }}
|
||||
${{ inputs.command-prefix }} ./Install.ps1 ${{ inputs.development && '-d' || '' }} ${{ (inputs.editable != 'true') && '-i' || '' }}
|
||||
|
|
|
@ -39,6 +39,10 @@ concurrency:
|
|||
group: ${{ github.ref }}-${{ github.workflow }}-${{ inputs.concurrency_name }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
|
||||
cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: ${{ matrix.os.emoji }} ${{ matrix.configuration.name }} - ${{ matrix.python.name }}
|
||||
|
@ -192,24 +196,14 @@ jobs:
|
|||
${{ github.workspace }}/.chia/test-plots
|
||||
key: ${{ env.BLOCKS_AND_PLOTS_VERSION }}
|
||||
|
||||
- name: Checkout test blocks and plots (macOS, Ubuntu)
|
||||
if: steps.test-blocks-plots.outputs.cache-hit != 'true' && (matrix.os.matrix == 'ubuntu' || matrix.os.matrix == 'macos')
|
||||
- name: Checkout test blocks and plots
|
||||
if: steps.test-blocks-plots.outputs.cache-hit != 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release download -R Chia-Network/test-cache 0.29.0 --archive=tar.gz -O - | tar xzf -
|
||||
mkdir ${{ github.workspace }}/.chia
|
||||
mv ${{ github.workspace }}/test-cache-${{ env.BLOCKS_AND_PLOTS_VERSION }}/* ${{ github.workspace }}/.chia
|
||||
|
||||
- name: Checkout test blocks and plots (Windows)
|
||||
if: steps.test-blocks-plots.outputs.cache-hit != 'true' && matrix.os.matrix == 'windows'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release download -R Chia-Network/test-cache ${{ env.BLOCKS_AND_PLOTS_VERSION }} --archive=zip -O blocks_and_plots.zip
|
||||
Expand-Archive blocks_and_plots.zip -DestinationPath .
|
||||
mkdir ${{ github.workspace }}/.chia
|
||||
mv ${{ github.workspace }}/test-cache-${{ env.BLOCKS_AND_PLOTS_VERSION }}/* ${{ github.workspace }}/.chia
|
||||
mkdir "${GITHUB_WORKSPACE}/.chia"
|
||||
mv "${GITHUB_WORKSPACE}/test-cache-${{ env.BLOCKS_AND_PLOTS_VERSION }}/"* "${GITHUB_WORKSPACE}/.chia"
|
||||
|
||||
- name: Install boost (macOS)
|
||||
if: matrix.os.matrix == 'macos'
|
||||
|
@ -220,6 +214,7 @@ jobs:
|
|||
with:
|
||||
python-version: ${{ matrix.python.install_sh }}
|
||||
development: true
|
||||
editable: false
|
||||
legacy_keyring: ${{ matrix.configuration.legacy_keyring_required }}
|
||||
|
||||
- uses: chia-network/actions/activate-venv@main
|
||||
|
@ -230,12 +225,20 @@ jobs:
|
|||
sh install-timelord.sh -n
|
||||
./vdf_bench square_asm 400000
|
||||
|
||||
- name: Move chia/ so we test the installed code
|
||||
run: |
|
||||
mv chia/ notchia/
|
||||
|
||||
- name: Test blockchain code with pytest
|
||||
env:
|
||||
ENABLE_PYTEST_MONITOR: ${{ matrix.os.matrix == 'ubuntu' && matrix.configuration.enable_pytest_monitor || '' }}
|
||||
run: |
|
||||
pytest --cov=chia --cov=tests --cov-config=.coveragerc --cov-report= --durations=10 ${{ matrix.configuration.pytest_parallel_args[matrix.os.matrix] }} -m "not benchmark" ${{ env.ENABLE_PYTEST_MONITOR }} ${{ matrix.configuration.test_files }}
|
||||
|
||||
- name: Move back to chia/ for coverage
|
||||
run: |
|
||||
mv notchia/ chia/
|
||||
|
||||
- name: Process coverage data
|
||||
run: |
|
||||
coverage xml --rcfile=.coveragerc -o coverage.xml
|
||||
|
|
10
Install.ps1
10
Install.ps1
|
@ -2,6 +2,8 @@ param(
|
|||
[Parameter(HelpMessage="install development dependencies")]
|
||||
[switch]$d = $False,
|
||||
[Parameter()]
|
||||
[switch]$i = $False,
|
||||
[Parameter()]
|
||||
[switch]$p = $False
|
||||
)
|
||||
|
||||
|
@ -13,6 +15,12 @@ if ($d)
|
|||
$extras += "dev"
|
||||
}
|
||||
|
||||
$editable_cli = "--editable"
|
||||
if ($i)
|
||||
{
|
||||
$editable_cli = ""
|
||||
}
|
||||
|
||||
if ([Environment]::Is64BitOperatingSystem -eq $false)
|
||||
{
|
||||
Write-Output "Chia requires a 64-bit Windows installation"
|
||||
|
@ -106,7 +114,7 @@ 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 ".$extras_cli" --extra-index-url https://pypi.chia.net/simple/
|
||||
venv\scripts\pip install $editable_cli ".$extras_cli" --extra-index-url https://pypi.chia.net/simple/
|
||||
|
||||
if ($p)
|
||||
{
|
||||
|
|
18
install.sh
18
install.sh
|
@ -3,13 +3,14 @@
|
|||
set -o errexit
|
||||
|
||||
USAGE_TEXT="\
|
||||
Usage: $0 [-adlsph]
|
||||
Usage: $0 [-adilpsh]
|
||||
|
||||
-a automated install, no questions
|
||||
-d install development dependencies
|
||||
-i install non-editable
|
||||
-l install legacy keyring dependencies (linux only)
|
||||
-s skip python package installation and just do pip install
|
||||
-p additional plotters installation
|
||||
-s skip python package installation and just do pip install
|
||||
-h display this help and exit
|
||||
"
|
||||
|
||||
|
@ -21,19 +22,22 @@ PACMAN_AUTOMATED=
|
|||
EXTRAS=
|
||||
SKIP_PACKAGE_INSTALL=
|
||||
PLOTTER_INSTALL=
|
||||
EDITABLE='-e'
|
||||
|
||||
while getopts adlsph flag
|
||||
while getopts adilpsh flag
|
||||
do
|
||||
case "${flag}" in
|
||||
# automated
|
||||
a) PACMAN_AUTOMATED=--noconfirm;;
|
||||
# development
|
||||
d) EXTRAS=${EXTRAS}dev,;;
|
||||
# simple install
|
||||
s) SKIP_PACKAGE_INSTALL=1;;
|
||||
p) PLOTTER_INSTALL=1;;
|
||||
# non-editable
|
||||
i) EDITABLE='';;
|
||||
# legacy keyring
|
||||
l) EXTRAS=${EXTRAS}legacy_keyring,;;
|
||||
p) PLOTTER_INSTALL=1;;
|
||||
# simple install
|
||||
s) SKIP_PACKAGE_INSTALL=1;;
|
||||
h) usage; exit 0;;
|
||||
*) echo; usage; exit 1;;
|
||||
esac
|
||||
|
@ -342,7 +346,7 @@ python -m pip install wheel
|
|||
#if [ "$INSTALL_PYTHON_VERSION" = "3.8" ]; then
|
||||
# This remains in case there is a diversion of binary wheels
|
||||
python -m pip install --extra-index-url https://pypi.chia.net/simple/ miniupnpc==2.2.2
|
||||
python -m pip install -e ."${EXTRAS}" --extra-index-url https://pypi.chia.net/simple/
|
||||
python -m pip install ${EDITABLE} ."${EXTRAS}" --extra-index-url https://pypi.chia.net/simple/
|
||||
|
||||
if [ -n "$PLOTTER_INSTALL" ]; then
|
||||
set +e
|
||||
|
|
Loading…
Reference in New Issue