Skip to content

ci: use Samsung Galaxy S25 Ultra (Android 15.0) for QTI CI test #983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 25, 2025
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: 27 additions & 3 deletions .github/workflows/android-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,7 @@
BROWSERSTACK_DEVICES: >-
["Samsung Galaxy M32-11.0",
"Samsung Galaxy S24-14.0",
"Samsung Galaxy S24 Ultra-14.0",
"Samsung Galaxy Tab S10 Plus-14.0",
"Samsung Galaxy S25 Ultra-15.0",
"Google Pixel 9 Pro-15.0"]
with:
timeout_minutes: 60
Expand All @@ -309,7 +308,32 @@
command: |
bash .github/workflows/scripts/browserstack-app-automate.sh

test-android-apk-unified-mtk:
needs: build-android-apk
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up authentication for Google Cloud SDK
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_MOBILE_APP_BUILD }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
version: '>= 363.0.0'
project_id: mobile-app-build-290400
- name: Trigger Firebase Test Lab for [OnePlus DN2103](OP515BL1)
run: |
gcloud firebase test android run \
--type instrumentation \
--app $GCLOUD_BUCKET_PATH/test-main-unified.apk \
--test $GCLOUD_BUCKET_PATH/test-helper-unified.apk \
--timeout 30m \
--num-flaky-test-attempts 2 \
--device model=OP515BL1,version=33,locale=en,orientation=portrait \
--client-details=buildNumber=${{ github.run_number }}

test-android-apk-single:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
needs:
- build-android-apk
- test-android-apk-unified
Expand All @@ -328,7 +352,7 @@
- backend: "mtk"
device: "Samsung Galaxy Tab S10 Plus-14.0"
- backend: "qti"
device: "Samsung Galaxy S24 Ultra-14.0"
device: "Samsung Galaxy S25 Ultra-15.0"
- backend: "samsung"
device: "Samsung Galaxy S24-14.0"
env:
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/scripts/browserstack-app-automate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RETRY_INTERVAL=10
# API URLs
TRIGGER_URL="https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/android/build"
STATUS_URL="https://api-cloud.browserstack.com/app-automate/flutter-integration-tests/v2/android/builds"
DEVICES_URL="https://api-cloud.browserstack.com/app-automate/devices"

# Retrieve vars from environment variables
CREDENTIALS="${BROWSERSTACK_CREDENTIALS:-}"
Expand All @@ -24,13 +25,25 @@ if [[ -z "$CREDENTIALS" ]]; then
exit 1
fi

if [[ -z "$APP" || -z "$TEST_SUITE" || -z "$BUILD_TAG" || -z "$DEVICES" ]]; then
if [[ -z "$PROJECT" || -z "$APP" || -z "$TEST_SUITE" || -z "$BUILD_TAG" || -z "$DEVICES" ]]; then
echo "Error: Environment variables"\
"BROWSERSTACK_PROJECT, BROWSERSTACK_APP, BROWSERSTACK_TEST_SUITE, BROWSERSTACK_BUILD_TAG and BROWSERSTACK_DEVICES"\
"must be set."
exit 1
fi

# Function to get a list of available devices
get_available_devices() {
local response=$(curl -s -u "$CREDENTIALS" -X GET "$DEVICES_URL")
if [[ -z "$response" ]]; then
echo "Failed to fetch available devices."
return 1
fi

echo "Available devices:"
echo "$response" | jq -r '.[] | "Device: " + .device + ", OS Version: " + .os_version'
}

