7
7
workflow_dispatch :
8
8
9
9
jobs :
10
+ build_stubs_windows :
11
+ name : Build FMX Stubs for Windows
12
+ runs-on : ${{ matrix.os }}
13
+ strategy :
14
+ matrix :
15
+ python : ['3.11']
16
+ include :
17
+ - os : [windows-latest]
18
+ arch : ["AMD64"]
19
+
20
+ steps :
21
+ - name : Check out repository
22
+ uses : actions/checkout@v3
23
+
24
+ - name : Build and Install FMX
25
+ run : |
26
+ python -m pip install setuptools --upgrade
27
+ python -m pip install wheel --upgrade
28
+ python setup.py install
29
+
30
+ - name : Install mypy
31
+ run : |
32
+ python -m pip install git+https://github.com/lmbelo/mypy.git
33
+
34
+ - name : Build Stubs
35
+ run : |
36
+ python -m mypy.stubgen -m delphifmx -o .\delphifmx --include-docstrings
37
+ ren .\delphifmx\delphifmx.pyi __init__.pyi
38
+
39
+ - name : Cache Stubs
40
+ id : cache-stubs
41
+ uses : actions/cache@v3
42
+ with :
43
+ path : .\delphifmx\__init__.pyi
44
+ key : ${{ runner.os }}-stubs
45
+
46
+ build_stubs_linux :
47
+ name : Build FMX Stubs for Linux
48
+ runs-on : ${{ matrix.os }}
49
+ strategy :
50
+ matrix :
51
+ python : ['3.11']
52
+ include :
53
+ - os : [ubuntu-latest]
54
+ arch : ["x86_64"]
55
+
56
+ steps :
57
+ - name : Check out repository
58
+ uses : actions/checkout@v3
59
+
60
+ - name : Set up Python ${{ matrix.python }}
61
+ uses : actions/setup-python@v3
62
+ with :
63
+ python-version : ${{ matrix.python }}
64
+
65
+ - name : Build and Install FMX
66
+ run : |
67
+ python -m pip install setuptools --upgrade
68
+ python -m pip install wheel --upgrade
69
+ python setup.py install
70
+
71
+ - name : Install mypy
72
+ run : |
73
+ python -m pip install git+https://github.com/lmbelo/mypy.git
74
+
75
+ - name : Build Stubs
76
+ run : |
77
+ python -m mypy.stubgen -m delphifmx -o ./delphifmx --include-docstrings
78
+ mv ./delphifmx/delphifmx.pyi ./delphifmx/__init__.pyi
79
+
80
+ - name : Cache Stubs
81
+ id : cache-stubs
82
+ uses : actions/cache@v3
83
+ with :
84
+ path : ./delphifmx/__init__.pyi
85
+ key : ${{ runner.os }}-stubs
86
+
87
+ build_stubs_macos :
88
+ name : Build FMX Stubs MacOS
89
+ runs-on : ${{ matrix.os }}
90
+ strategy :
91
+ matrix :
92
+ python : ['3.11']
93
+ include :
94
+ - os : [ubuntu-latest]
95
+ arch : ["x86_64"]
96
+
97
+ steps :
98
+ - name : Check out repository
99
+ uses : actions/checkout@v3
100
+
101
+ - name : Set up Python ${{ matrix.python }}
102
+ uses : actions/setup-python@v3
103
+ with :
104
+ python-version : ${{ matrix.python }}
105
+
106
+ - name : Build and Install FMX
107
+ run : |
108
+ python -m pip install setuptools --upgrade
109
+ python -m pip install wheel --upgrade
110
+ python setup.py install
111
+
112
+ - name : Install mypy
113
+ run : |
114
+ python -m pip install git+https://github.com/lmbelo/mypy.git
115
+
116
+ - name : Build Stubs
117
+ run : |
118
+ python -m mypy.stubgen -m delphifmx -o ./delphifmx --include-docstrings
119
+ mv delphifmx/delphifmx.pyi delphifmx/__init__.pyi
120
+
121
+ - name : Cache Stubs
122
+ id : cache-stubs
123
+ uses : actions/cache@v3
124
+ with :
125
+ path : ./delphifmx/__init__.pyi
126
+ key : Macos-stubs
127
+ enableCrossOsArchive : true
128
+
10
129
# This build makes delphifmx available for Android
11
130
build_universal_wheel :
12
131
name : Build universal wheel
42
161
43
162
build_wheels_win_32 :
44
163
name : Build Windows x86 wheels for Python ${{ matrix.python }}
164
+ needs : [build_stubs_windows]
45
165
runs-on : ${{ matrix.os }}
46
166
strategy :
47
167
matrix :
@@ -54,7 +174,14 @@ jobs:
54
174
uses : actions/checkout@v3
55
175
with :
56
176
fetch-depth : 0
57
-
177
+
178
+ - name : Restore Cached Stubs
179
+ id : cache-stubs
180
+ uses : actions/cache@v3
181
+ with :
182
+ path : .\delphifmx\__init__.pyi
183
+ key : ${{ runner.os }}-stubs
184
+
58
185
- name : Set up Python ${{ matrix.python }}
59
186
uses : actions/setup-python@v3
60
187
with :
75
202
76
203
build_wheels_win_64 :
77
204
name : Build Windows x64 wheels for Python ${{ matrix.python }}
205
+ needs : [build_stubs_windows]
78
206
runs-on : ${{ matrix.os }}
79
207
strategy :
80
208
matrix :
@@ -87,6 +215,13 @@ jobs:
87
215
uses : actions/checkout@v3
88
216
with :
89
217
fetch-depth : 0
218
+
219
+ - name : Restore Cached Stubs
220
+ id : cache-stubs
221
+ uses : actions/cache@v3
222
+ with :
223
+ path : .\delphifmx\__init__.pyi
224
+ key : ${{ runner.os }}-stubs
90
225
91
226
- name : Set up Python ${{ matrix.python }}
92
227
uses : actions/setup-python@v3
@@ -108,6 +243,7 @@ jobs:
108
243
109
244
build_wheels_manylinux :
110
245
name : Build ManyLinux x86_64 wheels for Python ${{ matrix.python }}
246
+ needs : [build_stubs_linux]
111
247
runs-on : ${{ matrix.os }}
112
248
strategy :
113
249
matrix :
@@ -120,6 +256,13 @@ jobs:
120
256
uses : actions/checkout@v3
121
257
with :
122
258
fetch-depth : 0
259
+
260
+ - name : Restore Cached Stubs
261
+ id : cache-stubs
262
+ uses : actions/cache@v3
263
+ with :
264
+ path : ./delphifmx/__init__.pyi
265
+ key : ${{ runner.os }}-stubs
123
266
124
267
- name : Set up Python ${{ matrix.python }}
125
268
uses : actions/setup-python@v3
@@ -140,6 +283,7 @@ jobs:
140
283
141
284
build_wheels_macos :
142
285
name : Build x86_64 macOS wheels for Python ${{ matrix.python }}
286
+ needs : [build_stubs_macos]
143
287
runs-on : ${{ matrix.os }}
144
288
strategy :
145
289
matrix :
@@ -152,6 +296,14 @@ jobs:
152
296
uses : actions/checkout@v3
153
297
with :
154
298
fetch-depth : 0
299
+
300
+ - name : Restore Cached Stubs
301
+ id : cache-stubs
302
+ uses : actions/cache@v3
303
+ with :
304
+ path : ./delphifmx/__init__.pyi
305
+ key : Macos-stubs
306
+ enableCrossOsArchive : true
155
307
156
308
- name : Set up Python ${{ matrix.python }}
157
309
uses : actions/setup-python@v3
@@ -172,6 +324,7 @@ jobs:
172
324
173
325
build_wheels_macos_arm :
174
326
name : Build arm64 macOS wheels for Python ${{ matrix.python }}
327
+ needs : [build_stubs_macos]
175
328
runs-on : ${{ matrix.os }}
176
329
strategy :
177
330
matrix :
@@ -185,6 +338,14 @@ jobs:
185
338
with :
186
339
fetch-depth : 0
187
340
341
+ - name : Restore Cached Stubs
342
+ id : cache-stubs
343
+ uses : actions/cache@v3
344
+ with :
345
+ path : ./delphifmx/__init__.pyi
346
+ key : Macos-stubs
347
+ enableCrossOsArchive : true
348
+
188
349
- name : Set up Python ${{ matrix.python }}
189
350
uses : actions/setup-python@v3
190
351
with :
0 commit comments