2020-06-27 20:25:33 +00:00
|
|
|
name: Install pkg
|
|
|
|
|
|
|
|
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
|
2020-09-10 22:38:29 +00:00
|
|
|
on: # Trigger the workflow on push or pull request, but only for the master branch
|
2020-06-27 20:25:33 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
pkg-install:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
# max-parallel: 6
|
|
|
|
matrix:
|
|
|
|
# PyTorch 1.5 is failing on Win and bolts requires torchvision>=0.5
|
2020-08-07 07:08:23 +00:00
|
|
|
os: [ubuntu-20.04, macOS-10.15 , windows-2019] #
|
|
|
|
python-version: [3.6, 3.8]
|
2020-06-27 20:25:33 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
2020-08-07 07:08:23 +00:00
|
|
|
python-version: ${{ matrix.python-version }}
|
2020-06-27 20:25:33 +00:00
|
|
|
|
|
|
|
- name: Create package
|
|
|
|
run: |
|
|
|
|
# python setup.py check --metadata --strict
|
|
|
|
python setup.py sdist
|
|
|
|
|
2020-08-07 07:08:23 +00:00
|
|
|
- name: Check package
|
|
|
|
run: |
|
|
|
|
pip install twine==1.13.0
|
|
|
|
twine check dist/*
|
|
|
|
python setup.py clean
|
|
|
|
|
|
|
|
- name: Setup Windows
|
|
|
|
if: runner.os == 'windows'
|
|
|
|
run: |
|
|
|
|
# this is just a hotfix because of Win cannot install it directly
|
|
|
|
pip install -r requirements/base.txt --find-links https://download.pytorch.org/whl/torch_stable.html
|
|
|
|
|
2020-06-27 20:25:33 +00:00
|
|
|
- name: Install package
|
|
|
|
run: |
|
2020-08-07 07:08:23 +00:00
|
|
|
# pip install virtualenv
|
|
|
|
# virtualenv vEnv --system-site-packages
|
|
|
|
# source vEnv/bin/activate
|
2020-06-27 20:25:33 +00:00
|
|
|
pip install dist/*
|
|
|
|
cd .. & python -c "import pytorch_lightning as pl ; print(pl.__version__)"
|
2020-08-07 07:08:23 +00:00
|
|
|
# deactivate
|
|
|
|
# rm -rf vEnv
|