forked from flutter/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
85 lines (84 loc) · 3.98 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
task:
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
container:
dockerfile: .ci/Dockerfile
cpu: 8
memory: 16G
upgrade_script:
- flutter channel master
- flutter upgrade
- git fetch origin master
activate_script: pub global activate flutter_plugin_tools
matrix:
- name: hard_coded_version
script: ./script/check_hard_coded_version.sh
- name: publishable
script: ./script/check_publish.sh
- name: test+format
install_script:
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main"
- sudo apt-get update
- sudo apt-get install -y --allow-unauthenticated clang-format-7
format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7
test_script: ./script/incremental_build.sh test
- name: analyze
script: ./script/incremental_build.sh analyze
- name: build-apks+java-test+drive-examples
env:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
create_device_script:
echo no | avdmanager -v create avd -n test -k "system-images;android-21;default;armeabi-v7a"
start_emulator_background_script:
- $ANDROID_HOME/emulator/emulator -avd test -no-audio -no-window
wait_for_emulator_script: adb wait-for-device
script:
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
# might include non-ASCII characters which makes Gradle crash.
# See: https://github.com/flutter/flutter/issues/24935
# This is a temporary workaround until we figure how to properly configure
# a UTF8 locale on Cirrus (or until the Gradle bug is fixed).
# TODO(amirh): Set the locale to UTF8.
- echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt
- echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt
- export CIRRUS_CHANGE_MESSAGE=""
- export CIRRUS_COMMIT_MESSAGE=""
- ./script/incremental_build.sh build-examples --apk
- ./script/incremental_build.sh java-test # must come after apk build
# TODO(jackson): Re-enable once Android emulators support Firebase
# https://github.com/flutter/flutter/issues/29571
# - ./script/incremental_build.sh drive-examples
- export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt`
- export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt`
task:
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
name: build-ipas+drive-examples
osx_instance:
image: mojave-xcode-10.1
env:
PATH: $PATH:/usr/local/bin
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4"
SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
setup_script:
- brew update
- brew install libimobiledevice
- brew install ideviceinstaller
- brew install ios-deploy
- pod repo update
- git clone https://github.com/flutter/flutter.git
- git fetch origin master
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
- flutter doctor
- pub global activate flutter_plugin_tools
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-12-1 | xargs xcrun simctl boot
build_script:
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
- ./script/incremental_build.sh build-examples --ipa
- ./script/incremental_build.sh drive-examples