-
Notifications
You must be signed in to change notification settings - Fork 11
80 lines (65 loc) · 1.67 KB
/
build.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
name: build and install
on:
push:
pull_request:
jobs:
build:
name: build and install from source
runs-on: ubuntu-latest
env:
USE_DIST: '.'
steps:
- name: checkout code
uses: actions/checkout@v2
- name: set up python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: build
run: |
python -m pip install --upgrade pip wheel
python setup.py sdist
python setup.py bdist_wheel
- name: cache artifacts
uses: actions/upload-artifact@v2
with:
name: dist-artifacts
path: dist
- name: install from source
run: pip install --progress-bar=off $USE_DIST
install_wheel:
name: install from wheel
needs: build
runs-on: ubuntu-latest
env:
USE_DIST: 'dist/*.whl'
steps:
- name: set up python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: fetch artifacts
uses: actions/[email protected]
with:
name: dist-artifacts
path: dist
- name: install from wheel
run: pip install --progress-bar=off $USE_DIST
install_sdist:
name: install from sdist
needs: build
runs-on: ubuntu-latest
env:
USE_DIST: 'dist/*.tar.gz'
steps:
- name: set up python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: fetch artifacts
uses: actions/[email protected]
with:
name: dist-artifacts
path: dist
- name: install from wheel
run: pip install --progress-bar=off $USE_DIST