forked from littleGnAl/accounting-multiplatform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
103 lines (91 loc) · 2.83 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
flutter_container: &flutter_container
container:
image: cirrusci/flutter:latest
cpu: 8
memory: 16G
flutter_macos_container: &flutter_macos_container
osx_instance:
image: catalina-xcode-12.1
pub_cache: &pub_cache
pub_cache:
folder: ~/.pub-cache
fingerprint_script: cat pubspec.lock
gen_gradle_cache_key: &gen_gradle_cache_key
gen_gradle_cache_key_script: bash ci/gradle_checksum.sh gradle_checksum.txt
# https://cirrus-ci.org/examples/#caching
cleanup_gradle_before_cache: &cleanup_gradle_before_cache
cleanup_gradle_before_cache_script: bash ci/gradle_cache_cleanup.sh
gradle_cache: &gradle_cache
gradle_cache:
folder: ~/.gradle/caches
fingerprint_script:
- cat gradle_checksum.txt
gradle_wrapper_cache:
folder: ~/.gradle/wrapper
fingerprint_script: cat android/gradle/wrapper/gradle-wrapper.properties
konan_dependencies_cache:
folder: ~/.konan/dependencies
fingerprint_script: echo "konan"; cat gradle_checksum.txt
build_cache: &build_cache
build_cache:
folder: ./build
fingerprint_script: echo ${CIRRUS_BRANCH}-${CIRRUS_CHANGE_IN_REPO}
build_runner_code_cache: &build_runner_code_cache
build_runner_code_cache:
folder: ./lib
fingerprint_script: echo ${CIRRUS_BRANCH}-${CIRRUS_CHANGE_IN_REPO}
<<: *flutter_container
check_code_style_task:
<<: *pub_cache
<<: *gen_gradle_cache_key
<<: *gradle_cache
flutter_doctor_script: flutter doctor
dartfmt_script: bash ci/dartfmt_check.sh
ktlint_script:
- flutter packages get
- cd android
- ./gradlew ktlint
<<: *cleanup_gradle_before_cache
flutter_test_task:
<<: *pub_cache
<<: *build_runner_code_cache
<<: *build_cache
depends_on:
- check_code_style
flutter_test_script:
- flutter packages get
- flutter packages pub run build_runner build --delete-conflicting-outputs
- flutter test
flutter_build_android_apk_task:
<<: *pub_cache
<<: *build_runner_code_cache
<<: *gen_gradle_cache_key
<<: *gradle_cache
depends_on:
- flutter_test
flutter_build_apk_script:
- flutter packages get
- flutter packages pub run build_runner build --delete-conflicting-outputs
- flutter build apk --debug
<<: *cleanup_gradle_before_cache
flutter_build_ios_debug_no_codesign_task:
<<: *flutter_macos_container
<<: *pub_cache
<<: *build_runner_code_cache
<<: *gen_gradle_cache_key
<<: *gradle_cache
depends_on:
- flutter_test
common_module_build_script:
- flutter packages get
- flutter packages pub run build_runner build --delete-conflicting-outputs
- cd android
- ./gradlew :common:build
install_cocoapods_script:
- sudo gem install cocoapods
- cd ios
- pod install
# https://github.com/flutter/flutter/issues/24078
flutter_build_ios_debug_script:
- flutter build ios --no-codesign --simulator
<<: *cleanup_gradle_before_cache