forked from brianegan/flutter_architecture_samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
112 lines (109 loc) · 3.96 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
timeout_in: 30m
env:
FLUTTER_CHANNEL: stable
FLUTTER_VERSION: v1.12.13+hotfix.5
DOCKER_VERSION: v1.12.13-hotfix.5 # docker tags cannot have plus
task:
# this task should fail fast or rely on 'depends_on' for all other tasks
name: Static analysis, formatting, and unit tests
container:
image: cirrusci/flutter:$DOCKER_VERSION
pub_cache:
folder: ~/.pub-cache
activate_coverage_script: pub global activate coverage
tests_script: ./scripts/runTests.sh
task:
name: Integration Tests for $app_arch (Linux)
# don't run for PRs
only_if: $CIRRUS_PR == ''
skip: '!changesInclude(".cirrus.yml", "$app_arch/*", "$app_arch/**/*")'
env:
EMULATOR_API_LEVEL: 28
ANDROID_ABI: "default;x86"
matrix:
app_arch: bloc_flutter
app_arch: bloc_library
app_arch: built_redux
app_arch: firestore_redux
app_arch: frideos_library
app_arch: inherited_widget
app_arch: mobx
app_arch: mvc
app_arch: mvi_flutter
app_arch: mvu
app_arch: change_notifier_provider
app_arch: redux
app_arch: scoped_model
app_arch: simple_bloc_flutter
app_arch: vanilla
app_arch: states_rebuilder
container:
image: cirrusci/flutter:$DOCKER_VERSION
cpu: 4
memory: 10G
kvm: true
fix_kvm_script: sudo chown cirrus:cirrus /dev/kvm
install_images_script: sdkmanager "system-images;android-$EMULATOR_API_LEVEL;$ANDROID_ABI"
create_device_script:
echo no | avdmanager create avd --force -n test -k "system-images;android-$EMULATOR_API_LEVEL;$ANDROID_ABI"
start_emulator_background_script:
$ANDROID_HOME/emulator/emulator-headless -verbose -avd test -no-audio -no-window
pub_cache:
folder: ~/.pub-cache
wait_for_emulator_script:
- ./scripts/android-wait-for-emulator.sh
# - adb shell input keyevent 82
doctor_script: flutter doctor -v
devices_script: flutter devices
ci_script: ./scripts/ci.sh ./$app_arch || ./scripts/ci.sh ./$app_arch
task:
name: Integration Tests for $app_arch (macOS)
# don't run for PRs
only_if: $CIRRUS_PR == ''
skip: '!changesInclude(".cirrus.yml", "$app_arch/*", "$app_arch/**/*")'
env:
matrix:
app_arch: bloc_flutter
app_arch: bloc_library
app_arch: built_redux
app_arch: firestore_redux
app_arch: frideos_library
app_arch: inherited_widget
app_arch: mvc
app_arch: mvi_flutter
app_arch: mvu
app_arch: change_notifier_provider
app_arch: redux
app_arch: scoped_model
app_arch: simple_bloc_flutter
app_arch: vanilla
app_arch: states_rebuilder
osx_instance:
image: mojave-xcode-11.2.1-flutter
simulator_script:
- xcrun simctl list devicetypes
- xcrun simctl list runtimes
# create simulator
- udid=$(xcrun simctl create "iPhone X" com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-2)
# boot simulator
- xcrun simctl boot $udid
pin_flutter_script:
# - sudo gem install cocoapods # missing from mojave-xcode-11.2.1-flutter (not found)
- flutter --version
# pin to ${FLUTTER_VERSION}
- wget --quiet --output-document=flutter.zip https://storage.googleapis.com/flutter_infra/releases/${FLUTTER_CHANNEL}/macos/flutter_macos_${FLUTTER_VERSION}-${FLUTTER_CHANNEL}.zip && unzip -qq flutter.zip > /dev/null && rm flutter.zip
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- export PATH=$PWD/flutter/bin:$PWD/flutter/bin/cache/dart-sdk/bin:$PATH
- flutter --version
doctor_script:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- export PATH=$PWD/flutter/bin:$PWD/flutter/bin/cache/dart-sdk/bin:$PATH
- flutter doctor -v
devices_script:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- export PATH=$PWD/flutter/bin:$PWD/flutter/bin/cache/dart-sdk/bin:$PATH
- flutter devices
ci_script:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- export PATH=$PWD/flutter/bin:$PWD/flutter/bin/cache/dart-sdk/bin:$PATH
- ./scripts/ci.sh ./$app_arch || ./scripts/ci.sh ./$app_arch