-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
86 lines (80 loc) · 2.29 KB
/
.travis.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
git checlanguage: generic
stages:
- name: self-test
if: type = push
- name: flutter
if: branch = master OR type = pull_request
- name: flutter_example
if: branch = master OR type = pull_request
- name: native
if: branch = master OR type = pull_request
_flutter_job_template: &_flutter_job_template
before_script:
- git clone https://github.com/flutter/flutter.git -b stable
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
script:
- flutter packages get
- flutter test
_flutter_example_job_template: &_flutter_example_job_template
before_script:
- git clone https://github.com/flutter/flutter.git -b stable
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
script:
- cd example
- flutter packages get
- flutter test
_android_job_template: &android_job_template
language: android
android:
components:
- tools
- build-tools-28.0.3
- android-28
- build-tools-29.0.5
- android-29
- extra-android-m2repository
licenses:
- 'android-sdk-license-.+'
env:
global:
- GRADLE_OPTS="-Xms128m"
- ABI="default;armeabi-v7a"
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.m2
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
before_script:
- git clone https://github.com/flutter/flutter.git -b stable
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
script:
- cd example
- flutter build apk
_ios_job_template: &ios_job_template
language: objective-c
os: osx
osx_image: xcode11.6
xcode_project: example/ios/Runner.xcworkspace
xcode_scheme: Runner
before_script:
- git clone https://github.com/flutter/flutter.git -b stable
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
script:
- cd example
- flutter build ios --no-codesign --verbose
matrix:
include:
- <<: *android_job_template
name: Build Android
stage: native
- <<: *ios_job_template
name: Build iOS
stage: native
- <<: *_flutter_job_template
name: Build Flutter
stage: flutter
- <<: *_flutter_example_job_template
name: Test Flutter Example
stage: flutter_example