forked from leancodepl/patrol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
90 lines (87 loc) · 2.74 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
test_linux_task:
name: Test `patrol develop` on Linux
required_pr_labels:
- "package: patrol_cli"
container:
image: ghcr.io/cirruslabs/flutter:stable
cpu: 6
memory: 10G
kvm: "true"
env:
PATH: $HOME/.pub-cache/bin:$HOME/fvm/default/bin:$CIRRUS_WORKING_DIR/fvm:${PATH}
FLUTTER_VERSION: "3.22.0"
EMULATOR_API_LEVEL: "34"
EMULATOR_ABI: google_apis_playstore;x86_64
EMULATOR_IMAGE: system-images;android-${EMULATOR_API_LEVEL};${EMULATOR_ABI}
timeout_in: 30m
set_up_fvm_script: |
curl -LO https://github.com/fluttertools/fvm/releases/download/2.4.1/fvm-2.4.1-linux-x64.tar.gz
tar -xf fvm-2.4.1-linux-x64.tar.gz
setup_flutter_script: |
echo "y" | fvm global $FLUTTER_VERSION
fvm doctor
flutter --version
flutter precache --android
cd packages/patrol/example && flutter build apk --config-only
melos_bootstrap_script: |
dart pub global activate melos
melos bootstrap
setup_patrol_cli_script:
- dart pub global activate --source path packages/patrol_cli && patrol
setup_emulator_script: |
sdkmanager --install "$EMULATOR_IMAGE"
sdkmanager --install emulator
create_emulator_script: |
avdmanager -s create avd -n MyAVD -k "$EMULATOR_IMAGE"
cat << EOF >> ~/.android/avd/MyAVD.avd/config.ini
hw.cpu.ncore=2
hw.gpu.enabled=yes
hw.gpu.mode=swiftshader_indirect
hw.ramSize=3072
disk.dataPartition.size=6G
vm.heapSize=576
hw.lcd.density=440
hw.lcd.height=2220
hw.lcd.width=1080
EOF
start_emulator_background_script:
- $ANDROID_HOME/emulator/emulator @MyAVD -verbose -no-snapshot-save -no-window -noaudio -no-boot-anim -accel on
wait_for_emulator_script:
- android-wait-for-emulator
generate_gradle_wrapper_script: |
cd dev/e2e_app/lib
flutter pub get
flutter build apk --config-only
patrol_develop_script: |
cd dev/cli_tests
dart pub get
dart patrol_develop_test.dart
test_macos_task:
name: Test `patrol develop` on macOS
required_pr_labels:
- "package: patrol_cli"
macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
env:
PATH: $HOME/.pub-cache/bin:$HOME/fvm/default/bin:${PATH}
FLUTTER_VERSION: "3.22.0"
timeout_in: 30m
set_up_fvm_script: |
brew tap leoafarias/fvm
brew install fvm
setup_flutter_script: |
echo "y" | fvm global $FLUTTER_VERSION
fvm doctor
flutter --version
flutter precache --ios
melos_bootstrap_script: |
dart pub global activate melos
melos bootstrap
setup_patrol_cli_script:
- dart pub global activate --source path packages/patrol_cli && patrol
setup_simulator_script: |
xcrun simctl boot "iPhone 15 Pro Max"
patrol_test_script: |
cd dev/cli_tests
dart pub get
dart patrol_develop_test.dart