-
Notifications
You must be signed in to change notification settings - Fork 4
84 lines (83 loc) · 2.55 KB
/
pythonpublish-test.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: Test Upload Python Package
on:
release:
types: [prereleased]
jobs:
deploy-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Build linux wheels
run: |
pip install twine
docker run -v $PWD:/io quay.io/pypa/manylinux2014_x86_64 "/io/build_wheels.sh"
- name: Test linux wheel
run: |
pip install dist/finalfusion*36*.whl pytest
pytest
- name: Upload linux wheels
env:
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
run: |
twine upload wheelhouse/*.whl --skip-existing --repository testpypi
twine upload dist/*.tar.gz --repository testpypi --skip-existing
deploy-mac:
runs-on: macOS-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Build mac wheel
run: |
python -m pip install --upgrade pip
pip install setuptools wheel==0.31.1 twine cython
python setup.py bdist_wheel
- name: Test mac wheel
run: |
pip install dist/*.whl pytest
pytest
- name: Test mac wheel system python
if: ${{ matrix.python-version == '3.7' }}
run: |
/usr/bin/python3 -m venv venv
source venv/bin/activate
pip install dist/*.whl pytest
pytest
- name: Publish macos
env:
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
run: |
twine upload dist/*.whl --repository testpypi --skip-existing
deploy-windows:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Build windows wheel
run: |
python -m pip install --upgrade pip
pip install setuptools wheel==0.31.1 twine cython
python setup.py bdist_wheel
- name: Publish windows
env:
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
run: |
twine upload dist\*.whl --repository testpypi --skip-existing