Skip to content

Commit b4559b4

Browse files
committed
Merge branch 'master' into submission-v6.0
2 parents 2510839 + 28011df commit b4559b4

File tree

3 files changed

+102
-2
lines changed

3 files changed

+102
-2
lines changed

.github/workflows/android-build-test.yml renamed to .github/workflows/android-build-test-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Android Build & Test
1+
name: Android Build & Test (Linux)
22

33
permissions:
44
contents: read
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Android Build & Test (macOS)
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches: [ master, submission-v* ]
9+
pull_request:
10+
types: [ opened, synchronize, reopened ]
11+
12+
jobs:
13+
build:
14+
name: Build Android app
15+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md
16+
runs-on: macos-15
17+
timeout-minutes: 180
18+
env:
19+
OFFICIAL_BUILD: true
20+
WITH_TFLITE: 1
21+
WITH_PIXEL: 0
22+
WITH_MEDIATEK: 0
23+
WITH_QTI: 0
24+
WITH_SAMSUNG: 0
25+
WITH_APPLE: 0
26+
BAZEL_OUTPUT_ROOT_ARG: "--output_user_root=/tmp/bazel_output"
27+
BAZEL_CACHE_ARG: "--disk_cache=/tmp/bazel_cache"
28+
FLUTTER_BUILD_NUMBER: ${{ github.run_number }}
29+
FIREBASE_ANDROID_API_KEY: ${{ secrets.FIREBASE_ANDROID_API_KEY }}
30+
FIREBASE_ANDROID_APP_ID: ${{ secrets.FIREBASE_ANDROID_APP_ID }}
31+
FIREBASE_PROJECT_ID: mobile-app-build-290400
32+
FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.FIREBASE_MESSAGING_SENDER_ID }}
33+
FIREBASE_DATABASE_URL: ${{ secrets.FIREBASE_DATABASE_URL }}
34+
FIREBASE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET }}
35+
FIREBASE_CI_USER_EMAIL: ${{ secrets.FIREBASE_CI_USER_EMAIL }}
36+
FIREBASE_CI_USER_PASSWORD: ${{ secrets.FIREBASE_CI_USER_PASSWORD }}
37+
FIREBASE_CRASHLYTICS_ENABLED: false
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
41+
- name: Cache bazel
42+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
43+
with:
44+
path: /tmp/bazel_cache
45+
key: ${{ runner.os }}-bazel_cache-${{ hashFiles('**/BUILD', '**/WORKSPACE') }}
46+
restore-keys: ${{ runner.os }}-bazel_cache-
47+
- name: Install dependencies
48+
run: |
49+
brew update --quiet || true
50+
brew install bazelisk
51+
brew install protobuf
52+
brew install cocoapods
53+
brew install [email protected]
54+
brew link --overwrite [email protected]
55+
python3.14 -m pip install --break-system-packages "numpy>=1.23,<2.0" "absl-py>=1.3,<2.0"
56+
- name: Install Flutter
57+
uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # v2.21.0
58+
with:
59+
channel: stable
60+
flutter-version: 3.19.6
61+
- name: Install protoc
62+
run: |
63+
flutter config --no-analytics && dart --disable-analytics
64+
dart pub global activate protoc_plugin ^21.1.2
65+
- name: Install Android SDK
66+
run: |
67+
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin
68+
yes | sdkmanager --licenses >/dev/null
69+
yes | sdkmanager "platform-tools" "build-tools;35.0.1" "platforms;android-34" "platforms;android-35"
70+
yes | sdkmanager "ndk;25.2.9519653"
71+
- name: Prepare Flutter
72+
run: |
73+
make flutter/prepare
74+
- name: Set env vars
75+
run: |
76+
echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/25.2.9519653" >> "$GITHUB_ENV"
77+
echo "ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/25.2.9519653" >> "$GITHUB_ENV"
78+
echo "ANDROID_NDK_VERSION=25" >> "$GITHUB_ENV"
79+
echo "ANDROID_NDK_API_LEVEL=33" >> "$GITHUB_ENV"
80+
- name: Print versions
81+
run: |
82+
env
83+
brew config
84+
flutter doctor -v
85+
- name: Build Android app
86+
run: |
87+
make flutter/android/release
88+
- name: Run unit tests
89+
run: |
90+
make flutter/test/unit
91+
- name: Archive APK with TFLite backend
92+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
93+
with:
94+
name: android-apk-tflite-${{ github.run_number }}
95+
path: output/android-apks/*-t-${{ github.run_number }}.apk
96+
retention-days: 28
97+
if-no-files-found: error

.github/workflows/ios-build-test.yml renamed to .github/workflows/ios-build-test-macos.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
name: iOS Build & Test
1+
name: iOS Build & Test (macOS)
2+
3+
permissions:
4+
contents: read
25

36
on:
47
push:

0 commit comments

Comments
 (0)