Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:

android-smoke:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4

Expand All @@ -94,12 +95,27 @@ jobs:
- name: Run launch smoke test
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
target: google_atd
api-level: 34
target: google_apis
arch: x86_64
cores: 4
disable-animations: true
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
script: >
./gradlew :self-shell:connectedDebugAndroidTest
-Pandroid.testInstrumentationRunnerArguments.class=ai.selflabs.selfshell.LaunchSmokeTest
--no-daemon --stacktrace
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-metrics
script: |
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d "\r") ]]; do sleep 1; done'
adb shell input keyevent 82
set +e
./gradlew :self-shell:connectedDebugAndroidTest \
-Pandroid.testInstrumentationRunnerArguments.class=ai.selflabs.selfshell.LaunchSmokeTest \
--no-daemon --stacktrace
status=$?
if [ "$status" -ne 0 ]; then
echo "Smoke test failed (exit $status); retrying once after adb settle..."
sleep 15
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d "\r") ]]; do sleep 1; done'
./gradlew :self-shell:connectedDebugAndroidTest \
-Pandroid.testInstrumentationRunnerArguments.class=ai.selflabs.selfshell.LaunchSmokeTest \
--no-daemon --stacktrace
status=$?
fi
exit "$status"
1 change: 1 addition & 0 deletions docs/CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Required checks for merging to `main` on [selflabs/SELF-OS](https://github.com/s
| Workflow | Job | What it verifies |
|----------|-----|------------------|
| [Android build](.github/workflows/android.yml) | `android` | Unit tests, debug APK, release APK (R8) |
| [Android build](.github/workflows/android.yml) | `android-smoke` | Optional emulator launch smoke test (advisory; may flake) |
| [iOS build](.github/workflows/ios.yml) | `ios` | Simulator debug/release builds + unit tests |
| [Safety scan](.github/workflows/safety-scan.yml) | `scan` | No secrets / risky patterns in tree |

Expand Down
Loading