[Fix] (trace-replay): fix APK retrace CI shell execution

This commit is contained in:
2026-06-20 11:00:16 +08:00
parent d219ac3f6f
commit 1a2b337618
3 changed files with 254 additions and 80 deletions
+34 -80
View File
@@ -145,89 +145,43 @@ jobs:
sudo udevadm trigger --name-match=kvm
- name: Retrace and validate Espryt (DirectGLES)
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 35
target: google_apis
arch: x86_64
profile: pixel_6
disable-animations: true
emulator-options: -no-window -gpu swiftshader -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none
script: |
set +e
status=0
apk_file="$(find android-retrace-apks -name 'MobileGL-EsprytTrace-release.apk' -print -quit)"
printf '%s\n' "${TRACE_REPLAY_CASES}" > android-retrace-cases.txt
while IFS='|' read -r case_name trace_archive trace_file golden target_call width height tolerance crop_x crop_y crop_width crop_height fuzz_percent timeout_seconds; do
[ -n "${case_name}" ] || continue
sh android-plugin/trace-replay-ci.sh \
--apk-file "${apk_file}" \
--package top.mobilegl.plugin.espryt.trace \
--backend DirectGLES \
--result-root android-retrace-result \
--fixture-root android-retrace-fixture \
--case "${case_name}" \
--trace-archive "${trace_archive}" \
--trace-file "${trace_file}" \
--golden "${golden}" \
--target-call "${target_call}" \
--width "${width}" \
--height "${height}" \
--tolerance "${tolerance}" \
--crop-x "${crop_x}" \
--crop-y "${crop_y}" \
--crop-width "${crop_width}" \
--crop-height "${crop_height}" \
--fuzz-percent "${fuzz_percent}" \
--timeout-seconds "${timeout_seconds}" \
|| status=1
done < android-retrace-cases.txt
mkdir -p android-retrace-result/status
echo "${status}" > android-retrace-result/status/DirectGLES.status
exit 0
run: |
printf '%s\n' "${TRACE_REPLAY_CASES}" > android-retrace-cases.txt
apk_file="$(find android-retrace-apks -name 'MobileGL-EsprytTrace-release.apk' -print -quit)"
sh android-plugin/run-avd-ci.sh \
--api-level 35 \
--target google_apis \
--arch x86_64 \
--profile pixel_6 \
--gpu swiftshader \
--avd-name mobilegl-espryt \
-- sh android-plugin/run-trace-replay-cases-ci.sh \
--apk-file "${apk_file}" \
--package top.mobilegl.plugin.espryt.trace \
--backend DirectGLES \
--cases-file android-retrace-cases.txt \
--result-root android-retrace-result \
--fixture-root android-retrace-fixture
- name: Retrace and validate Magma (DirectVulkan)
if: always()
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 35
target: google_apis
arch: x86_64
profile: pixel_6
disable-animations: true
emulator-options: -no-window -gpu angle -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none
script: |
set +e
status=0
apk_file="$(find android-retrace-apks -name 'MobileGL-MagmaTrace-release.apk' -print -quit)"
printf '%s\n' "${TRACE_REPLAY_CASES}" > android-retrace-cases.txt
while IFS='|' read -r case_name trace_archive trace_file golden target_call width height tolerance crop_x crop_y crop_width crop_height fuzz_percent timeout_seconds; do
[ -n "${case_name}" ] || continue
sh android-plugin/trace-replay-ci.sh \
--apk-file "${apk_file}" \
--package top.mobilegl.plugin.magma.trace \
--backend DirectVulkan \
--result-root android-retrace-result \
--fixture-root android-retrace-fixture \
--case "${case_name}" \
--trace-archive "${trace_archive}" \
--trace-file "${trace_file}" \
--golden "${golden}" \
--target-call "${target_call}" \
--width "${width}" \
--height "${height}" \
--tolerance "${tolerance}" \
--crop-x "${crop_x}" \
--crop-y "${crop_y}" \
--crop-width "${crop_width}" \
--crop-height "${crop_height}" \
--fuzz-percent "${fuzz_percent}" \
--timeout-seconds "${timeout_seconds}" \
|| status=1
done < android-retrace-cases.txt
mkdir -p android-retrace-result/status
echo "${status}" > android-retrace-result/status/DirectVulkan.status
exit 0
run: |
printf '%s\n' "${TRACE_REPLAY_CASES}" > android-retrace-cases.txt
apk_file="$(find android-retrace-apks -name 'MobileGL-MagmaTrace-release.apk' -print -quit)"
sh android-plugin/run-avd-ci.sh \
--api-level 35 \
--target google_apis \
--arch x86_64 \
--profile pixel_6 \
--gpu angle \
--avd-name mobilegl-magma \
-- sh android-plugin/run-trace-replay-cases-ci.sh \
--apk-file "${apk_file}" \
--package top.mobilegl.plugin.magma.trace \
--backend DirectVulkan \
--cases-file android-retrace-cases.txt \
--result-root android-retrace-result \
--fixture-root android-retrace-fixture
- name: Upload Android retrace result
if: always()