forked from flutter/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodemagic.yaml
More file actions
48 lines (48 loc) · 1.91 KB
/
codemagic.yaml
File metadata and controls
48 lines (48 loc) · 1.91 KB
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
workflows:
pubgreen:
name: flutter_plugin_android_lifecycle
max_build_duration: 30
environment:
flutter: 2.0.3
scripts:
- name: Prepare summary file
script: echo "timestamp = $(date -u '+%Y-%m-%dT%TZ')" >> $HOME/summary.toml
- name: Download package
script: git clone --depth 1 --branch flutter_plugin_android_lifecycle-v2.0.1 https://github.com/flutter/plugins
- name: Install dependencies
script: |
cd plugins/packages/flutter_plugin_android_lifecycle
flutter packages pub get
retVal=$?
if [ $retVal -ne 0 ]; then
echo "android_exit_code = $retVal" >> $HOME/summary.toml
echo "ios_exit_code = $retVal" >> $HOME/summary.toml
echo "web_exit_code = $retVal" >> $HOME/summary.toml
exit $retVal
fi
on_failure: publish
- name: Run analyzer
script: |
cd plugins/packages/flutter_plugin_android_lifecycle
cat << END > analysis_options.yaml
include: package:pedantic/analysis_options.yaml
analyzer:
exclude:
- '**'
- '!lib'
END
flutter analyze 2>&1 | tee $HOME/analyze.log
- name: Build Android
script: |
cd plugins/packages/flutter_plugin_android_lifecycle/example
echo "flutter.sdk=$HOME/programs/flutter" > android/local.properties
flutter build apk --debug
retVal=$?
echo "android_exit_code = $retVal" >> $HOME/summary.toml
- name: Write results
script: |
echo "analyze_info = $(grep -ci "info" $HOME/analyze.log)" >> $HOME/summary.toml
echo "analyze_warnings = $(grep -ci "warning" $HOME/analyze.log)" >> $HOME/summary.toml
echo "analyze_errors = $(grep -ci "error" $HOME/analyze.log)" >> $HOME/summary.toml
artifacts:
- $HOME/summary.toml