This repository has been archived by the owner on Jan 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: consolidate workflows into a unified configuration for Android,…
… iOS, and Web builds
- Loading branch information
Showing
1 changed file
with
15 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,42 @@ | ||
workflows: | ||
android-workflow: | ||
name: Android Workflow | ||
unified-workflow: | ||
name: Unified Workflow | ||
instance_type: mac_mini_m2 | ||
max_build_duration: 120 | ||
environment: | ||
flutter: stable | ||
xcode: latest # <-- set to specific version e.g. 14.3, 15.0 to avoid unexpected updates. | ||
cocoapods: default | ||
scripts: | ||
- name: Set up local.properties | ||
script: | | ||
echo "flutter.sdk=$HOME/programs/flutter" > "$CM_BUILD_DIR/frontend/android/local.properties" | ||
- name: Get Flutter packages | ||
- name: Android build | ||
script: | | ||
cd frontend | ||
echo "flutter.sdk=$HOME/programs/flutter" > "$CM_BUILD_DIR/frontend/android/local.properties" | ||
flutter packages pub get | ||
- name: Flutter analyze | ||
script: | | ||
cd frontend | ||
flutter analyze | ||
- name: Flutter unit tests | ||
script: | | ||
cd frontend | ||
flutter test | ||
ignore_failure: true | ||
- name: Build AAB with Flutter | ||
script: | | ||
cd frontend | ||
flutter test || true | ||
flutter build appbundle --release | ||
artifacts: | ||
- frontend/build/**/outputs/**/*.aab | ||
- frontend/build/**/outputs/**/mapping.txt | ||
- frontend/flutter_drive.log | ||
ios-workflow: | ||
name: iOS Workflow | ||
instance_type: mac_mini_m2 | ||
max_build_duration: 120 | ||
environment: | ||
flutter: stable | ||
xcode: latest # <-- set to specific version e.g. 14.3, 15.0 to avoid unexpected updates. | ||
cocoapods: default | ||
scripts: | ||
- name: Set up code signing settings on Xcode project | ||
script: | | ||
cd frontend | ||
xcode-project use-profiles | ||
- name: Get Flutter packages | ||
- name: iOS build | ||
script: | | ||
cd frontend | ||
flutter packages pub get | ||
- name: Install pods | ||
script: | | ||
cd frontend | ||
find . -name "Podfile" -execdir pod install \; | ||
- name: Flutter analyze | ||
script: | | ||
cd frontend | ||
flutter analyze | ||
- name: Flutter unit tests | ||
script: | | ||
cd frontend | ||
flutter test | ||
ignore_failure: true | ||
- name: Flutter build ipa | ||
script: | | ||
cd frontend | ||
flutter test || true | ||
flutter build ipa --release | ||
artifacts: | ||
- frontend/build/ios/ipa/*.ipa | ||
- /tmp/xcodebuild_logs/*.log | ||
- frontend/flutter_drive.log | ||
web-workflow: | ||
name: Web app workflow | ||
max_build_duration: 10 | ||
environment: | ||
flutter: stable | ||
scripts: | ||
- name: Get Flutter packages | ||
- name: Web build | ||
script: | | ||
cd frontend | ||
flutter packages pub get | ||
- name: Flutter analyze | ||
script: | | ||
cd frontend | ||
flutter analyze | ||
- name: Flutter unit tests | ||
script: | | ||
cd frontend | ||
flutter test | ||
- name: Flutter build webapp | ||
script: | | ||
cd frontend | ||
flutter test || true | ||
flutter build web --release | ||
cd build/web | ||
7z a -r ../web.zip ./* | ||
artifacts: | ||
- frontend/build/**/outputs/**/*.aab | ||
- frontend/build/**/outputs/**/mapping.txt | ||
- frontend/build/ios/ipa/*.ipa | ||
- /tmp/xcodebuild_logs/*.log | ||
- frontend/build/web.zip | ||
- frontend/flutter_drive.log |