-
Notifications
You must be signed in to change notification settings - Fork 3.3k
57 lines (48 loc) · 1.62 KB
/
ci_pkg-install.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Install pkg
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
on: # Trigger the workflow on push or pull request, but only for the master branch
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
os: [ubuntu-20.04, macOS-10.15 , windows-2019] #
python-version: [3.6, 3.8]
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Prepare env
run: |
pip install check-manifest "twine==1.13.0"
- name: Create package
run: |
check-manifest
# python setup.py check --metadata --strict
python setup.py sdist
- name: Check package
run: |
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.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
- name: Install package
run: |
# pip install virtualenv
# virtualenv vEnv --system-site-packages
# source vEnv/bin/activate
pip install dist/*
cd .. & python -c "import pytorch_lightning as pl ; print(pl.__version__)"
# deactivate
# rm -rf vEnv