forked from felixgabler/screenshots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
166 lines (164 loc) · 5.39 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
unit_task:
container:
image: cirrusci/flutter:stable
pub_cache:
folder: ~/.pub-cache
imagemagic_install_script:
- sudo apt-get update -y
- sudo apt-get install -y imagemagick
pub_get_script:
- pub --version
- dart --version
- pub get # because no pubspec.lock
test_script:
- pub run test test/all_tests.dart
activate_coverage_script:
- pub global activate coverage
coverage_test_script:
- script/code_coverage.sh
ios_integration_task:
osx_instance:
image: mojave-xcode-11.2.1-flutter
# image: mojave-xcode-10.1-flutter
pub_cache:
folder: ~/.pub-cache
simulators_script:
- xcrun simctl list devicetypes
- xcrun simctl list runtimes
simulators_json_script:
- xcrun simctl list devices --json
imagemagick_install_script:
- brew install imagemagick
- convert -version || echo -n
doctor_script: flutter doctor -v
activate_script: pub global activate --source path .
test_script:
- export PATH="$HOME/.pub-cache/bin:$PATH" # needed to find screenshots
- cd example
- screenshots -c screenshots_ios.yaml -v
screenshot_artifacts:
path: example/ios/fastlane/screenshots/*
android_integration_task:
container:
dockerfile: .ci/Dockerfile.x86
cpu: 4
memory: 10G
kvm: true
pub_cache:
folder: ~/.pub-cache
gradle_cache:
folder: ~/.gradle/caches
gradle_wrapper_cache:
folder: ~/.gradle/wrapper
emulator_config_script:
# - EMULATOR_NAME=Nexus_6P_API_28
- cat $HOME/.android/avd/$EMULATOR_NAME.ini
- cat $HOME/.android/avd/$EMULATOR_NAME.avd/config.ini
# - rm $HOME/.android/avd/$EMULATOR_NAME.avd/config.ini
# - |
# cat << EOF >> $HOME/.android/avd/$EMULATOR_NAME.avd/config.ini
# hw.lcd.width=1440
# hw.lcd.height=2560
# hw.device.name=Nexus 6P
# hw.device.manufacturer=Google
# avd.ini.displayname=Nexus 6P API 28
# EOF
# - |
# cat << EOF >> $HOME/.android/avd/$EMULATOR_NAME.avd/config.ini
# AvdId=$EMULATOR_NAME
# PlayStore.enabled=false
# abi.type=x86_64
# avd.ini.displayname=Nexus 6P API 28
# avd.ini.encoding=UTF-8
# disk.dataPartition.size=800M
# fastboot.chosenSnapshotFile=
# fastboot.forceChosenSnapshotBoot=no
# fastboot.forceColdBoot=no
# fastboot.forceFastBoot=yes
# hw.accelerometer=no
# hw.arc=false
# hw.audioInput=yes
# hw.battery=yes
# hw.camera.back=virtualscene
# hw.camera.front=emulated
# hw.cpu.arch=x86_64
# hw.cpu.ncore=2
# hw.dPad=no
# hw.device.hash2=MD5:210d8492b0d8f56499facd30fdda7669
# hw.device.manufacturer=Google
# hw.device.name=Nexus 6P
# hw.gps=no
# hw.gpu.enabled=yes
# hw.gpu.mode=auto
# hw.initialOrientation=Portrait
# hw.keyboard=yes
# hw.lcd.density=480
# hw.lcd.height=2560
# hw.lcd.width=1440
# hw.mainKeys=no
# hw.ramSize=1536
# hw.sdCard=yes
# hw.sensors.orientation=no
# hw.sensors.proximity=no
# hw.trackBall=no
# image.sysdir.1=system-images/android-28/default/x86_64/
# runtime.network.latency=none
# runtime.network.speed=full
# sdcard.path=$HOME/.android/avd/$EMULATOR_NAME.avd/sdcard.img
# sdcard.size=100M
# showDeviceFrame=no
# skin.dynamic=yes
# skin.name=1440x2560
# skin.path=_no_skin
# skin.path.backup=_no_skin
# tag.display=Default Android System Image
# tag.id=default
# vm.heapSize=256
# EOF
# - cat $HOME/.android/avd/$EMULATOR_NAME.avd/config.ini
# android_licenses_script:
# - yes | sdkmanager --licenses >/dev/null
start_emulator_background_script:
- sudo chown cirrus:cirrus /dev/kvm
- $ANDROID_HOME/emulator/emulator-headless -version
- $ANDROID_HOME/emulator/emulator-headless -avd $EMULATOR_NAME -no-audio -no-window -verbose
activate_script:
- pub global activate --source path .
wait_for_emulator_script:
- ./script/android-wait-for-emulator.sh
# checks made by daemon to decide if running device is emulator or real
- adb shell getprop ro.product.cpu.abi # 'x86_64' (device)
- adb shell getprop ro.hardware # 'ranchu' (emulator)
- adb shell getprop ro.build.characteristics # 'emulator' (emulator)
- adb shell getprop ro.build.version.release # '9' (emulator)
- adb shell getprop ro.build.version.sdk # '28' (emulator))
- adb shell getprop
# logcat_background_script: adb logcat -e flutter\|Observatory *:I
logcat_background_script: adb logcat -e flutter\|Observatory
doctor_script:
- flutter doctor -v
test_script:
- export PATH="$HOME/.pub-cache/bin:$PATH" # needed to find screenshots
- (cd example; screenshots -c screenshots_android.yaml -v)
screenshots_artifacts:
# path: example/android/fastlane/screenshots/*
path: "example/android/fastlane/metadata/android/*"
cleanup_before_cache_script:
- env
- pwd
- echo GRADLE_VERSION = $GRADLE_VERSION
- ls -la
- find .
- GRADLE_VERSION=$(./example/android/gradlew -version | grep Gradle | awk '{print $2}')
- echo GRADLE_VERSION = $GRADLE_VERSION
- echo $HOME
- echo ~
- find ${HOME}/.gradle/caches || echo -n
- |
if [[ ! -z "$GRADLE_VERSION" ]];
then
rm -rfv ${HOME}/.gradle/caches/$GRADLE_VERSION/
fi
- rm -rfv ${HOME}/.gradle/caches/transforms-1
- rm -rfv ${HOME}/.gradle/caches/journal-1
- find ${HOME}/.gradle/caches/ -name "*.lock" -type f -delete || echo -n