-
Notifications
You must be signed in to change notification settings - Fork 88
583 lines (467 loc) · 17.6 KB
/
Copy pathbuild.yml
File metadata and controls
583 lines (467 loc) · 17.6 KB
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
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
name: 'DwarFS CI Build'
on:
workflow_dispatch:
push:
branches:
- main
- 'mhx/**'
tags:
- v*
permissions:
contents: read
jobs:
windows:
runs-on:
- self-hosted
- Windows
strategy:
matrix:
arch:
- X64
build_mode:
- Release
- Debug
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'
fetch-depth: '0'
ref: ${{ github.ref }}
- name: Set MSVC Dev Environment
uses: ilammy/msvc-dev-cmd@v1
- name: Configure Build
shell: cmd
run: |
cmake -B${{ runner.temp }}\build -S${{ runner.workspace }}\dwarfs -GNinja -DCMAKE_MAKE_PROGRAM=C:\bin\ninja.exe -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_UNIVERSAL_BINARY=ON -DWITH_TESTS=ON -DWITH_BENCHMARKS=ON -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DVCPKG_INSTALLED_DIR=${{ runner.workspace }}\vcpkg-install-dwarfs -DDWARFS_ARTIFACTS_DIR=Z:\artifacts\dwarfs -DWITH_PXATTR=ON -DENABLE_STACKTRACE=${{ matrix.build_mode == 'Debug' && 'ON' || 'OFF' }}
- name: Run Build
shell: cmd
run: |
cmake --build ${{ runner.temp }}\build
- name: Run Test
shell: cmd
run: |
copy "C:\Program Files (x86)\WinFsp\bin\winfsp-x64.dll" ${{ runner.temp }}\build
ctest --test-dir ${{ runner.temp }}\build --output-on-failure -j
- name: Build Package
shell: cmd
run: |
cmake --build ${{ runner.temp }}\build --target package
- name: Compress Universal Binary
shell: cmd
run: |
cmake --build ${{ runner.temp }}\build --target universal_upx
- name: Copy Artifacts
shell: cmd
run: |
cmake --build ${{ runner.temp }}\build --target copy_artifacts
# - name: Prepare Artifact Upload
# shell: cmd
# run: cat ${{ runner.temp }}\build\artifacts.env >> %GITHUB_ENV%
# - name: Upload Binary Tarball
# uses: actions/upload-artifact@v4
# with:
# name: ${{ env.binary_tarball }}
# path: ${{ runner.temp }}\build\${{ env.binary_tarball }}
# if-no-files-found: error
# compression-level: 0
# env:
# ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY: 5
# - name: Upload Universal Binary
# uses: actions/upload-artifact@v4
# with:
# name: ${{ env.universal_binary }}
# path: ${{ runner.temp }}\build\${{ env.universal_binary }}
# if-no-files-found: error
# compression-level: 0
# env:
# ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY: 5
################################################################################
package-source:
uses: ./.github/workflows/docker-run-build.yml
with:
build_type: clang-release-ninja-source-notest
build_arch: amd64
build_dist: arch
################################################################################
linux:
needs: package-source
strategy:
fail-fast: false
matrix:
include:
- build_arch: amd64
build_dist: ubuntu
build_type: gcc-release-shared-ninja-split
- build_arch: amd64
build_dist: ubuntu
build_type: gcc-debug-shared-noperfmon-ninja-split
- build_arch: amd64
build_dist: ubuntu
build_type: clang-reldbg-shared-asan-ninja
- build_arch: amd64
build_dist: ubuntu
build_type: clang-reldbg-shared-ubsan-ninja
- build_arch: amd64
build_dist: ubuntu
build_type: clang-debug-shared-tsan-ninja
- build_arch: amd64
build_dist: ubuntu
build_type: clang-debug-coverage-ninja
- build_arch: amd64
build_dist: fedora
build_type: gcc-release-ninja-split
- build_arch: amd64
build_dist: fedora
build_type: clang-release-shared-ninja-full
- build_arch: amd64
build_dist: arch
build_type: gcc-release-ninja-split
- build_arch: amd64
build_dist: arch
build_type: gcc-release-shared-ninja-split
- build_arch: amd64
build_dist: arch
build_type: gcc-debug-shared-ninja-full
- build_arch: amd64
build_dist: arch
build_type: clang-release-shared-ninja-full
- build_arch: amd64
build_dist: debian
build_type: gcc-release-make-full
- build_arch: amd64
build_dist: debian
build_type: clang-debug-shared-ninja-split
- build_arch: amd64
build_dist: alpine
build_type: gcc-release-ninja-static
- build_arch: amd64
build_dist: alpine
build_type: clang-release-ninja-static
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-lto-ninja-static
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-libressl-lto-ninja-static
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-minimal-lto-ninja-static
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-minimal-libressl-lto-ninja-static
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-minimal-mimalloc-lto-ninja-static
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-minimal-mimalloc-libressl-lto-ninja-static
- build_arch: amd64
build_dist: alpine
build_type: clang-reldbg-stacktrace-ninja-static
- build_arch: arm64v8
build_dist: ubuntu-2204
build_type: gcc-release-shared-ninja-split
- build_arch: arm64v8
build_dist: ubuntu-2204
build_type: gcc-debug-shared-ninja-full
- build_arch: arm64v8
build_dist: ubuntu-2204
build_type: clang-release-ninja-split
- build_arch: arm64v8
build_dist: ubuntu
build_type: gcc-debug-shared-ninja-full
- build_arch: arm64v8
build_dist: ubuntu
build_type: clang-release-shared-ninja-full
- build_arch: arm64v8
build_dist: ubuntu
build_type: oldgcc-debug-shared-make-split
- build_arch: arm64v8
build_dist: ubuntu
build_type: oldclang-debug-shared-make-split
- build_arch: arm64v8
build_dist: fedora
build_type: gcc-release-shared-make-full
- build_arch: arm64v8
build_dist: fedora
build_type: gcc-debug-shared-ninja-split
- build_arch: arm64v8
build_dist: fedora
build_type: clang-release-shared-ninja-full
- build_arch: arm64v8
build_dist: alpine
build_type: gcc-release-ninja-static
- build_arch: arm64v8
build_dist: alpine
build_type: clang-release-ninja-static
- build_arch: arm64v8
build_dist: alpine
build_type: clang-relsize-lto-ninja-static
- build_arch: arm64v8
build_dist: alpine
build_type: clang-relsize-libressl-lto-ninja-static
- build_arch: arm64v8
build_dist: alpine
build_type: clang-relsize-minimal-lto-ninja-static
- build_arch: arm64v8
build_dist: alpine
build_type: clang-relsize-minimal-mimalloc-lto-ninja-static
- build_arch: arm64v8
build_dist: alpine
build_type: clang-reldbg-stacktrace-ninja-static
- build_arch: riscv64
build_dist: debian
build_type: gcc-release-ninja-full
- build_arch: riscv64
build_dist: ubuntu
build_type: clang-debug-shared-ninja-split
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-libressl-lto-ninja-static
cross_arch: aarch64
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-libressl-lto-ninja-static
cross_arch: riscv64
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-lto-ninja-static
cross_arch: riscv64
skip_slow_tests: true
- build_arch: amd64
build_dist: alpine
build_type: clang-release-ninja-static
cross_arch: riscv64
skip_slow_tests: true
- build_arch: amd64
build_dist: alpine
build_type: gcc-release-ninja-static
cross_arch: riscv64
skip_slow_tests: true
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-libressl-lto-ninja-static
cross_arch: i386
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-lto-ninja-static
cross_arch: i386
skip_slow_tests: true
- build_arch: amd64
build_dist: alpine
build_type: clang-release-ninja-static
cross_arch: i386
skip_slow_tests: true
- build_arch: amd64
build_dist: alpine
build_type: gcc-release-ninja-static
cross_arch: i386
skip_slow_tests: true
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-libressl-lto-ninja-static
cross_arch: arm
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-lto-ninja-static
cross_arch: arm
skip_slow_tests: true
- build_arch: amd64
build_dist: alpine
build_type: clang-release-ninja-static
cross_arch: arm
skip_slow_tests: true
######### fails: static_assert(std::atomic<bool>::is_always_lock_free);
# - build_arch: amd64
# build_dist: alpine
# build_type: gcc-release-ninja-static
# cross_arch: arm
- build_arch: amd64
build_dist: alpine
build_type: gcc-release-ninja-static
cross_arch: ppc64le
skip_slow_tests: true
- build_arch: amd64
build_dist: alpine
build_type: gcc-release-lto-ninja-static
cross_arch: ppc64le
######## no libressl support
# - build_arch: amd64
# build_dist: alpine
# build_type: clang-relsize-libressl-lto-ninja-static
# cross_arch: loongarch64
- build_arch: amd64
build_dist: alpine
build_type: clang-relsize-lto-ninja-static
cross_arch: loongarch64
- build_arch: amd64
build_dist: alpine
build_type: clang-release-ninja-static
cross_arch: loongarch64
skip_slow_tests: true
- build_arch: amd64
build_dist: alpine
build_type: gcc-release-ninja-static
cross_arch: loongarch64
skip_slow_tests: true
######## no libressl support
# - build_arch: amd64
# build_dist: alpine
# build_type: clang-relsize-libressl-lto-ninja-static
# cross_arch: s390x
######## misaligned symbol typeinfo name for std::_Sp_make_shared_tag for relocation R_390_PC32DBL
# - build_arch: amd64
# build_dist: alpine
# build_type: clang-relsize-lto-ninja-static
# cross_arch: s390x
######## misaligned symbol typeinfo name for std::_Sp_make_shared_tag for relocation R_390_PC32DBL
# - build_arch: amd64
# build_dist: alpine
# build_type: clang-release-ninja-static
# cross_arch: s390x
- build_arch: amd64
build_dist: alpine
build_type: gcc-release-lto-ninja-static
cross_arch: s390x
skip_fuse_tests: true # big-endian FUSE driver won't work on little-endian
- build_arch: amd64
build_dist: alpine
build_type: gcc-release-ninja-static
cross_arch: s390x
skip_fuse_tests: true # big-endian FUSE driver won't work on little-endian
uses: ./.github/workflows/docker-run-build.yml
with:
build_type: ${{ matrix.build_type }}
build_arch: ${{ matrix.build_arch }}
build_dist: ${{ matrix.build_dist }}
cross_arch: ${{ matrix.cross_arch }}
skip_slow_tests: ${{ matrix.skip_slow_tests || false }}
skip_fuse_tests: ${{ matrix.skip_fuse_tests || false }}
build_from_tarball: true
upload_coverage: ${{ matrix.build_type == 'clang-debug-coverage-ninja' }}
upload_artifacts: ${{ endsWith(matrix.build_type, '-static') }}
################################################################################
macos:
needs: package-source
runs-on:
- self-hosted
- macOS
- ${{ matrix.arch }}
strategy:
matrix:
arch:
- ARM64
build_mode:
- Release
- Debug
config:
- name: Normal
cmake_args:
- name: Benchmark
cmake_args: -DWITH_BENCHMARKS=ON
include:
- arch: X64
build_mode: Release
config:
- name: Normal
cmake_args:
- arch: X64
build_mode: Debug
config:
- name: Benchmark
cmake_args: -DWITH_BENCHMARKS=ON
steps:
- name: Unpack Source Tarball
run: |
rm -rf dwarfs-*/
rm -f dwarfs-source-*.tar.zst
rm -f dwarfs
tar xf /Volumes/opensource/artifacts/dwarfs/cache/dwarfs-source-${{ github.run_number }}.tar.zst
ln -s dwarfs-* dwarfs
- name: Configure Full Build
run: |
rm -rf ${{ runner.temp }}/build
cmake --fresh -B${{ runner.temp }}/build -S${{ runner.workspace }}/dwarfs/dwarfs -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_TESTS=ON -DWITH_PXATTR=ON ${{ matrix.config.cmake_args }}
- name: Run Full Build
run: |
cmake --build ${{ runner.temp }}/build
- name: Run Full Test
run: |
ctest --test-dir ${{ runner.temp }}/build --output-on-failure -j
- name: Cleanup
run: |
cmake --build ${{ runner.temp }}/build --target realclean
- name: Configure Library Build
run: |
cmake --fresh -B${{ runner.temp }}/build -S${{ runner.workspace }}/dwarfs/dwarfs -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_TESTS=ON -DWITH_LIBDWARFS=ON -DWITH_TOOLS=OFF -DWITH_FUSE_DRIVER=OFF ${{ matrix.config.cmake_args }}
- name: Run Library Build
run: |
cmake --build ${{ runner.temp }}/build
- name: Run Library Test
run: |
ctest --test-dir ${{ runner.temp }}/build --output-on-failure -j
- name: Install Library
run: |
cmake --install ${{ runner.temp }}/build --prefix ${{ runner.temp }}/install
- name: Cleanup
run: |
cmake --build ${{ runner.temp }}/build --target realclean
- name: Configure Tools Build
run: |
cmake --fresh -B${{ runner.temp }}/build -S${{ runner.workspace }}/dwarfs/dwarfs -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_TESTS=ON -DWITH_LIBDWARFS=OFF -DWITH_TOOLS=ON -DWITH_FUSE_DRIVER=OFF ${{ matrix.config.cmake_args }} -DCMAKE_PREFIX_PATH=${{ runner.temp }}/install
- name: Run Tools Build
run: |
cmake --build ${{ runner.temp }}/build
- name: Run Tools Test
run: |
ctest --test-dir ${{ runner.temp }}/build --output-on-failure -j
- name: Install Tools
run: |
cmake --install ${{ runner.temp }}/build --prefix ${{ runner.temp }}/install
- name: Cleanup
run: |
cmake --build ${{ runner.temp }}/build --target realclean
- name: Configure FUSE Driver Build
run: |
cmake --fresh -B${{ runner.temp }}/build -S${{ runner.workspace }}/dwarfs/dwarfs -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} -DWITH_TESTS=ON -DWITH_LIBDWARFS=OFF -DWITH_TOOLS=OFF -DWITH_FUSE_DRIVER=ON ${{ matrix.config.cmake_args }} -DCMAKE_PREFIX_PATH=${{ runner.temp }}/install
- name: Run FUSE Driver Build
run: |
cmake --build ${{ runner.temp }}/build
- name: Run FUSE Driver Test
run: |
ctest --test-dir ${{ runner.temp }}/build --output-on-failure -j
- name: Install FUSE Driver
run: |
cmake --install ${{ runner.temp }}/build --prefix ${{ runner.temp }}/install
- name: Cleanup
run: |
cmake --build ${{ runner.temp }}/build --target realclean
rm -rf dwarfs-*/
rm -f dwarfs-source-*.tar.zst
rm -f dwarfs
################################################################################
freebsd:
needs: package-source
runs-on:
- self-hosted
- freebsd
- ${{ matrix.arch }}
strategy:
matrix:
arch:
- amd64
build_mode:
- Release
- Debug
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'false'
fetch-depth: '0'
ref: ${{ github.ref }}
- name: Run Build
run: |
BUILD_MODE=${{ matrix.build_mode }} \
sh .github/scripts/freebsd_jail_build.sh