-
Notifications
You must be signed in to change notification settings - Fork 11
629 lines (604 loc) · 29.2 KB
/
Copy pathtest_workflow.yml
File metadata and controls
629 lines (604 loc) · 29.2 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
name: Shared Test Workflow
on:
workflow_call:
inputs:
configuration:
required: true
type: string
skip_gtest:
description: "Skip C++ gtest execution (use when gtests run in a separate job)"
required: false
type: boolean
default: false
permissions:
contents: read
actions: read
jobs:
cache-jdks:
# This job is used to cache the JDKs for the test jobs
uses: ./.github/workflows/cache_java.yml
filter-musl-configs:
# Sanitizers (asan/tsan) are not supported on musl - filter them out
runs-on: ubuntu-latest
outputs:
configs: ${{ steps.filter.outputs.configs }}
has_configs: ${{ steps.filter.outputs.has_configs }}
steps:
- id: filter
run: |
configs=$(echo '${{ inputs.configuration }}' | jq -c '[.[] | select(. != "asan" and . != "tsan")]')
if [ "$configs" = "[]" ]; then
echo "has_configs=false" >> $GITHUB_OUTPUT
else
echo "has_configs=true" >> $GITHUB_OUTPUT
fi
echo "configs=$configs" >> $GITHUB_OUTPUT
test-linux-glibc-amd64:
needs: cache-jdks
strategy:
fail-fast: false
matrix:
# java_version: [ "8", "8-orcl", "8-j9", "8-zing", "8-ibm", "11", "11-j9", "11-zing", "17", "17-j9", "17-zing", "17-graal", "21", "21-zing", "21-graal", "25", "25-graal" ]
# FIXME: Zing disabled - Azul pulled public CDN access
java_version: [ "8", "8-orcl", "8-j9", "8-ibm", "11", "11-j9", "17", "17-j9", "17-graal", "21", "21-graal", "25", "25-graal" ]
config: ${{ fromJson(inputs.configuration) }}
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- name: Set enabled flag
id: set_enabled
run: |
echo "enabled=true" >> $GITHUB_OUTPUT
if [[ "${{ matrix.java_version }}" =~ -zing ]]; then
if [[ "${{ matrix.config }}" != "release" ]] && [[ "${{ matrix.config }}" != "debug" ]]; then
echo "enabled=false" >> $GITHUB_OUTPUT
fi
fi
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
if: steps.set_enabled.outputs.enabled == 'true'
- name: Cache Gradle Wrapper Binaries
if: steps.set_enabled.outputs.enabled == 'true'
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.gradle/wrapper/dists
key: gradle-wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
gradle-wrapper-${{ runner.os }}-
- name: Cache Gradle User Home
if: steps.set_enabled.outputs.enabled == 'true'
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.gradle/caches
key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-caches-${{ runner.os }}-
- name: Setup cached JDK
id: cache-jdk
if: steps.set_enabled.outputs.enabled == 'true'
uses: ./.github/actions/setup_cached_java
with:
version: ${{ matrix.java_version }}
arch: 'amd64'
- name: Setup OS
if: steps.set_enabled.outputs.enabled == 'true'
run: |
sudo apt-get update
sudo apt-get install -y curl zip unzip libgtest-dev libgmock-dev binutils
# Install debug symbols for system libraries
sudo apt-get install -y libc6-dbg
if [[ ${{ matrix.java_version }} =~ "-zing" ]]; then
sudo apt-get install -y g++-9 gcc-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9
sudo update-alternatives --set gcc /usr/bin/gcc-9
fi
- name: Extract Versions
if: steps.set_enabled.outputs.enabled == 'true'
uses: ./.github/actions/extract_versions
- name: Test
if: steps.set_enabled.outputs.enabled == 'true'
run: |
set +e
export KEEP_JFRS=true
export TEST_COMMIT=${{ github.sha }}
export TEST_CONFIGURATION=glibc/${{ matrix.java_version }}-${{ matrix.config }}-amd64
export LIBC=glibc
export SANITIZER=${{ matrix.config }}
GRADLEW_PREFIX=""
if [[ "${{ matrix.config }}" == "asan" ]]; then
# Reduce ASLR entropy so the JVM doesn't land in ASan's shadow range
# [0x00007fff7000-0x10007fff7fff]; 28 (the default) causes random aborts.
if ! sudo sysctl -w vm.mmap_rnd_bits=8 2>/dev/null; then
echo "::warning::Cannot set vm.mmap_rnd_bits; falling back to setarch --addr-no-randomize"
GRADLEW_PREFIX="setarch $(uname -m) --addr-no-randomize"
fi
fi
# GraalVM pre-allocates fixed memory that conflicts with ASan's shadow range
# [0x00007fff7000-0x10007fff7fff]; vm.mmap_rnd_bits tuning does not help (google/sanitizers#856).
if [[ "${{ matrix.config }}" == "asan" && "${{ matrix.java_version }}" =~ graal ]]; then
echo "::notice::Skipping ASan for GraalVM (incompatible shadow memory ranges — google/sanitizers#856)"
exit 0
fi
MAX_ATTEMPTS=1
if [[ "${{ matrix.config }}" == "asan" && "${{ matrix.java_version }}" =~ (j9|ibm) ]]; then
MAX_ATTEMPTS=2
fi
for attempt in $(seq 1 $MAX_ATTEMPTS); do
mkdir -p build/logs
${GRADLEW_PREFIX} ./gradlew -PCI -PkeepJFRs ${{ inputs.skip_gtest == true && '-Pskip-gtest' || '' }} :ddprof-test:test${{ matrix.config }} --no-daemon --parallel --build-cache --no-watch-fs 2>&1 \
| tee -a build/test-raw.log \
| python3 -u .github/scripts/filter_gradle_log.py
EXIT_CODE=${PIPESTATUS[0]}
if [ $EXIT_CODE -eq 0 ]; then break; fi
if [ $attempt -lt $MAX_ATTEMPTS ]; then
echo "::warning::Attempt $attempt failed (exit $EXIT_CODE), retrying..."
./gradlew --stop 2>/dev/null || true
fi
done
if [ $EXIT_CODE -ne 0 ]; then
echo "glibc-${{ matrix.java_version }}-${{ matrix.config }}-amd64" >> failures_glibc-${{ matrix.java_version }}-${{ matrix.config }}-amd64.txt
exit 1
fi
- name: Generate Unwinding Report
if: success() && matrix.config == 'debug'
run: |
./gradlew -PCI :ddprof-test:unwindingReport --no-daemon
- name: Add Unwinding Report to Job Summary
if: success() && matrix.config == 'debug' && hashFiles('ddprof-test/build/reports/unwinding-summary.md') != ''
run: |
echo "## 🔧 Unwinding Quality Report - ${{ matrix.java_version }} (amd64)" >> $GITHUB_STEP_SUMMARY
cat ddprof-test/build/reports/unwinding-summary.md >> $GITHUB_STEP_SUMMARY
- name: Upload build artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: success()
with:
name: (build) test-linux-glibc-amd64 (${{ matrix.java_version }}, ${{ matrix.config }})
path: build/
- name: Upload failures
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: failures-glibc-${{ matrix.java_version }}-${{ matrix.config }}-amd64
path: failures_glibc-${{ matrix.java_version }}-${{ matrix.config }}-amd64.txt
- name: Prepare reports
if: always() && steps.set_enabled.outputs.enabled == 'true'
run: |
.github/scripts/prepare_reports.sh
- name: Upload unwinding reports
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: success() && matrix.config == 'debug'
with:
name: (unwinding-reports) unwinding-linux-glibc-amd64 (${{ matrix.java_version }}, ${{ matrix.config }})
path: unwinding-reports
- name: Upload test reports
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: (test-reports) test-linux-glibc-amd64 (${{ matrix.java_version }}, ${{ matrix.config }})
path: test-reports
- name: Upload signal-safety violation log
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: signal-safety-violation-glibc-${{ matrix.java_version }}-${{ matrix.config }}-amd64
path: /tmp/signal-safety-violation.txt
if-no-files-found: ignore
- name: Upload ASan logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure() && matrix.config == 'asan'
with:
name: asan-logs-glibc-${{ matrix.java_version }}-amd64
path: /tmp/asan.log.*
if-no-files-found: ignore
test-linux-musl-amd64:
needs: [cache-jdks, filter-musl-configs]
if: needs.filter-musl-configs.outputs.has_configs == 'true'
strategy:
fail-fast: false
matrix:
java_version: [ "8-librca", "11-librca", "17-librca", "21-librca", "25-librca" ]
config: ${{ fromJson(needs.filter-musl-configs.outputs.configs) }}
runs-on: ubuntu-latest
container:
image: "alpine:3.23"
options: --cpus 4 --workdir /github/workspace -v /home/runner/work/_temp:/home/runner/work/_temp
timeout-minutes: 180
steps:
- name: Setup OS
run: |
apk update && apk add curl moreutils wget hexdump linux-headers bash make g++ clang git cppcheck jq cmake gtest-dev gmock tar binutils python3 >/dev/null
# Install debug symbols for musl libc
apk add musl-dbg
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Cache Gradle Wrapper Binaries
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.gradle/wrapper/dists
key: gradle-wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
gradle-wrapper-${{ runner.os }}-
- name: Cache Gradle User Home
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.gradle/caches
key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-caches-${{ runner.os }}-
- name: Setup cached JDK
id: cache-jdk
uses: ./.github/actions/setup_cached_java
with:
version: ${{ matrix.java_version }}
arch: 'amd64-musl'
- name: Extract Versions
uses: ./.github/actions/extract_versions
- name: Test
shell: bash
run: |
set +e
export KEEP_JFRS=true
export TEST_COMMIT=${{ github.sha }}
export TEST_CONFIGURATION=musl/${{ matrix.java_version }}-${{ matrix.config }}-amd64
# make sure the job knows it is running on musl
export LIBC=musl
export SANITIZER=${{ matrix.config }}
# due to env hell in GHA containers, we need to re-do the logic from Extract Versions here
JAVA_VERSION=$(${{ env.JAVA_TEST_HOME }}/bin/java -version 2>&1 | awk -F '"' '/version/ {
split($2, v, "[._]");
if (v[2] == "") {
# Version is like "24": assume it is major only and add .0.0
printf "%s.0.0\n", v[1]
} else if (v[1] == "1") {
# Java 8 or older: Format is "1.major.minor_update"
printf "%s.%s.%s\n", v[2], v[3], v[4]
} else {
# Java 9 or newer: Format is "major.minor.patch"
printf "%s.%s.%s\n", v[1], v[2], v[3]
}
}')
export JAVA_VERSION
echo "JAVA_VERSION=${JAVA_VERSION}"
mkdir -p build/logs
./gradlew -PCI -PkeepJFRs :ddprof-test:test${{ matrix.config }} --no-daemon --parallel --build-cache --no-watch-fs 2>&1 \
| tee -a build/test-raw.log \
| python3 -u .github/scripts/filter_gradle_log.py
EXIT_CODE=${PIPESTATUS[0]}
if [ $EXIT_CODE -ne 0 ]; then
echo "musl-${{ matrix.java_version }}-${{ matrix.config }}-amd64" >> failures_musl-${{ matrix.java_version }}-${{ matrix.config }}-amd64.txt
exit 1
fi
- name: Generate Unwinding Report
if: success() && matrix.config == 'debug'
run: |
./gradlew -PCI :ddprof-test:unwindingReport --no-daemon
- name: Add Unwinding Report to Job Summary
if: success() && matrix.config == 'debug' && hashFiles('ddprof-test/build/reports/unwinding-summary.md') != ''
run: |
echo "## 🔧 Unwinding Quality Report - ${{ matrix.java_version }} (amd64-musl)" >> $GITHUB_STEP_SUMMARY
cat ddprof-test/build/reports/unwinding-summary.md >> $GITHUB_STEP_SUMMARY
- name: Upload build artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: success()
with:
name: (build) test-linux-musl-amd64 (${{ matrix.java_version }}, ${{ matrix.config }})
path: build/
- name: Upload failures
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: failures-musl-${{ matrix.java_version }}-${{ matrix.config }}-amd64
path: failures_musl-${{ matrix.java_version }}-${{ matrix.config }}-amd64.txt
- name: Prepare reports
if: always()
run: |
.github/scripts/prepare_reports.sh
- name: Upload unwinding reports
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: success() && matrix.config == 'debug'
with:
name: (unwinding-reports) unwinding-linux-musl-amd64 (${{ matrix.java_version }}, ${{ matrix.config }})
path: unwinding-reports
- name: Upload test reports
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: (test-reports) test-linux-musl-amd64 (${{ matrix.java_version }}, ${{ matrix.config }})
path: test-reports
- name: Upload signal-safety violation log
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: signal-safety-violation-musl-${{ matrix.java_version }}-${{ matrix.config }}-amd64
path: /tmp/signal-safety-violation.txt
if-no-files-found: ignore
- name: Upload ASan logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure() && matrix.config == 'asan'
with:
name: asan-logs-musl-${{ matrix.java_version }}-amd64
path: /tmp/asan.log.*
if-no-files-found: ignore
test-linux-glibc-aarch64:
needs: cache-jdks
strategy:
fail-fast: false
matrix:
# java_version: [ "8", "8-j9", "8-zing", "11", "11-j9", "11-zing", "17", "17-j9", "17-zing", "17-graal", "21", "21-zing", "21-graal", "23", "23-graal" ]
# FIXME: Hotspot 8 and 11 versions are rather crashy in ASGCT on aarch64, so we are skipping them for now
# java_version: [ "8-j9", "8-zing", "11-j9", "11-zing", "17", "17-j9", "17-zing", "17-graal", "21", "21-zing", "21-graal", "25", "25-graal" ]
# FIXME: Zing disabled - Azul pulled public CDN access
java_version: [ "8-j9", "11-j9", "17", "17-j9", "17-graal", "21", "21-graal", "25", "25-graal" ]
config: ${{ fromJson(inputs.configuration) }}
runs-on:
group: ARM LINUX SHARED
labels: arm-4core-linux
timeout-minutes: 180
steps:
- name: Set enabled flag
id: set_enabled
run: |
echo "enabled=true" >> $GITHUB_OUTPUT
if [[ "${{ matrix.java_version }}" =~ -zing ]]; then
if [[ "${{ matrix.config }}" != "release" ]] && [[ "${{ matrix.config }}" != "debug" ]]; then
echo "enabled=false" >> $GITHUB_OUTPUT
fi
fi
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
if: steps.set_enabled.outputs.enabled == 'true'
- name: Cache Gradle Wrapper Binaries
if: steps.set_enabled.outputs.enabled == 'true'
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.gradle/wrapper/dists
key: gradle-wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
gradle-wrapper-${{ runner.os }}-
- name: Cache Gradle User Home
if: steps.set_enabled.outputs.enabled == 'true'
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.gradle/caches
key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-caches-${{ runner.os }}-
- name: Setup cached JDK
id: cache-jdk
if: steps.set_enabled.outputs.enabled == 'true'
uses: ./.github/actions/setup_cached_java
with:
version: ${{ matrix.java_version }}
arch: 'aarch64'
- name: Setup OS
if: steps.set_enabled.outputs.enabled == 'true'
run: |
sudo apt update -y
sudo apt remove -y g++
sudo apt autoremove -y
sudo apt install -y curl zip unzip clang make build-essential binutils gdb
# Install debug symbols for system libraries
sudo apt install -y libc6-dbg
if [[ ${{ matrix.java_version }} =~ "-zing" ]]; then
sudo apt -y install g++-9 gcc-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9
sudo update-alternatives --set gcc /usr/bin/gcc-9
fi
- name: Extract Versions
if: steps.set_enabled.outputs.enabled == 'true'
uses: ./.github/actions/extract_versions
- name: Test
if: steps.set_enabled.outputs.enabled == 'true'
run: |
set +e
export KEEP_JFRS=true
export TEST_COMMIT=${{ github.sha }}
export TEST_CONFIGURATION=glibc/${{ matrix.java_version }}-${{ matrix.config }}-aarch64
export LIBC=glibc
export SANITIZER=${{ matrix.config }}
GRADLEW_PREFIX=""
# For ASAN: launch a gdb watchdog that dumps all native threads before the
# 30-minute Gradle timeout kills the JVM, so we can diagnose hangs in native code.
if [[ "${{ matrix.config }}" == "asan" ]]; then
# Reduce ASLR entropy so the JVM doesn't land in ASan's shadow range; 28 causes random aborts.
if ! sudo sysctl -w vm.mmap_rnd_bits=8 2>/dev/null; then
echo "::warning::Cannot set vm.mmap_rnd_bits; falling back to setarch --addr-no-randomize"
GRADLEW_PREFIX="setarch $(uname -m) --addr-no-randomize"
fi
mkdir -p build/logs
(
sleep 1500 # 25 minutes — fires before the 30-min Gradle timeout
echo "::warning::GDB watchdog triggered after 25 minutes"
for pid in $(pgrep -f 'java.*ddprof-test'); do
echo "=== Thread dump for PID $pid ===" >> build/logs/gdb-watchdog.log
gdb -batch -ex 'thread apply all bt full' -p "$pid" >> build/logs/gdb-watchdog.log 2>&1 || true
done
) &
GDB_WATCHDOG_PID=$!
fi
# GraalVM pre-allocates fixed memory that conflicts with ASan's shadow range
# [0x00007fff7000-0x10007fff7fff]; vm.mmap_rnd_bits tuning does not help (google/sanitizers#856).
if [[ "${{ matrix.config }}" == "asan" && "${{ matrix.java_version }}" =~ graal ]]; then
echo "::notice::Skipping ASan for GraalVM (incompatible shadow memory ranges — google/sanitizers#856)"
exit 0
fi
MAX_ATTEMPTS=1
if [[ "${{ matrix.config }}" == "asan" && "${{ matrix.java_version }}" =~ (j9|ibm) ]]; then
MAX_ATTEMPTS=2
fi
for attempt in $(seq 1 $MAX_ATTEMPTS); do
mkdir -p build/logs
${GRADLEW_PREFIX} ./gradlew -PCI -PkeepJFRs ${{ inputs.skip_gtest == true && '-Pskip-gtest' || '' }} :ddprof-test:test${{ matrix.config }} --no-daemon --parallel --build-cache --no-watch-fs 2>&1 \
| tee -a build/test-raw.log \
| python3 -u .github/scripts/filter_gradle_log.py
EXIT_CODE=${PIPESTATUS[0]}
if [ $EXIT_CODE -eq 0 ]; then break; fi
if [ $attempt -lt $MAX_ATTEMPTS ]; then
echo "::warning::Attempt $attempt failed (exit $EXIT_CODE), retrying..."
./gradlew --stop 2>/dev/null || true
fi
done
# Kill the watchdog if tests finished before it fired
if [[ -n "${GDB_WATCHDOG_PID:-}" ]]; then
kill "$GDB_WATCHDOG_PID" 2>/dev/null || true
fi
if [ $EXIT_CODE -ne 0 ]; then
echo "glibc-${{ matrix.java_version }}-${{ matrix.config }}-aarch64" >> failures_glibc-${{ matrix.java_version }}-${{ matrix.config }}-aarch64.txt
exit 1
fi
- name: Generate Unwinding Report
if: success() && matrix.config == 'debug'
run: |
./gradlew -PCI :ddprof-test:unwindingReport --no-daemon
- name: Add Unwinding Report to Job Summary
if: success() && matrix.config == 'debug' && hashFiles('ddprof-test/build/reports/unwinding-summary.md') != ''
run: |
echo "## 🔧 Unwinding Quality Report - ${{ matrix.java_version }} (aarch64)" >> $GITHUB_STEP_SUMMARY
cat ddprof-test/build/reports/unwinding-summary.md >> $GITHUB_STEP_SUMMARY
- name: Upload build artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: success()
with:
name: (build) test-linux-glibc-aarch64 (${{ matrix.java_version }}, ${{ matrix.config }})
path: build/
- name: Upload failures
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: failures-glibc-${{ matrix.java_version }}-${{ matrix.config }}-aarch64
path: failures_glibc-${{ matrix.java_version }}-${{ matrix.config }}-aarch64.txt
- name: Prepare reports
if: always() && steps.set_enabled.outputs.enabled == 'true'
run: |
.github/scripts/prepare_reports.sh
- name: Upload unwinding reports
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: success() && matrix.config == 'debug'
with:
name: (unwinding-reports) unwinding-linux-glibc-aarch64 (${{ matrix.java_version }}, ${{ matrix.config }})
path: unwinding-reports
- name: Upload test reports
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: (test-reports) test-linux-glibc-aarch64 (${{ matrix.java_version }}, ${{ matrix.config }})
path: test-reports
- name: Upload signal-safety violation log
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: signal-safety-violation-glibc-${{ matrix.java_version }}-${{ matrix.config }}-aarch64
path: /tmp/signal-safety-violation.txt
if-no-files-found: ignore
- name: Upload ASan logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure() && matrix.config == 'asan'
with:
name: asan-logs-glibc-${{ matrix.java_version }}-aarch64
path: /tmp/asan.log.*
if-no-files-found: ignore
test-linux-musl-aarch64:
needs: [cache-jdks, filter-musl-configs]
if: needs.filter-musl-configs.outputs.has_configs == 'true'
strategy:
fail-fast: false
matrix:
java_version: [ "8-librca", "11-librca", "17-librca", "21-librca", "25-librca" ]
config: ${{ fromJson(needs.filter-musl-configs.outputs.configs) }}
runs-on:
group: ARM LINUX SHARED
labels: arm-4core-linux-ubuntu24.04
timeout-minutes: 180
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Cache Gradle Wrapper Binaries
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.gradle/wrapper/dists
key: gradle-wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
gradle-wrapper-${{ runner.os }}-
- name: Cache Gradle User Home
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.gradle/caches
key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-caches-${{ runner.os }}-
- name: Setup cached JDK
id: cache-jdk
uses: ./.github/actions/setup_cached_java
with:
version: ${{ matrix.java_version }}
arch: 'aarch64-musl'
- name: Extract Versions
uses: ./.github/actions/extract_versions
- name: Test
run: |
set +e
# the effective JAVA_VERSION is computed in the test_alpine_aarch64.sh script
mkdir -p build/logs
docker run --cpus 4 --rm -v /tmp:/tmp -v "${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}" -w "${GITHUB_WORKSPACE}" alpine:3.21 /bin/sh -c "
\"$GITHUB_WORKSPACE/.github/scripts/test_alpine_aarch64.sh\" \
\"${{ github.sha }}\" \"musl/${{ matrix.java_version }}-${{ matrix.config }}-aarch64\" \
\"${{ matrix.config }}\" \"${{ env.JAVA_HOME }}\" \"${{ env.JAVA_TEST_HOME }}\"
" 2>&1 \
| tee -a build/test-raw.log \
| python3 -u .github/scripts/filter_gradle_log.py
EXIT_CODE=${PIPESTATUS[0]}
if [ $EXIT_CODE -ne 0 ]; then
echo "musl-${{ matrix.java_version }}-${{ matrix.config }}-aarch64" >> failures_musl-${{ matrix.java_version }}-${{ matrix.config }}-aarch64.txt
exit 1
fi
- name: Generate Unwinding Report
if: success() && matrix.config == 'debug'
run: |
docker run --cpus 4 --rm -v /tmp:/tmp -v "${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}" -w "${GITHUB_WORKSPACE}" alpine:3.21 /bin/sh -c "
\"$GITHUB_WORKSPACE/.github/scripts/unwinding_report_alpine_aarch64.sh\" \
\"${{ github.sha }}\" \"musl/${{ matrix.java_version }}-${{ matrix.config }}-aarch64\" \
\"${{ matrix.config }}\" \"${{ env.JAVA_HOME }}\" \"${{ env.JAVA_TEST_HOME }}\"
"
- name: Add Unwinding Report to Job Summary
if: success() && matrix.config == 'debug' && hashFiles('ddprof-test/build/reports/unwinding-summary.md') != ''
run: |
echo "## 🔧 Unwinding Quality Report - ${{ matrix.java_version }} (aarch64-musl)" >> $GITHUB_STEP_SUMMARY
cat ddprof-test/build/reports/unwinding-summary.md >> $GITHUB_STEP_SUMMARY
- name: Upload build artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: success()
with:
name: (build) test-linux-musl-aarch64 (${{ matrix.java_version }}, ${{ matrix.config }})
path: build/
- name: Upload failures
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: failures-musl-${{ matrix.java_version }}-${{ matrix.config }}-aarch64
path: failures_musl-${{ matrix.java_version }}-${{ matrix.config }}-aarch64.txt
- name: Prepare reports
if: always()
run: |
.github/scripts/prepare_reports.sh
- name: Upload unwinding reports
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: success() && matrix.config == 'debug'
with:
name: (unwinding-reports) unwinding-linux-musl-aarch64 (${{ matrix.java_version }}, ${{ matrix.config }})
path: unwinding-reports
- name: Upload test reports
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: (test-reports) test-linux-musl-aarch64 (${{ matrix.java_version }}, ${{ matrix.config }})
path: test-reports
- name: Upload signal-safety violation log
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: signal-safety-violation-musl-${{ matrix.java_version }}-${{ matrix.config }}-aarch64
path: /tmp/signal-safety-violation.txt
if-no-files-found: ignore
- name: Upload ASan logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure() && matrix.config == 'asan'
with:
name: asan-logs-musl-${{ matrix.java_version }}-aarch64
path: /tmp/asan.log.*
if-no-files-found: ignore