-
Notifications
You must be signed in to change notification settings - Fork 30
93 lines (79 loc) · 2.13 KB
/
dist.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
85
86
87
88
89
90
91
92
93
---
name: dist
on:
pull_request:
push:
branches:
- main
tags:
- '*'
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Install build dependencies
run: |
python -m pip install wheel
- uses: robotpy/build-actions/build-sdist@v2021
- uses: robotpy/build-actions/build-wheel@v2021
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
test:
needs: [build]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
backend: [pure, pyntcore]
os: [windows-latest, macos-latest, ubuntu-18.04]
python_version: [3.6, 3.7, 3.8, 3.9]
architecture: [x86, x64]
exclude:
- os: macos-latest
architecture: x86
- os: ubuntu-18.04
architecture: x86
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
architecture: ${{ matrix.architecture }}
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Install pyntcore backend
if: ${{ matrix.backend == 'pyntcore' }}
run: |
python -m pip install pyntcore --find-links https://www.tortall.net/\~robotpy/wheels/2021/linux_x86_64/
- uses: robotpy/build-actions/test-native-wheel@v2021
# continue-on-error: ${{ matrix.backend == 'pyntcore' }}
publish:
runs-on: ubuntu-latest
needs: [check, test]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
steps:
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}