Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix non-development source install #17669

Merged
merged 5 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inputs:
development:
description: "Install development dependencies."
required: false
default: ""
default: "false"
editable:
description: "Install as editable source."
required: false
Expand Down Expand Up @@ -45,15 +45,15 @@ runs:
env:
INSTALL_PYTHON_VERSION: ${{ inputs.python-version }}
run: |
${{ inputs.command-prefix }} sh install.sh ${{ inputs.development && '-d' || '' }} ${{ (inputs.editable != 'true') && '-i' || '' }} ${{ inputs.legacy_keyring && '-l' || '' }} ${{ inputs.automated == 'true' && '-a' || '' }} ${{ (fromJSON(inputs.do-system-installs) != true) && '-s' || '' }}
${{ inputs.command-prefix }} sh install.sh ${{ inputs.development == 'true' && '-d' || '' }} ${{ (inputs.editable != 'true') && '-i' || '' }} ${{ inputs.legacy_keyring && '-l' || '' }} ${{ inputs.automated == 'true' && '-a' || '' }} ${{ (fromJSON(inputs.do-system-installs) != true) && '-s' || '' }}

- 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' || '' }} ${{ (inputs.editable != 'true') && '-i' || '' }}
${{ inputs.command-prefix }} ./Install.ps1 ${{ inputs.development == 'true' && '-d' || '' }} ${{ (inputs.editable != 'true') && '-i' || '' }}

- name: Create constraints file
if: inputs.constraints-file-artifact-name != ''
Expand Down
25 changes: 19 additions & 6 deletions .github/workflows/test-install-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,19 @@ concurrency:
jobs:
test_scripts:
name: Test Install Scripts - ${{ matrix.development.name }}
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os.runs-on }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
os: [macOS-latest, ubuntu-latest]
python:
- major-dot-minor: "3.10"
os:
- runs-on: macos-latest
matrix: macos
- runs-on: ubuntu-latest
matrix: linux
- runs-on: windows-latest
matrix: windows
development:
- name: Non-development
value: false
Expand All @@ -45,11 +52,11 @@ jobs:
- name: Setup Python environment
uses: Chia-Network/actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python.major-dot-minor }}

- uses: ./.github/actions/install
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python.major-dot-minor }}
development: ${{ matrix.development.value }}
do-system-installs: true

Expand All @@ -59,10 +66,16 @@ jobs:
run: |
chia --help
- name: Run install-gui script
- name: Run install-gui script (Linux, macOS)
if: matrix.os.matrix != 'windows'
run: |
sh install-gui.sh
- name: Run install-gui script (Windows)
if: matrix.os.matrix == 'windows'
run: |
./Install-gui.ps1
test_scripts_in_docker:
name: Test Install Scripts ${{ matrix.distribution.name }} ${{ matrix.arch.name }}
runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }}
Expand Down
4 changes: 4 additions & 0 deletions Install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ if ($extras.length -gt 0)
$extras_cli = $extras -join ","
$pip_parameters += ".[$extras_cli]"
}
else
{
$pip_parameters += "."
}

py -$pythonVersion -m venv venv

Expand Down
Loading