-
Notifications
You must be signed in to change notification settings - Fork 3
666 lines (569 loc) · 24.8 KB
/
build.yml
File metadata and controls
666 lines (569 loc) · 24.8 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
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
name: Build and Test
on:
pull_request:
branches:
- main
workflow_dispatch:
workflow_call:
env:
LLVM_REF: ec450b19004a653f3db3ad50e88fbf6529a9d841
SCCACHE_DIRECT: yes
jobs:
windows_tools:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: compnerd/gha-setup-vsdevenv@main
- name: Install Build Tools
run: choco install winflexbison3
- name: Configure
run: |
cmake -B ${{ github.workspace }}/BinaryCache/RegsGen2 `
-C ${{ github.workspace }}/cmake/caches/MSVCWarnings.cmake `
-G "Visual Studio 17 2022" `
-A x64 `
-S ${{ github.workspace }}/Tools/RegsGen2
- name: Build
run: cmake --build ${{ github.workspace }}/BinaryCache/RegsGen2 --config Release
- uses: actions/upload-artifact@v4
with:
name: windows-regsgen2
path: |
${{ github.workspace }}/BinaryCache/RegsGen2/Release/regsgen2.exe
windows:
needs: [windows_tools]
runs-on: windows-latest
strategy:
matrix:
arch: ['Win32', 'x64'] # ['ARM', 'ARM64']
steps:
- uses: actions/checkout@v4
- name: Install Build Tools
run: choco install winflexbison3
- uses: actions/download-artifact@v4
with:
name: windows-regsgen2
path: ${{ github.workspace }}/BinaryCache/RegsGen2/Release
- name: Configure
run: |
cmake -B ${{ github.workspace }}/BinaryCache/ds2 `
-C ${{ github.workspace }}/cmake/caches/MSVCWarnings.cmake `
-G "Visual Studio 17 2022" `
-A ${{ matrix.arch }} `
-D DS2_REGSGEN2=${{ github.workspace }}/BinaryCache/RegsGen2/Release/regsgen2.exe `
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ github.workspace }}/BinaryCache/ds2 --config Release
- uses: actions/upload-artifact@v4
with:
name: windows-${{ matrix.arch }}-ds2
path: |
${{ github.workspace }}/BinaryCache/ds2/Release/ds2.exe
mingw:
needs: [windows_tools]
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
include:
- { system: ucrt64, env: ucrt-x86_64 }
- { system: clang64, env: clang-x86_64 }
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.system }}
install: >-
flex
bison
mingw-w64-${{ matrix.env }}-cmake
mingw-w64-${{ matrix.env }}-toolchain
mingw-w64-${{ matrix.env }}-ninja
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: windows-regsgen2
path: ${{ github.workspace }}/BinaryCache/RegsGen2/Release
- name: Configure
run: |
cmake -B $(cygpath -u '${{ github.workspace }}/BinaryCache/ds2') \
-C $(cygpath -u '${{ github.workspace }}/cmake/caches/GNUWarnings.cmake') \
-D CMAKE_BUILD_TYPE=Release \
-G Ninja \
-D DS2_REGSGEN2=$(cygpath -u '${{ github.workspace }}/BinaryCache/RegsGen2/Release/regsgen2.exe') \
-S $(cygpath -u '${{ github.workspace }}')
- name: Build
run: cmake --build $(cygpath -u '${{ github.workspace }}/BinaryCache/ds2') --config Release
- uses: actions/upload-artifact@v4
with:
name: mingw-${{ matrix.system }}-ds2
path: |
${{ github.workspace }}/BinaryCache/ds2/ds2.exe
macos:
# The macos-latest runner image runs on an M1 ARM CPU which is not currently
# supported by ds2. Build on macos-13, which is x86_64-based, until Darwin
# on ARM support is implemented.
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Configure
run: |
cmake -B ${{ github.workspace }}/BinaryCache/ds2 \
-C ${{ github.workspace }}/cmake/caches/ClangWarnings.cmake \
-D CMAKE_BUILD_TYPE=Release \
-G Ninja \
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ github.workspace }}/BinaryCache/ds2 --config Release
- uses: actions/upload-artifact@v4
with:
name: macOS-x86_64-ds2
path: |
${{ github.workspace }}/BinaryCache/ds2/ds2
linux:
runs-on: ubuntu-latest
name: Linux (${{ matrix.processor }})
strategy:
fail-fast: false
matrix:
include:
- processor: x86_64
compiler_packages:
c_compiler: gcc
cxx_compiler: g++
cflags:
cxxflags:
- processor: i686
compiler_packages: gcc-multilib g++-multilib
c_compiler: gcc
cxx_compiler: g++
cflags: "-m32"
cxxflags: "-m32"
- processor: arm
compiler_packages: gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
c_compiler: arm-linux-gnueabi-gcc
cxx_compiler: arm-linux-gnueabi-g++
cflags:
cxxflags:
- processor: aarch64
compiler_packages: gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
c_compiler: aarch64-linux-gnu-gcc
cxx_compiler: aarch64-linux-gnu-g++
cflags:
cxxflags:
steps:
- uses: actions/checkout@v4
with:
path: ${{ github.workspace }}/SourceCache/ds2
- run: |
sudo apt-get update
sudo apt-get install -qq --no-install-recommends bison flex ninja-build ${{ matrix.compiler_packages }}
- name: Configure
run: |
cmake -B ${{ github.workspace }}/BinaryCache/ds2 \
-S ${{ github.workspace }}/SourceCache/ds2 \
-C ${{ github.workspace }}/SourceCache/ds2/cmake/caches/GNUWarnings.cmake \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_SYSTEM_NAME=Linux \
-D CMAKE_SYSTEM_PROCESSOR=${{ matrix.processor }} \
-D CMAKE_C_COMPILER=${{ matrix.c_compiler }} \
-D CMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} \
-D CMAKE_C_FLAGS=${{ matrix.cflags }} \
-D CMAKE_CXX_FLAGS=${{ matrix.cxxflags }} \
-G Ninja
- name: Build
run: cmake --build ${{ github.workspace }}/BinaryCache/ds2 --config Release
# Tar the output to preserve permissions.
- name: tar output
run: tar -C ${{ github.workspace }}/BinaryCache -cvf ${{ github.workspace }}/BinaryCache/ds2.tar ds2
- uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.processor }}-ds2
path: ${{ github.workspace }}/BinaryCache/ds2.tar
freebsd:
runs-on: ubuntu-latest
strategy:
matrix:
processor: [ x86_64 ]
steps:
- uses: actions/checkout@v4
with:
path: ${{ github.workspace }}/SourceCache/ds2
- uses: vmactions/freebsd-vm@v1
name: Build on FreeBSD VM
with:
prepare: |
pkg install -y cmake bison flex ninja
run: |
cmake -B ${{ github.workspace }}/BinaryCache/ds2 \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_SYSTEM_NAME=FreeBSD \
-D CMAKE_SYSTEM_PROCESSOR=${{ matrix.processor }} \
-G Ninja \
-S ${{ github.workspace }}/SourceCache/ds2
cmake --build ${{ github.workspace }}/BinaryCache/ds2 --config Release
# Tar the output to preserve permissions.
- name: tar output
run: tar -C ${{ github.workspace }}/BinaryCache -cvf ${{ github.workspace }}/BinaryCache/ds2.tar ds2
- uses: actions/upload-artifact@v4
with:
name: freebsd-${{ matrix.processor }}-ds2
path: ${{ github.workspace }}/BinaryCache/ds2.tar
# Cross-compile for Android on a Windows host.
android-windows-ndk:
needs: [windows_tools]
runs-on: windows-latest
strategy:
matrix:
abi: ['x86_64', 'x86', 'arm64-v8a', 'armeabi-v7a']
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: actions/download-artifact@v4
with:
name: windows-regsgen2
path: ${{ github.workspace }}/BinaryCache/RegsGen2/Release
- name: Install Build Tools
run: choco install winflexbison3
# cmake finds the Android NDK from ANDROID_NDK in the environment, which
# is pre-installed and configured in the Windows runner image.
- name: Configure
run: |
cmake -B ${{ github.workspace }}/BinaryCache/ds2 `
-D CMAKE_BUILD_TYPE=Release `
-D CMAKE_SYSTEM_NAME=Android `
-D CMAKE_ANDROID_ARCH_ABI=${{ matrix.abi }} `
-D DS2_REGSGEN2=${{ github.workspace }}/BinaryCache/RegsGen2/Release/regsgen2.exe `
-G Ninja
- name: Build
run: cmake --build ${{ github.workspace }}/BinaryCache/ds2 --config Release
# Tar the output to preserve permissions.
- name: tar output
run: tar -C ${{ github.workspace }}/BinaryCache -cvf ${{ github.workspace }}/BinaryCache/ds2.tar ds2
- uses: actions/upload-artifact@v4
with:
name: android-${{ matrix.abi }}-ds2
path: ${{ github.workspace }}/BinaryCache/ds2.tar
build-lldb-linux:
name: Build LLDB
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: [ubuntu-latest, ubuntu-24.04-arm]
steps:
- name: Install LZMA libraries
run:
sudo apt install lzma-dev liblzma-dev
- if: ${{ !contains(matrix.runner, 'arm') }}
uses: seanmiddleditch/gha-setup-ninja@v5
- if: contains(matrix.runner, 'arm')
uses: seanmiddleditch/gha-setup-ninja@v5
with:
# TODO(andrurogerz): seanmiddleditch/gha-setup-ninja does not properly
# detect Linux on arm64 and always installs the x86_64 ninja package.
# For now, we can fix this by overriding the platform string to force
# the downloading the proper package. We also require a newer ninja
# version since aarch64 packages were not released until v1.12.0 and
# the default gha-setup-ninja installs is v1.11.1.
platform: linux-aarch64
version: 1.12.1 # latest sccache version
- name: Setup sccache
uses: hendrikmuhs/ccache-action@433beb5b585c67c13415f39d5ba7e485b1920710
with:
key: llvm-${{ runner.os }}-${{ runner.arch }}
variant: sccache
- name: Checkout llvm project
uses: actions/checkout@v4
with:
repository: llvm/llvm-project
ref: ${{ env.LLVM_REF }}
path: ${{ github.workspace }}/SourceCache/llvm
# Build clang and a Python-enabled lldb binary to execute the lldb tests
- name: Configure lldb build
run: |
cmake -B ${{ github.workspace }}/BinaryCache/llvm \
-S ${{ github.workspace }}/SourceCache/llvm/llvm \
-D LLVM_ENABLE_PROJECTS='clang;lldb' \
-D LLVM_TARGETS_TO_BUILD="host" \
-D LLDB_ENABLE_PYTHON=On \
-D LLDB_ENABLE_LZMA=On \
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
-D CMAKE_BUILD_TYPE=Release \
-G Ninja
- name: Build llvm
run: |
cmake --build ${{ github.workspace }}/BinaryCache/llvm \
--target tools/lldb/test/API/lldb-api-test-deps \
--config Release
# Tar the build output to preserve permissions.
- name: tar output
run: tar -C ${{ github.workspace }}/BinaryCache -cvf ${{ github.workspace }}/BinaryCache/llvm.tar llvm
- uses: actions/upload-artifact@v4
with:
name: llvm-${{ runner.os }}-${{ runner.arch }}
path: ${{ github.workspace }}/BinaryCache/llvm.tar
test-linux:
needs: [linux, build-lldb-linux]
runs-on: ${{ matrix.runner }}
name: Test Linux ${{ matrix.arch }} ${{ matrix.test-category }}
strategy:
fail-fast: false
matrix:
include:
- test-category: misc
runner: ubuntu-latest
arch: i686
test-subdirs: >-
SourceCache/llvm/lldb/test/API/api
SourceCache/llvm/lldb/test/API/lang
SourceCache/llvm/lldb/test/API/linux
SourceCache/llvm/lldb/test/API/tools
SourceCache/llvm/lldb/test/API/sanity
SourceCache/llvm/lldb/test/API/types
- test-category: misc
runner: ubuntu-latest
arch: x86_64
test-subdirs: >-
SourceCache/llvm/lldb/test/API/api
SourceCache/llvm/lldb/test/API/lang
SourceCache/llvm/lldb/test/API/linux
SourceCache/llvm/lldb/test/API/tools
SourceCache/llvm/lldb/test/API/sanity
SourceCache/llvm/lldb/test/API/types
- test-category: misc
runner: ubuntu-24.04-arm
arch: aarch64
test-subdirs: >-
SourceCache/llvm/lldb/test/API/api
SourceCache/llvm/lldb/test/API/lang
SourceCache/llvm/lldb/test/API/linux
SourceCache/llvm/lldb/test/API/tools
SourceCache/llvm/lldb/test/API/sanity
SourceCache/llvm/lldb/test/API/types
- test-category: commands
runner: ubuntu-latest
arch: x86_64
test-subdirs: >-
SourceCache/llvm/lldb/test/API/commands
- test-category: commands
runner: ubuntu-latest
arch: i686
test-subdirs: >-
SourceCache/llvm/lldb/test/API/commands
- test-category: commands
runner: ubuntu-24.04-arm
arch: aarch64
test-subdirs: >-
SourceCache/llvm/lldb/test/API/commands
- test-category: Python API
runner: ubuntu-latest
arch: x86_64
test-subdirs: >-
SourceCache/llvm/lldb/test/API/python_api
- test-category: Python API
runner: ubuntu-latest
arch: i686
test-subdirs: >-
SourceCache/llvm/lldb/test/API/python_api
- test-category: Python API
runner: ubuntu-24.04-arm
arch: aarch64
test-subdirs: >-
SourceCache/llvm/lldb/test/API/python_api
- test-category: functionalities
runner: ubuntu-latest
arch: x86_64
test-subdirs: >-
SourceCache/llvm/lldb/test/API/functionalities
- test-category: functionalities
runner: ubuntu-latest
arch: i686
test-subdirs: >-
SourceCache/llvm/lldb/test/API/functionalities
- test-category: functionalities
runner: ubuntu-24.04-arm
arch: aarch64
test-subdirs: >-
SourceCache/llvm/lldb/test/API/functionalities
steps:
- if: matrix.arch == 'i686'
run: |
sudo apt-get update
sudo apt-get install -qq --no-install-recommends gcc-multilib g++-multilib
- uses: actions/download-artifact@v4
with:
name: llvm-${{ runner.os }}-${{ runner.arch }}
path: ${{ github.workspace }}/BinaryCache
- name: untar llvm artifacts
run: |
tar -C ${{ github.workspace }}/BinaryCache -xvf ${{ github.workspace }}/BinaryCache/llvm.tar
- uses: actions/download-artifact@v4
with:
name: linux-${{ matrix.arch }}-ds2
path: ${{ github.workspace }}/BinaryCache
- name: untar ds2 artifacts
run: |
tar -C ${{ github.workspace }}/BinaryCache -xvf ${{ github.workspace }}/BinaryCache/ds2.tar
- name: Checkout llvm project
uses: actions/checkout@v4
with:
repository: llvm/llvm-project
ref: ${{ env.LLVM_REF }}
path: ${{ github.workspace }}/SourceCache/llvm
- name: Checkout ds2
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}/SourceCache/ds2
- run: |
mkdir -p ${{ github.workspace }}/temp
${{ github.workspace }}/BinaryCache/ds2/ds2 platform --server --daemonize --listen localhost:5432
${{ github.workspace }}/BinaryCache/llvm/bin/lldb-dotest 1>/dev/null \
--out-of-tree-debugserver \
--arch ${{ matrix.arch }} \
--platform-name remote-linux \
--platform-url connect://localhost:5432 \
--platform-working-dir ${{ github.workspace }}/temp \
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/linux-${{ matrix.arch }}.excluded \
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/ds2/linux-${{ matrix.arch }}.excluded \
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/non-debugserver-tests.excluded \
${{ matrix.test-subdirs }}
test-android-x86:
needs: [android-windows-ndk, build-lldb-linux]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- test-category: misc
arch: x86_64
llvm-arch: x86_64
android-api-level: 28
test-subdirs: >-
SourceCache/llvm/lldb/test/API/android
SourceCache/llvm/lldb/test/API/api
SourceCache/llvm/lldb/test/API/lang
SourceCache/llvm/lldb/test/API/linux
SourceCache/llvm/lldb/test/API/tools
SourceCache/llvm/lldb/test/API/sanity
SourceCache/llvm/lldb/test/API/types
- test-category: commands
arch: x86_64
llvm-arch: x86_64
android-api-level: 28
test-subdirs: >-
SourceCache/llvm/lldb/test/API/commands
- test-category: Python API
arch: x86_64
llvm-arch: x86_64
android-api-level: 28
test-subdirs: >-
SourceCache/llvm/lldb/test/API/python_api
- test-category: functionalities
arch: x86_64
llvm-arch: x86_64
android-api-level: 28
test-subdirs: >-
SourceCache/llvm/lldb/test/API/functionalities
# Run a small sub-set of tests on arm64. The emulator is very slow
# so it is not practical to run more tests until we can run on an
# arm64 runner with virtualization.
- test-category: sanity
arch: arm64-v8a
llvm-arch: aarch64
# Android emulator supports ARM on x86 only on API < 28
android-api-level: 27
# This is the most recent build of the emulator that supports
# booting arm64 images.
emulator-build: 12234392
emulator-options: -qemu -machine virt -cpu max
test-subdirs: >-
SourceCache/llvm/lldb/test/API/android
SourceCache/llvm/lldb/test/API/api
SourceCache/llvm/lldb/test/API/linux
SourceCache/llvm/lldb/test/API/sanity
name: Test Android ${{ matrix.arch}} ${{ matrix.test-category }}
steps:
- uses: actions/download-artifact@v4
with:
name: llvm-${{ runner.os }}-${{ runner.arch }}
path: ${{ github.workspace }}/BinaryCache
- name: untar llvm artifacts
run: |
tar -C ${{ github.workspace }}/BinaryCache -xvf ${{ github.workspace }}/BinaryCache/llvm.tar
- uses: actions/download-artifact@v4
with:
name: android-${{ matrix.arch }}-ds2
path: ${{ github.workspace }}/BinaryCache
- name: untar ds2 artifacts
run: |
tar -C ${{ github.workspace }}/BinaryCache -xvf ${{ github.workspace }}/BinaryCache/ds2.tar
- name: Checkout llvm project
uses: actions/checkout@v4
with:
repository: llvm/llvm-project
ref: ${{ env.LLVM_REF }}
path: ${{ github.workspace }}/SourceCache/llvm
- name: Checkout ds2
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}/SourceCache/ds2
# Cache the contents of $HOME/.android which contains emulators,
# snapshots, and adb state.
- name: Setup AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: ~/.android/**
key: avd-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.android-api-level }}
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
emulator-build: ${{ matrix.emulator-build }}
api-level: ${{ matrix.android-api-level }}
arch: ${{ matrix.arch }}
force-avd-creation: false
emulator-options: -no-window -noaudio -no-boot-anim -camera-back none -gpu swiftshader_indirect ${{ matrix.emulator-options }}
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Run lldb tests against ds2 on Android emulator
uses: reactivecircus/android-emulator-runner@v2
with:
emulator-build: ${{ matrix.emulator-build }}
api-level: ${{ matrix.android-api-level }}
arch: ${{ matrix.arch }}
force-avd-creation: false
# NOTE: -no-snapshot will not load or save state and the emulator will
# cold boot. Ideally, we would specify -no-snapshot-save instead so it
# would load the snapshot created in the caching step (but not save a
# new one). However, doing that causes the emulator to hang during
# shutdown. We're still saving time by reusing the device created in
# the caching step and not wiping userdata on boot.
emulator-options: -no-snapshot -no-window -noaudio -no-boot-anim -camera-back none -gpu swiftshader_indirect ${{ matrix.emulator-options }}
disable-animations: true
script: >
$ANDROID_SDK_ROOT/platform-tools/adb forward tcp:5432 tcp:5432
$ANDROID_SDK_ROOT/platform-tools/adb push "${{ github.workspace }}/BinaryCache/ds2/ds2" /data/local/tmp
$ANDROID_SDK_ROOT/platform-tools/adb shell "chmod +x /data/local/tmp/ds2"
$ANDROID_SDK_ROOT/platform-tools/adb shell "/data/local/tmp/ds2 platform --server --daemonize --listen localhost:5432"
${{ github.workspace }}/BinaryCache/llvm/bin/lldb-dotest 1>/dev/null
--out-of-tree-debugserver
--arch ${{ matrix.llvm-arch }}
--platform-name remote-android
--platform-url connect://localhost:5432
--platform-working-dir /data/local/tmp
--compiler=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/${{ matrix.llvm-arch }}-linux-android${{ matrix.android-api-level }}-clang
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/ds2/android-${{ matrix.llvm-arch }}.excluded
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/android-${{ matrix.llvm-arch }}.excluded
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/non-debugserver-tests.excluded
${{ matrix.test-subdirs }}