-
Notifications
You must be signed in to change notification settings - Fork 2
479 lines (396 loc) · 14 KB
/
main.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
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
name: Build MinGW and MSYS2 toolchain
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
msys2_packages_branch:
description: "MSYS2-packages branch to build"
type: string
required: false
default: "woarm64"
defaults:
run:
shell: msys2 {0}
env:
MSYS2_REPO: Windows-on-ARM-Experiments/MSYS2-packages
MSYS2_BRANCH: ${{ inputs.msys2_packages_branch || 'woarm64' }}
jobs:
mingw-w64-cross-headers:
runs-on: windows-latest
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
location: ${{ github.workspace }}
release: true
update: true
cache: false
install: base-devel
- name: Checkout MSYS2 packages repository
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ env.MSYS2_BRANCH }}
path: ${{ github.workspace }}/MSYS2-packages
- name: Build mingw-w64-cross-headers
working-directory: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-headers
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --force
- name: Upload mingw-w64-cross-headers
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-headers
retention-days: 1
path: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-headers/*.pkg.tar.zst
mingw-w64-cross-binutils:
needs: [mingw-w64-cross-headers]
runs-on: windows-latest
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
location: ${{ github.workspace }}
release: true
update: true
cache: false
install: base-devel
- name: Checkout MSYS2 packages repository
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ env.MSYS2_BRANCH}}
path: ${{ github.workspace }}/MSYS2-packages
- name: Download mingw-w64-cross-headers
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-headers
- name: Install artifacts
run: pacman -U --noconfirm *.pkg.tar.zst
- name: Build mingw-w64-cross-binutils
working-directory: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-binutils
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --nocheck --force
- name: Upload mingw-w64-cross-binutils
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-binutils
retention-days: 1
path: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-binutils/*.pkg.tar.zst
mingw-w64-cross-gcc-stage1:
needs: [mingw-w64-cross-headers, mingw-w64-cross-binutils]
runs-on: windows-latest
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
location: ${{ github.workspace }}
release: true
update: true
cache: false
install: base-devel
- name: Checkout MSYS2 packages repository
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ env.MSYS2_BRANCH }}
path: ${{ github.workspace }}/MSYS2-packages
- name: Download mingw-w64-cross-headers
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-headers
- name: Download mingw-w64-cross-binutils
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-binutils
- name: Install artifacts
run: pacman -U --noconfirm *.pkg.tar.zst
- name: Build mingw-w64-cross-gcc-stage1
working-directory: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-gcc-stage1
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --force
- name: Upload mingw-w64-cross-gcc-stage1
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-gcc-stage1
retention-days: 1
path: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-gcc-stage1/*.pkg.tar.zst
mingw-w64-cross-windows-default-manifest:
needs: [mingw-w64-cross-binutils, mingw-w64-cross-gcc-stage1]
runs-on: windows-latest
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
location: ${{ github.workspace }}
release: true
update: true
cache: false
install: base-devel
- name: Checkout MSYS2 packages repository
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ env.MSYS2_BRANCH }}
path: ${{ github.workspace }}/MSYS2-packages
- name: Download mingw-w64-cross-binutils
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-binutils
- name: Download mingw-w64-cross-gcc-stage1
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-gcc-stage1
- name: Install artifacts
run: pacman -U --noconfirm *.pkg.tar.zst
- name: Build mingw-w64-cross-windows-default-manifest
working-directory: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-windows-default-manifest
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --force
- name: Upload mingw-w64-cross-windows-default-manifest
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-windows-default-manifest
retention-days: 1
path: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-windows-default-manifest/*.pkg.tar.zst
mingw-w64-cross-crt:
needs:
[
mingw-w64-cross-headers,
mingw-w64-cross-binutils,
mingw-w64-cross-gcc-stage1,
]
runs-on: windows-latest
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
location: ${{ github.workspace }}
release: true
update: true
cache: false
install: >-
base-devel
mingw-w64-cross-winpthreads
- name: Checkout MSYS2 packages repository
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ env.MSYS2_BRANCH }}
path: ${{ github.workspace }}/MSYS2-packages
- name: Download mingw-w64-cross-headers
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-headers
- name: Download mingw-w64-cross-binutils
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-binutils
- name: Download mingw-w64-cross-gcc-stage1
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-gcc-stage1
- name: Install artifacts
run: pacman -U --noconfirm *.pkg.tar.zst
- name: Copy missing headers
run: |
cp /opt/x86_64-w64-mingw32/include/pthread_signal.h /opt/aarch64-w64-mingw32/include/
cp /opt/x86_64-w64-mingw32/include/pthread_unistd.h /opt/aarch64-w64-mingw32/include/
cp /opt/x86_64-w64-mingw32/include/pthread_time.h /opt/aarch64-w64-mingw32/include/
- name: Build mingw-w64-cross-crt
working-directory: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-crt
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --force
- name: Upload mingw-w64-cross-crt
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-crt
retention-days: 1
path: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-crt/*.pkg.tar.zst
mingw-w64-cross-winpthreads:
needs:
[
mingw-w64-cross-headers,
mingw-w64-cross-binutils,
mingw-w64-cross-gcc-stage1,
mingw-w64-cross-crt,
]
runs-on: windows-latest
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
location: ${{ github.workspace }}
release: true
update: true
cache: false
install: base-devel
- name: Checkout MSYS2 packages repository
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ env.MSYS2_BRANCH }}
path: ${{ github.workspace }}/MSYS2-packages
- name: Download mingw-w64-cross-headers
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-headers
- name: Download mingw-w64-cross-binutils
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-binutils
- name: Download mingw-w64-cross-gcc-stage1
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-gcc-stage1
- name: Download mingw-w64-cross-crt
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-crt
- name: Install artifacts
run: pacman -U --noconfirm *.pkg.tar.zst
- name: Build mingw-w64-cross-winpthreads
working-directory: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-winpthreads
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --force
- name: Upload mingw-w64-cross-winpthreads
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-winpthreads
retention-days: 1
path: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-winpthreads/*.pkg.tar.zst
mingw-w64-cross-gcc:
needs:
[
mingw-w64-cross-headers,
mingw-w64-cross-binutils,
mingw-w64-cross-windows-default-manifest,
mingw-w64-cross-crt,
mingw-w64-cross-winpthreads,
]
runs-on: windows-latest
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
location: ${{ github.workspace }}
release: true
update: true
cache: false
install: base-devel
- name: Checkout MSYS2 packages repository
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ env.MSYS2_BRANCH }}
path: ${{ github.workspace }}/MSYS2-packages
- name: Download mingw-w64-cross-headers
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-headers
- name: Download mingw-w64-cross-binutils
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-binutils
- name: Download mingw-w64-cross-windows-default-manifest
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-windows-default-manifest
- name: Download mingw-w64-cross-crt
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-crt
- name: Download mingw-w64-cross-winpthreads
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-winpthreads
- name: Install artifacts
run: pacman -U --noconfirm *.pkg.tar.zst
- name: Build mingw-w64-cross-gcc
working-directory: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-gcc
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --force
- name: Upload mingw-w64-cross-gcc
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-gcc
retention-days: 1
path: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-gcc/*.pkg.tar.zst
repository:
needs:
[
mingw-w64-cross-headers,
mingw-w64-cross-binutils,
mingw-w64-cross-gcc-stage1,
mingw-w64-cross-windows-default-manifest,
mingw-w64-cross-crt,
mingw-w64-cross-winpthreads,
mingw-w64-cross-gcc,
]
runs-on: windows-latest
steps:
- uses: msys2/setup-msys2@v2
- name: Download mingw-w64-cross-headers
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-headers
- name: Download mingw-w64-cross-binutils
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-binutils
- name: Download mingw-w64-cross-gcc-stage1
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-gcc-stage1
- name: Download mingw-w64-cross-windows-default-manifest
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-windows-default-manifest
- name: Download mingw-w64-cross-crt
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-crt
- name: Download mingw-w64-cross-winpthreads
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-winpthreads
- name: Download mingw-w64-cross-gcc
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-gcc
- name: Setup MSYS2 packages repository
run: |
mkdir aarch64
mkdir x86_64
mv -f *-x86_64.pkg.tar.zst x86_64/
cd x86_64
repo-add woarm64.db.tar.gz *.pkg.tar.zst
- name: Create index.html
run: |
echo "<!DOCTYPE html><head></head><body></body>" > index.html
- name: Upload woarm64-msys2-repository
uses: actions/upload-pages-artifact@v3
with:
name: woarm64-msys2-repository
retention-days: 1
path: "."
deploy:
if: github.ref == 'refs/heads/main'
needs: [repository]
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
defaults:
run:
shell: bash {0}
steps:
- name: Setup GitHub Pages
uses: actions/configure-pages@v4
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: woarm64-msys2-repository
check-repository:
needs: [deploy]
uses: ./.github/workflows/check-repository.yml