-
Notifications
You must be signed in to change notification settings - Fork 5
84 lines (75 loc) · 2.35 KB
/
install-pkg.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Install Package
# 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-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Create package
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel
python setup.py sdist bdist_wheel
- name: Check package
run: |
pip install twine==1.13.0
twine check dist/*
python setup.py clean
pkg-install:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 6
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Create and Install package on Ubuntu
if: runner.os == 'Linux'
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel
python setup.py bdist_wheel
pip install virtualenv
virtualenv vEnv ; source vEnv/bin/activate
pip install dist/*
cd .. & python
deactivate ; rm -rf vEnv
- name: Install package on Mac
if: runner.os == 'macOS'
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel
python setup.py bdist_wheel
pip install virtualenv
virtualenv vEnv ; source vEnv/bin/activate
pip install dist/*
cd .. & python
deactivate ; rm -rf vEnv
- name: Install package on Windows
if: runner.os == 'windows'
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel
python setup.py bdist_wheel
pip install virtualenv
virtualenv vEnv ; venv\Scripts\activate.bat
cd .. & python
venv\Scripts\deactivate.bat ; rm -r vEnv
# pip install dist/* Isn't working on windows, need a workaround.