Skip to content

ci(android): Reuse NDK and improve test diagnostics - #2179

Merged
jpnurmi merged 2 commits into
masterfrom
jpnurmi/ci/android
Oct 9, 2026
Merged

jpnurmi merged 2 commits into
masterfrom
jpnurmi/ci/android

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Mitigate & diagnose recent Android CI failures:

  1. Sample: reuse preinstalled ANDROID_NDK to avoid a redundant extra NDK download that can fail:
  2. Preserve logcat and add completion checks for Mono/CoreCLR failures:

The API 26 / NDK 27 job [1] failed in the CoreCLR preload test while
Gradle installed NDK `27.0.12077973`: "Archive is not a ZIP archive".
CI had already installed `27.3.13750724`, but the sample hardcoded a
different version and triggered an extra download. The rerun [2] passed.

Honor `ANDROID_NDK` in the sample, matching the library, to avoid that
extra installation. Preserve `27.0.12077973` as the default when unset.

[1] https://github.com/getsentry/sentry-native/actions/runs/37479955474/job/112325167794
[2] https://github.com/getsentry/sentry-native/actions/runs/37479955474/job/112343128296
@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.31%. Comparing base (1ae39d3) to head (51b5bc7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2179      +/-   ##
==========================================
- Coverage   75.48%   75.31%   -0.18%     
==========================================
  Files         103      103              
  Lines       28089    28089              
  Branches     5150     5150              
==========================================
- Hits        21202    21154      -48     
- Misses       5545     5589      +44     
- Partials     1342     1346       +4     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The API 35 jobs [1,2] failed with a missing Mono crash marker and a
missing CoreCLR database after reinitialization. Investigation found
that the helper ignored its exit-wait result and could lose logcat
when `pidof` returned multiple PIDs.

Require exit for handled exceptions before checking that no native
crash was captured. Make `check_exit` opt-in in that wrapper; native
crashes and unhandled exceptions already have positive capture or
exception assertions.

The API 26 job [3] logged the expected `NullReferenceException` but
failed the exit assertion. Reproducing this showed an Android crash
dialog keeping the process alive beyond 30 seconds, so requiring exit
for that scenario was incorrect.

Only apply `logcat --pid` to a single numeric PID, and include logcat
when an enabled exit check fails. The original API 35 missing-file
failures remain unexplained.

[1] https://github.com/getsentry/sentry-native/actions/runs/34113447919/job/101714695713
[2] https://github.com/getsentry/sentry-native/actions/runs/34319297419/job/102362182197
[3] https://github.com/getsentry/sentry-native/actions/runs/37810735969/job/113426600284
@jpnurmi
jpnurmi force-pushed the jpnurmi/ci/android branch from 7b16015 to 51b5bc7 Compare October 9, 2026 10:38
@jpnurmi jpnurmi changed the title ci(android): Avoid extra NDK downloads and improve test diagnostics ci(android): Reuse NDK and improve test diagnostics Oct 9, 2026
@jpnurmi
jpnurmi requested a review from JoshuaMoelans October 9, 2026 11:30
@jpnurmi
jpnurmi merged commit 56267f4 into master Oct 9, 2026
75 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/ci/android branch October 9, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants