Skip to content
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

Automated PR for Codemagic CI brick changes #8

Merged
merged 1 commit into from
Sep 20, 2024
Merged
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
82 changes: 56 additions & 26 deletions codemagic.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
workflows:
definitions:
name: Continuous Integration
environment:
flutter: stable
xcode: latest
triggering:
events:
- pull_request
- push
cancel_previous_builds: true
scripts:
- &prepare_flutter_script
name: Get Flutter dependencies
script: |
flutter clean
flutter pub get
cache:
cache_paths:
- $HOME/.pub-cache
- $HOME/.gradle/caches
- $HOME/Library/Caches/CocoaPods
definitions:
environment: &environment
flutter: stable
xcode: latest
triggering: &triggering
events:
- pull_request
- push
cancel_previous_builds: true
cache: &cache
cache_paths:
- $HOME/.pub-cache
- $HOME/.gradle/caches
- $HOME/Library/Caches/CocoaPods
scripts:
- &prepare_flutter_script
name: Get Flutter dependencies
script: |
flutter clean
flutter pub get

workflows:
validate:
name: Validate
max_build_duration: 10
instance_type: linux_x2
environment:
<<: *environment
triggering:
<<: *triggering
cache:
<<: *cache
scripts:
- *prepare_flutter_script
- name: Format
Expand All @@ -36,6 +41,12 @@ workflows:
name: Build iOS
max_build_duration: 30
instance_type: mac_mini_m2
environment:
<<: *environment
triggering:
<<: *triggering
cache:
<<: *cache
scripts:
- *prepare_flutter_script
- name: Build iOS
Expand All @@ -44,25 +55,44 @@ workflows:
build-android:
name: Build Android
max_build_duration: 30
instance_type: linux_x2
environment:
<<: *environment
android_signing:
- android_keystore
instance_type: linux_x2
- codemagic_ci_testapp_android_keystore
triggering:
<<: *triggering
cache:
<<: *cache
scripts:
- *prepare_flutter_script
- name: Set up key.properties
script: |
cat >> "$CM_BUILD_DIR/android/key.properties" <<EOF
storePassword=$CM_KEYSTORE_PASSWORD
keyPassword=$CM_KEY_PASSWORD
keyAlias=$CM_KEY_ALIAS
storeFile=$CM_KEYSTORE_PATH
EOF
- name: Build Android
script: flutter build appbundle --release --flavor production -t lib/main_production.dart

test:
name: Test and generate coverage
max_build_duration: 30
instance_type: linux_x2
environment:
<<: *environment
triggering:
<<: *triggering
cache:
<<: *cache
scripts:
- *prepare_flutter_script
- name: Install lcov and genhtml
- name: Install lcov
script: |
sudo apt-get update
sudo apt-get -y install lcov genhtml
sudo apt-get -y install lcov
- name: Run tests
script: flutter test --coverage --file-reporter json:test_results.json
- name: Generate coverage report
Expand Down