Skip to content
This repository has been archived by the owner on Jan 19, 2025. It is now read-only.

Commit

Permalink
feat: consolidate workflows into a unified configuration for Android,…
Browse files Browse the repository at this point in the history
… iOS, and Web builds
  • Loading branch information
abianche committed Jan 11, 2025
1 parent ddf75e5 commit 22ad071
Showing 1 changed file with 15 additions and 70 deletions.
85 changes: 15 additions & 70 deletions codemagic.yaml
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

0 comments on commit 22ad071

Please sign in to comment.