-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (126 loc) · 4.19 KB
/
ci.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
release:
types: published
jobs:
tar_gz:
name: Package
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@master
with:
python-version: 3.12
- run: pip install -r requirements-build-3_12.txt
- run: python setup.py sdist
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
whl_3_8:
name: Build / ${{ matrix.os }} / Python 3.${{ matrix.minor }}
strategy:
fail-fast: false
matrix:
os: [macos-13, ubuntu-22.04, windows-2022]
minor: [8]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@master
- run: echo '::add-matcher::.github/problem-matchers/gcc.json'
if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-22.04'
- run: echo '::add-matcher::.github/problem-matchers/msvc.json'
if: matrix.os == 'windows-2022'
- uses: pypa/[email protected]
with:
output-dir: dist
env:
CIBW_BUILD: cp3${{ matrix.minor }}-*
CIBW_ARCHS_WINDOWS: x86 AMD64
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-3_08.txt
CIBW_BEFORE_TEST: pip install -r {project}/requirements-dev-3_08.txt
CIBW_TEST_COMMAND: pytest {project}
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
whl_gte_3_9_to_3_11:
name: Build / ${{ matrix.os }} / Python 3.${{ matrix.minor }}
strategy:
fail-fast: false
matrix:
os: [macos-13, ubuntu-22.04, windows-2022]
minor: [9, 10, 11]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@master
- run: echo '::add-matcher::.github/problem-matchers/gcc.json'
if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-22.04'
- run: echo '::add-matcher::.github/problem-matchers/msvc.json'
if: matrix.os == 'windows-2022'
- uses: pypa/[email protected]
with:
output-dir: dist
env:
CIBW_BUILD: cp3${{ matrix.minor }}-*
CIBW_ARCHS_WINDOWS: x86 AMD64
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-3_11.txt
CIBW_BEFORE_TEST: pip install -r {project}/requirements-dev-3_11.txt
CIBW_TEST_COMMAND: pytest {project}
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
whl_3_12:
name: Build / ${{ matrix.os }} / Python 3.${{ matrix.minor }}
strategy:
fail-fast: false
matrix:
os: [macos-13, ubuntu-22.04, windows-2022]
minor: [12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@master
- run: echo '::add-matcher::.github/problem-matchers/gcc.json'
if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-22.04'
- run: echo '::add-matcher::.github/problem-matchers/msvc.json'
if: matrix.os == 'windows-2022'
- uses: pypa/[email protected]
with:
output-dir: dist
env:
CIBW_BUILD: cp3${{ matrix.minor }}-*
CIBW_ARCHS_WINDOWS: x86 AMD64
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-3_12.txt
CIBW_BEFORE_TEST: pip install -r {project}/requirements-dev-3_12.txt
CIBW_TEST_COMMAND: pytest {project}
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
upload:
name: Publish
if: github.event_name == 'release' && github.event.action == 'published'
needs: [tar_gz, whl_3_8, whl_gte_3_9_to_3_11, whl_3_12]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
skip_existing: true