# Function to trigger the build
trigger_build() {
local response=$(curl -s -u "$CREDENTIALS" \
Expand Down Expand Up @@ -91,6 +104,10 @@ check_build_status() {
}

# Main
if [[ "$ACTIONS_RUNNER_DEBUG" == "true" ]]; then
get_available_devices
fi

if ! BUILD_ID=$(trigger_build); then
echo "Trigger build failed. Message: $BUILD_ID"
exit 9
Expand Down
8 changes: 8 additions & 0 deletions flutter/integration_test/expected_throughput.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const _kDN2103 = 'DN2103'; // OnePlus DN2103
const _kPixel9Pro = 'Pixel 9 Pro'; // Google Pixel 9 Pro
const _kS24 = 'SM-S921B'; // Samsung Galaxy S24
const _kS24Ultra = 'SM-S928B'; // Samsung Galaxy S24 Ultra
const _kS25Ultra = 'SM-S938B'; // Samsung Galaxy S25 Ultra
const _kS10Plus = 'SM-X826B'; // Samsung Galaxy Tab S10 Plus
const _kM32 = 'SM-M326B'; // Samsung Galaxy M32

Expand Down Expand Up @@ -58,6 +59,7 @@ const Map<String, Map<String, Interval>> _imageClassificationV2 = {
_kQtiBackend: {
_kS22Ultra: Interval(min: 250, max: 400),
_kS24Ultra: Interval(min: 800, max: 1500),
_kS25Ultra: Interval(min: 900, max: 2200),
},
_kMediatekBackend: {
_kDN2103: Interval(min: 4.5, max: 90),
Expand Down Expand Up @@ -89,6 +91,7 @@ const Map<String, Map<String, Interval>> _objectDetection = {
_kQtiBackend: {
_kS22Ultra: Interval(min: 700, max: 1400),
_kS24Ultra: Interval(min: 1800, max: 2700),
_kS25Ultra: Interval(min: 2000, max: 3500),
},
_kMediatekBackend: {
_kDN2103: Interval(min: 120, max: 210),
Expand Down Expand Up @@ -120,6 +123,7 @@ const Map<String, Map<String, Interval>> _imageSegmentationV2 = {
_kQtiBackend: {
_kS22Ultra: Interval(min: 400, max: 750),
_kS24Ultra: Interval(min: 1200, max: 1600),
_kS25Ultra: Interval(min: 1500, max: 2200),
},
_kMediatekBackend: {
_kDN2103: Interval(min: 45, max: 70),
Expand Down Expand Up @@ -151,6 +155,7 @@ const Map<String, Map<String, Interval>> _naturalLanguageProcessing = {
_kQtiBackend: {
_kS22Ultra: Interval(min: 100, max: 200),
_kS24Ultra: Interval(min: 250, max: 460),
_kS25Ultra: Interval(min: 350, max: 800),
},
_kMediatekBackend: {
_kDN2103: Interval(min: 1, max: 6),
Expand Down Expand Up @@ -182,6 +187,7 @@ const Map<String, Map<String, Interval>> _superResolution = {
_kQtiBackend: {
_kS22Ultra: Interval(min: 25, max: 75),
_kS24Ultra: Interval(min: 120, max: 180),
_kS25Ultra: Interval(min: 200, max: 340),
},
_kMediatekBackend: {
_kDN2103: Interval(min: 5, max: 15),
Expand Down Expand Up @@ -214,6 +220,7 @@ const Map<String, Map<String, Interval>> _stableDiffusion = {
_kQtiBackend: {
_kS22Ultra: Interval(min: 0, max: 100),
_kS24Ultra: Interval(min: 0, max: 100),
_kS25Ultra: Interval(min: 0, max: 100),
},
_kMediatekBackend: {
_kDN2103: Interval(min: 0, max: 100),
Expand Down Expand Up @@ -245,6 +252,7 @@ const Map<String, Map<String, Interval>> _imageClassificationOfflineV2 = {
_kQtiBackend: {
_kS22Ultra: Interval(min: 250, max: 450),
_kS24Ultra: Interval(min: 900, max: 1700),
_kS25Ultra: Interval(min: 1200, max: 2200),
},
_kMediatekBackend: {
_kDN2103: Interval(min: 4.5, max: 90),
Expand Down
Loading