2022-11-04 16:51:03 +00:00
|
|
|
name: Install and validate the package
|
|
|
|
description: Install and validate the package
|
2022-06-30 13:02:57 +00:00
|
|
|
|
|
|
|
inputs:
|
|
|
|
pkg-name:
|
2022-11-04 16:51:03 +00:00
|
|
|
description: Package name to import
|
|
|
|
required: true
|
2022-06-30 13:02:57 +00:00
|
|
|
pip-flags:
|
2022-11-04 16:51:03 +00:00
|
|
|
description: Additional pip install flags
|
2022-06-30 13:02:57 +00:00
|
|
|
required: false
|
|
|
|
default: ""
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
2022-11-04 16:51:03 +00:00
|
|
|
- name: Choose package import
|
|
|
|
run: |
|
2022-12-11 23:01:06 +00:00
|
|
|
python -c "print('PKG_IMPORT=' + {'app': 'lightning_app', 'lite': 'lightning_lite', 'pytorch': 'pytorch_lightning', 'lightning': 'lightning', 'notset': 'lightning'}['${{matrix.pkg-name}}'])" >> $GITHUB_ENV
|
2022-07-28 12:09:12 +00:00
|
|
|
shell: bash
|
2022-06-30 13:02:57 +00:00
|
|
|
|
2022-10-27 10:32:49 +00:00
|
|
|
- name: Install package - archive
|
2022-06-30 13:02:57 +00:00
|
|
|
working-directory: ./dist
|
|
|
|
run: |
|
2022-08-01 13:08:43 +00:00
|
|
|
pip install *.tar.gz ${{ inputs.pip-flags }}
|
2022-06-30 13:02:57 +00:00
|
|
|
pip list | grep lightning
|
2022-11-04 16:51:03 +00:00
|
|
|
python -c "import ${{ env.PKG_IMPORT }}; print(${{ env.PKG_IMPORT }}.__version__)"
|
2022-06-30 13:02:57 +00:00
|
|
|
shell: bash
|
|
|
|
|
2022-10-27 10:32:49 +00:00
|
|
|
- name: Install package - wheel
|
2022-06-30 13:02:57 +00:00
|
|
|
working-directory: ./dist
|
|
|
|
run: |
|
|
|
|
pip install *.whl ${{ inputs.pip-flags }}
|
|
|
|
pip list | grep lightning
|
2022-11-04 16:51:03 +00:00
|
|
|
python -c "import ${{ env.PKG_IMPORT }}; print(${{ env.PKG_IMPORT }}.__version__)"
|
2022-06-30 13:02:57 +00:00
|
|
|
shell: bash
|