-
Notifications
You must be signed in to change notification settings - Fork 0
420 lines (391 loc) · 15.6 KB
/
pr.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
name: PullRequest
on:
pull_request:
jobs:
# 各テストのジョブは以下の表に従って作成しています。
# matrixを使って全て行うと大変なので、要所を搾って実施します。
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 1. Windows x86 dmd o x x x x
# 2. Windows x86 ldc x o O x x
# 3. Windows x86 dmd-master x x x x x
# 4. Windows x86 ldc-master x x x x x
# 5. Windows x86_64 dmd o o x x o
# 6. Windows x86_64 ldc o x O o x
# 7. Windows x86_64 dmd-master x x x x x
# 8. Windows x86_64 ldc-master o o o x x
# 9. Ubuntu x86 dmd x x x x x
# 10. Ubuntu x86 ldc o x o x x
# 11. Ubuntu x86 dmd-master x x x x x
# 12. Ubuntu x86 ldc-master x x x x x
# 13. Ubuntu x86_64 dmd o x o O x
# 14. Ubuntu x86_64 ldc o o O x o
# 15. Ubuntu x86_64 dmd-master o o o x x
# 16. Ubuntu x86_64 ldc-master x x x x x
# 17. macOS x86 dmd x x x x x
# 18. macOS x86 ldc x x x x x
# 19. macOS x86 dmd-master x x x x x
# 20. macOS x86 ldc-master x x x x x
# 21. macOS x86_64 dmd o o x x o
# 22. macOS x86_64 ldc o x O o x
# 23. macOS x86_64 dmd-master x x x x x
# 24. macOS x86_64 ldc-master x x x x x
# 各テストジョブは以下のテンプレを加工して作成します。
# 例は test-linux-x86_64-ldc-latest を参照してください。
# また upload-codecov はテストジョブが全てパスしてから
# 実行されるようにするため、テストジョブを追加する場合は
# upload-codecov の needs も忘れず追加してください。
# テンプレ:
#test-${OS}-${ARCH}-${COMPILER}:
# name: test-${OS}-${ARCH}-${COMPILER}
# runs-on: ${OS}
# steps:
# - uses: actions/checkout@v2
# - name: Install D compiler
# uses: dlang-community/setup-dlang@v1
# with:
# compiler: ${COMPILER}
# # UT:テストをする場合は以下を実行
# - name: Run unit tests
# run: rdmd ./scripts/runner.d -a=${ARCH} --mode=unit-test
# # TT:テストをする場合は以下を実行
# - name: Run unit tests
# run: rdmd ./scripts/runner.d -a=${ARCH} --mode=integration-test
# # BLD:ビルドをする場合は以下を実行
# - name: Build tests
# run: dub build -a=${ARCH} -b=release -c=default
# # BLD:ビルド結果をアーカイブする場合は以下を実行
# - name: Archive tests
# id: create_archive
# run: rdmd ./scripts/runner.d -a=${ARCH} --mode=create-archive
# # DOC:ドキュメント生成をする場合は以下を実行
# - name: Generate document tests
# run: rdmd ./scripts/runner.d -a=${ARCH} --mode=generate-document
# # BLD:ビルド結果のアーカイブを記録する場合は以下を実行
# - name: Upload generated archive
# uses: actions/upload-artifact@v1
# with:
# name: ${OS}-${ARCH}-bainary
# path: ${{ steps.create_archive.outputs.ARCNAME }}
# # DOC:ドキュメントを記録する場合は以下を実行(Artifactに6か月保管されます)
# - name: Upload generated pages
# uses: actions/upload-artifact@v1
# with:
# name: docs
# path: docs
# # COV:カバレッジを記録する場合は以下を実行(Artifactに6か月保管されます)
# - name: Upload coverage result
# uses: actions/upload-artifact@v1
# with:
# name: coverage-${OS}
# path: .cov
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 1. Windows x86 dmd o x x x x
test-windows-x86-dmd-latest:
name: test-windows-x86-dmd-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: dmd-latest
- name: Run unit tests
run: rdmd ./scripts/runner.d -a=x86 --mode=unit-test
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 2. Windows x86 ldc x o O x x
test-windows-x86-ldc-latest:
name: test-windows-x86-ldc-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Run integration tests
run: rdmd ./scripts/runner.d -a=x86 --mode=integration-test
- name: Build tests
run: dub build -a=x86 -b=release -c=default
- name: Archive tests
id: create_archive
run: rdmd ./scripts/runner.d -a=x86 --mode=create-archive
- name: Upload generated archive
uses: actions/upload-artifact@v1
with:
name: windows-x86-binary
path: ${{ steps.create_archive.outputs.ARCNAME }}
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 3. Windows x86 dmd-master x x x x x
# do-nothing
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 4. Windows x86 ldc-master x x x x x
# do-nothing
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 5. Windows x86_64 dmd o o x x o
test-windows-x86_64-dmd-latest:
name: test-windows-x86_64-dmd-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: dmd-latest
- name: Run unit tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=unit-test
- name: Run integration tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=integration-test
- name: Upload coverage result
uses: actions/upload-artifact@v1
with:
name: coverage-windows
path: .cov
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 6. Windows x86_64 ldc o x O o x
test-windows-x86_64-ldc-latest:
name: test-windows-x86_64-ldc-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Run unit tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=unit-test
- name: Build tests
run: dub build -a=x86_64 -b=release -c=default
- name: Archive tests
id: create_archive
run: rdmd ./scripts/runner.d -a=x86_64 --mode=create-archive
- name: Generate document tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=generate-document
- name: Upload generated archive
uses: actions/upload-artifact@v1
with:
name: windows-x86_64-binary
path: ${{ steps.create_archive.outputs.ARCNAME }}
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 7. Windows x86_64 dmd-master x x x x x
# do-nothing
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 8. Windows x86_64 ldc-master o o o x x
test-windows-x86_64-ldc-master:
name: test-windows-x86_64-ldc-master
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-master
gh_token: ${{ secrets.GITHUB_TOKEN }}
- name: Run unit tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=unit-test
- name: Run integration tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=integration-test
- name: Build tests
run: dub build -a=x86_64 -b=release -c=default
- name: Archive tests
id: create_archive
run: rdmd ./scripts/runner.d -a=x86_64 --mode=create-archive
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 9. Ubuntu x86 dmd x x x x x
# do-nothing
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 10. Ubuntu x86 ldc o x o x x
test-linux-x86-ldc-latest:
name: test-linux-x86-ldc-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Install gcc-multilib
run: |
sudo apt update
sudo apt install gcc-multilib
- name: Run unit tests
run: rdmd ./scripts/runner.d -a=x86 --mode=unit-test
- name: Build tests
run: dub build -a=x86 -b=release -c=default
- name: Archive tests
id: create_archive
run: rdmd ./scripts/runner.d -a=x86 --mode=create-archive
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 11. Ubuntu x86 dmd-master x x x x x
# do-nothing
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 12. Ubuntu x86 ldc-master x x x x x
# do-nothing
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 13. Ubuntu x86_64 dmd o x o O x
test-linux-x86_64-dmd-latest:
name: test-linux-x86_64-dmd-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: dmd-latest
- name: Run unit tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=unit-test
- name: Build tests
run: dub build -a=x86_64 -b=release -c=default
- name: Archive tests
id: create_archive
run: rdmd ./scripts/runner.d -a=x86 --mode=create-archive
- name: Generate document tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=generate-document
- name: Upload generated pages
uses: actions/upload-artifact@v1
with:
name: docs
path: docs
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 14. Ubuntu x86_64 ldc o o O x o
test-linux-x86_64-ldc-latest:
name: test-linux-x86_64-ldc-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Run unit tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=unit-test
- name: Run integration tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=integration-test
- name: Build tests
run: dub build -a=x86_64 -b=release -c=default
- name: Archive tests
id: create_archive
run: rdmd ./scripts/runner.d -a=x86_64 --mode=create-archive
- name: Upload coverage result
uses: actions/upload-artifact@v1
with:
name: coverage-linux
path: .cov
- name: Upload generated archive
uses: actions/upload-artifact@v1
with:
name: linux-x86_64-binary
path: ${{ steps.create_archive.outputs.ARCNAME }}
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 15. Ubuntu x86_64 dmd-master o o o x x
test-linux-x86_64-dmd-master:
name: test-linux-x86_64-dmd-master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: dmd-master
- name: Run unit tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=unit-test
- name: Run integration tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=integration-test
- name: Build tests
run: dub build -a=x86_64 -b=release -c=default
- name: Archive tests
id: create_archive
run: rdmd ./scripts/runner.d -a=x86_64 --mode=create-archive
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 16. Ubuntu x86_64 ldc-master x x x x x
# do-nothing
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 17. macOS x86 dmd x x x x x
# do-nothing
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 18. macOS x86 ldc x x x x x
# do-nothing
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 19. macOS x86 dmd-master x x x x x
# do-nothing
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 20. macOS x86 ldc-master x x x x x
# do-nothing
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 21. macOS x86_64 dmd o o x x o
test-osx-x86_64-dmd-latest:
name: test-osx-x86_64-dmd-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: dmd-latest
- name: Run unit tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=unit-test
- name: Run integration tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=integration-test
- name: Upload coverage result
uses: actions/upload-artifact@v1
with:
name: coverage-osx
path: .cov
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 22. macOS x86_64 ldc o x O o x
test-osx-x86_64-ldc-latest:
name: test-osx-x86_64-ldc-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Run unit tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=unit-test
- name: Build tests
run: dub build -a=x86_64 -b=release -c=default
- name: Archive tests
id: create_archive
run: rdmd ./scripts/runner.d -a=x86_64 --mode=create-archive
- name: Generate document tests
run: rdmd ./scripts/runner.d -a=x86_64 --mode=generate-document
- name: Upload generated archive
uses: actions/upload-artifact@v1
with:
name: osx-x86_64-bainary
path: ${{ steps.create_archive.outputs.ARCNAME }}
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 23. macOS x86_64 dmd-master x x x x x
# do-nothing
# No. OS ARCH COMPILER UT TT BLD DOC COV
# 24. macOS x86_64 ldc-master x x x x x
# do-nothing
# Upload coverage to Codecov
upload-codecov:
name: upload-codecov
needs: [test-windows-x86-dmd-latest, test-windows-x86-ldc-latest, test-windows-x86_64-dmd-latest, test-windows-x86_64-ldc-latest, test-windows-x86_64-ldc-master, test-linux-x86-ldc-latest, test-linux-x86_64-dmd-latest, test-linux-x86_64-ldc-latest, test-linux-x86_64-dmd-master, test-osx-x86_64-dmd-latest, test-osx-x86_64-ldc-latest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download coverage result
uses: actions/[email protected]
with:
name: coverage-windows
path: coverage-windows
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }} -s coverage-windows
- name: Download coverage result
uses: actions/[email protected]
with:
name: coverage-linux
path: coverage-linux
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }} -s coverage-linux
- name: Download coverage result
uses: actions/[email protected]
with:
name: coverage-osx
path: coverage-osx
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }} -s coverage-osx