Merge commit '51c6590cf53580b1ae5f904e96973e594e8680e3' into checkpoint/long_lived_atari_from_main_51c6590cf53580b1ae5f904e96973e594e8680e3

This commit is contained in:
Amine Khaldi 2022-08-03 17:06:48 +01:00
commit 9c5d2a1a06
No known key found for this signature in database
GPG Key ID: B1C074FFC904E2D9
11 changed files with 98 additions and 68 deletions

36
.github/actions/install/action.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: "Install chia-blockchain"
description: "Run the platform appropriate installer script."
inputs:
python-version:
description: "Value to be set for INSTALL_PYTHON_VERSION."
required: false
default: ""
development:
description: "Install development dependencies."
required: false
default: ""
command-prefix:
description: "Text to place before the command such as `arch -arm64` for non-native macOS runners."
required: false
default: ""
runs:
using: "composite"
steps:
- name: Run install script (macOS, Ubuntu)
if: runner.os == 'macos' || runner.os == 'linux'
shell: bash
env:
INSTALL_PYTHON_VERSION: ${{ inputs.python-version }}
run: |
${{ inputs.command-prefix }} sh install.sh ${{ inputs.development && '-d' || '' }}
- name: Run install script (Windows)
if: runner.os == 'windows'
shell: pwsh
env:
INSTALL_PYTHON_VERSION: ${{ inputs.python-version }}
run: |
${{ inputs.command-prefix }} ./Install.ps1 ${{ inputs.development && '-d' || '' }}

View File

@ -66,13 +66,13 @@ jobs:
ref: ${{ env.BLOCKS_AND_PLOTS_VERSION }}
fetch-depth: 1
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
run: |
sh install.sh -d
- uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
development: true
- uses: chia-network/actions/activate-venv@main
- name: pytest
run: |
. ./activate
./venv/bin/py.test -n 0 --capture no -m benchmark tests
pytest -n 0 --capture no -m benchmark tests

View File

@ -107,11 +107,12 @@ jobs:
tar -xvzf /tmp/bladebit.tar.gz -C $GITHUB_WORKSPACE/bladebit
chmod +x "$GITHUB_WORKSPACE/bladebit/bladebit"
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
run: |
sh install.sh -d
- uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
development: true
- uses: chia-network/actions/activate-venv@main
- name: Build arm64 .deb package
env:
@ -119,7 +120,6 @@ jobs:
run: |
ldd --version
git -C ./chia-blockchain-gui status
. ./activate
cd ./build_scripts
sh build_linux_deb.sh arm64

View File

@ -138,11 +138,12 @@ jobs:
tar -xvzf /tmp/bladebit.tar.gz -C $GITHUB_WORKSPACE/bladebit
chmod +x "$GITHUB_WORKSPACE/bladebit/bladebit"
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
run: |
sh install.sh -d
- uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
development: true
- uses: chia-network/actions/activate-venv@main
- name: Setup Node 16.x
uses: actions/setup-node@v3
@ -159,7 +160,6 @@ jobs:
run: |
ldd --version
git -C ./chia-blockchain-gui status
. ./activate
cd ./build_scripts
sh build_linux_deb.sh amd64

View File

@ -107,11 +107,12 @@ jobs:
tar -xvzf /tmp/bladebit.tar.gz -C $GITHUB_WORKSPACE/bladebit
chmod +x "$GITHUB_WORKSPACE/bladebit/bladebit"
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
run: |
sh install.sh -d
- uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
development: true
- uses: chia-network/actions/activate-venv@main
- name: Build .rpm package
env:
@ -119,7 +120,6 @@ jobs:
run: |
ldd --version
git -C ./chia-blockchain-gui status
. ./activate
cd ./build_scripts
bash build_linux_rpm.sh amd64

View File

@ -126,11 +126,12 @@ jobs:
chmod +x "$GITHUB_WORKSPACE/madmax/chia_plot"
chmod +x "$GITHUB_WORKSPACE/madmax/chia_plot_k34"
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
run: |
sh install.sh -d
- uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
development: true
- uses: chia-network/actions/activate-venv@main
- name: Setup Node 16.x
uses: actions/setup-node@v3
@ -145,7 +146,6 @@ jobs:
APPLE_NOTARIZE_PASSWORD: "${{ secrets.APPLE_NOTARIZE_PASSWORD }}"
run: |
git -C ./chia-blockchain-gui status
. ./activate
cd ./build_scripts
sh build_macos.sh

View File

@ -100,11 +100,13 @@ jobs:
chmod +x "$GITHUB_WORKSPACE/madmax/chia_plot"
chmod +x "$GITHUB_WORKSPACE/madmax/chia_plot_k34"
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
run: |
arch -arm64 sh install.sh -d
- uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
development: true
command-prefix: "arch -arm64"
- uses: chia-network/actions/activate-venv@main
- name: Install node 16.x
run: |
@ -119,7 +121,6 @@ jobs:
run: |
export PATH=$(brew --prefix node@16)/bin:$PATH
git -C ./chia-blockchain-gui status
. ./activate
cd ./build_scripts
arch -arm64 sh build_macos_m1.sh

View File

@ -19,8 +19,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Run install script
run: |
sh install.sh -d
- uses: ./.github/actions/install
with:
development: true
- uses: pre-commit/action@v2.0.3

View File

@ -39,14 +39,15 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
run: sh install.sh
- uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
development: true
- uses: chia-network/actions/activate-venv@main
- name: Run install-gui script
run: |
. ./activate
sh install-gui.sh
test_scripts_in_docker:
@ -239,12 +240,13 @@ jobs:
with:
fetch-depth: 0
- name: Run install script
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
run: sh install.sh -a
- uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
development: true
- uses: chia-network/actions/activate-venv@main
- name: Run chia --help
run: |
. ./activate
chia --help

View File

@ -174,24 +174,12 @@ jobs:
run: |
brew install boost
- name: Run install script (macOS, Ubuntu)
if: matrix.os.matrix == 'macos' || matrix.os.matrix == 'ubuntu'
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python.install_sh }}
run: |
sh install.sh -d
echo "$(cd venv/bin/; pwd)" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$(cd venv/; pwd)" >> $GITHUB_ENV
- uses: ./.github/actions/install
with:
python-version: ${{ matrix.python.install_sh }}
development: true
- name: Run install script (Windows)
if: matrix.os.matrix == 'windows'
env:
INSTALL_PYTHON_VERSION: ${{ matrix.python.install_sh }}
run: |
./Install.ps1 -d
(Resolve-Path venv/Scripts/).Path >> $Env:GITHUB_PATH
$env_path = (Resolve-Path venv/).Path
Write-Output "VIRTUAL_ENV=$env_path" >> $Env:GITHUB_ENV
- uses: chia-network/actions/activate-venv@main
- name: Install timelord
if: matrix.configuration.install_timelord

View File

@ -44,7 +44,7 @@ if ($null -eq (Get-Command py -ErrorAction SilentlyContinue))
}
$supportedPythonVersions = "3.10", "3.9", "3.8", "3.7"
if (Test-Path env:INSTALL_PYTHON_VERSION)
if ("$env:INSTALL_PYTHON_VERSION" -ne "")
{
$pythonVersion = $env:INSTALL_PYTHON_VERSION
}