forked from Lightning-AI/pytorch-lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
42 lines (38 loc) · 1.42 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Install and validate the package
description: Install and validate the package
inputs:
pkg-folder:
description: Define folder with packages
required: true
pkg-name:
description: Package name to import
required: true
pip-flags:
description: Additional pip install flags
required: false
default: ""
runs:
using: "composite"
steps:
- name: Choose package import
working-directory: ${{ inputs.pkg-folder }}
run: |
ls -l
python -c "print('PKG_IMPORT=' + {'app': 'lightning_app', 'lite': 'lightning_lite', 'pytorch': 'pytorch_lightning'}.get('${{matrix.pkg-name}}', 'lightning'))" >> $GITHUB_ENV
python -c "import glob ; ls = glob.glob('*.tar.gz') ; print('PKG_SOURCE=' + ls[0])" >> $GITHUB_ENV
python -c "import glob ; ls = glob.glob('*.whl') ; print('PKG_WHEEL=' + ls[0])" >> $GITHUB_ENV
shell: bash
- name: Install package - wheel
working-directory: ${{ inputs.pkg-folder }}
run: |
pip install ${PKG_WHEEL} ${{ inputs.pip-flags }}
pip list | grep lightning
python -c "import ${{ env.PKG_IMPORT }}; print(${{ env.PKG_IMPORT }}.__version__)"
shell: bash
- name: Install package - archive
working-directory: ${{ inputs.pkg-folder }}
run: |
pip install ${PKG_SOURCE} ${{ inputs.pip-flags }}
pip list | grep lightning
python -c "import ${{ env.PKG_IMPORT }}; print(${{ env.PKG_IMPORT }}.__version__)"
shell: bash