Skip to content

Commit

Permalink
fix non-development source install (#17669)
Browse files Browse the repository at this point in the history
* fix non-development source install

* test

* ./

* fix the install action?

* ' not "
  • Loading branch information
altendky authored Mar 7, 2024
1 parent 26d5a25 commit d412b87
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
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

0 comments on commit d412b87

Please sign in to comment.