forked from bluefireteam/audioplayers
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (97 loc) · 3.37 KB
/
build.yaml
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
name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: beta
- name: Lint (analyze and format)
run: ./scripts/lint.sh
- name: Dartdoc
run: ./scripts/dartdoc.sh
- name: Run tests
run: ./scripts/test.sh
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: beta
- name: Example App - Build web app
working-directory: ./packages/audioplayers/example
run: |
flutter pub get
flutter build web
android:
runs-on: macOS-latest
steps:
- uses: malinskiy/action-android/install-sdk@release/0.0.8
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: beta
- name: Example App - Build android APK
working-directory: ./packages/audioplayers/example
run: |
flutter pub get
flutter build apk --release
- name: Use specific Java version for sdkmanager to work
uses: joschi/setup-jdk@v2
with:
java-version: 'openjdk8'
architecture: 'x64'
- name: Download Android Emulator Image
run: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-30;google_apis;x86"
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd --force --name emu --device "Nexus 5X" -k 'system-images;android-30;google_apis;x86'
$ANDROID_HOME/emulator/emulator -list-avds
- name: "Start Android Emulator"
timeout-minutes: 10
run: |
echo "Starting emulator"
ls "$ANDROID_HOME/tools/bin/"
$ANDROID_HOME/tools/bin/sdkmanager "platform-tools" "platforms;android-30"
echo "$ANDROID_HOME/platform-tools"
ls "$ANDROID_HOME/"
ls "$ANDROID_HOME/platform-tools"
nohup $ANDROID_HOME/emulator/emulator -avd emu -no-audio -no-snapshot -no-window &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
$ANDROID_HOME/platform-tools/adb devices
echo "Emulator started"
- name: "Run Flutter Driver tests"
working-directory: ./packages/audioplayers/example
run: echo 'Skipped (WIP)'
# run: "flutter drive --target=test_driver/app.dart"
ios:
runs-on: macOS-latest
steps:
- name: List all simulators
run: "xcrun instruments -s"
- name: Start Simulator
run: |
UDID=$(xcrun instruments -s | grep "iPhone" | sed -n 1p | awk -F ' *[][]' '{ print $2 }')
echo "Using simulator $UUID"
xcrun simctl boot "${UDID:?No Simulator with this name iPhone found}"
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: beta
- name: Example App - Build iOS
working-directory: ./packages/audioplayers/example
run: |
flutter pub get
flutter build ios --release --no-codesign
- name: Run Flutter Driver tests
working-directory: ./packages/audioplayers/example
run: echo 'Skipped (WIP)'
# run: "flutter drive --target=test_driver/app.dart"