Skip to content

Commit a66bde8

Browse files
authored
fix github actions. (#1357)
* update. * Delete libwebrtc.aar * update. * fix compiler for linux. * add workflow for windows/macos. * add workflow for windows/macos/linux/android/ios/web. * update.
1 parent 1ba0306 commit a66bde8

File tree

5 files changed

+121
-18
lines changed

5 files changed

+121
-18
lines changed

.github/workflows/build.yml

+113-17
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,130 @@ on:
77
branches: [ main ]
88

99
jobs:
10-
test:
11-
name: Test on ${{ matrix.os }}
12-
runs-on: ${{ matrix.os }}
13-
strategy:
14-
matrix:
15-
os: [ubuntu-latest]
10+
dart-format-and-analyze-check:
11+
name: Dart Format Check
12+
runs-on: ubuntu-latest
1613

1714
steps:
1815
- uses: actions/checkout@v2
1916
- uses: actions/setup-java@v1
2017
with:
2118
java-version: '12.x'
19+
- uses: actions/checkout@v2
20+
- uses: subosito/flutter-action@v2
21+
with:
22+
channel: 'stable'
23+
- name: Install project dependencies
24+
run: flutter pub get
25+
- name: Dart Format Check
26+
run: dart format lib/ test/ --set-exit-if-changed
27+
- name: Import Sorter Check
28+
run: flutter pub run import_sorter:main --no-comments --exit-if-changed
29+
- name: Dart Analyze Check
30+
run: flutter analyze
31+
- name: Dart Test Check
32+
run: flutter test
33+
34+
build-for-android:
35+
name: Build for Flutter Android
36+
runs-on: ubuntu-latest
37+
38+
steps:
39+
- uses: actions/checkout@v2
40+
- uses: actions/setup-java@v1
41+
with:
42+
java-version: '12.x'
43+
- uses: actions/checkout@v2
44+
- uses: subosito/flutter-action@v2
45+
with:
46+
channel: 'stable'
47+
- name: Install project dependencies
48+
run: flutter pub get
49+
- name: Start Android Build
50+
working-directory: ./example
51+
run: flutter build apk
52+
53+
build-for-ios:
54+
name: Build for Flutter iOS
55+
runs-on: macos-latest
56+
57+
steps:
58+
- uses: actions/checkout@v2
59+
- uses: subosito/flutter-action@v2
60+
with:
61+
channel: 'stable'
62+
- name: Install project dependencies
63+
run: flutter pub get
64+
- name: Build for iOS
65+
working-directory: ./example
66+
run: flutter build ios --release --no-codesign
67+
68+
build-for-windows:
69+
name: Build for flutter Windows
70+
runs-on: windows-latest
71+
72+
steps:
73+
- uses: actions/checkout@v2
2274
- uses: subosito/flutter-action@v1
2375
with:
24-
flutter-version: '3.7.12'
2576
channel: 'stable'
26-
cache: true
27-
- run: flutter packages get
28-
- run: flutter format lib/ test/ --set-exit-if-changed
29-
- run: flutter pub run import_sorter:main --no-comments --exit-if-changed
30-
- run: flutter analyze
31-
- run: flutter test
32-
- name: Start Web Build
77+
- name: Install project dependencies
78+
run: flutter pub get
79+
- name: Build for windows
3380
working-directory: ./example
34-
run: flutter build web --release
35-
- name: Start android Build
81+
run: flutter build windows --release
82+
83+
build-for-macos:
84+
name: Build for flutter macOS
85+
runs-on: macos-latest
86+
87+
steps:
88+
- uses: actions/checkout@v2
89+
- uses: subosito/flutter-action@v1
90+
with:
91+
channel: 'stable'
92+
- name: Install project dependencies
93+
run: flutter pub get
94+
- name: Build for windows
3695
working-directory: ./example
37-
run: flutter build apk
96+
run: flutter build macos --release
97+
98+
build-for-linux:
99+
name: Build for Flutter Linux
100+
runs-on: ubuntu-latest
101+
102+
steps:
103+
- uses: actions/checkout@v2
104+
- uses: actions/setup-java@v1
105+
with:
106+
java-version: '12.x'
107+
- uses: actions/checkout@v2
108+
- uses: subosito/flutter-action@v2
109+
with:
110+
channel: 'stable'
111+
- name: Install project dependencies
112+
run: flutter pub get
113+
- name: Install ninja-build libgtk-3-dev
114+
run: sudo apt-get install -y ninja-build libgtk-3-dev
38115
- name: Start Linux Build
39116
working-directory: ./example
40117
run: flutter build linux
118+
119+
build-for-web:
120+
name: Build for Flutter Web
121+
runs-on: ubuntu-latest
122+
123+
steps:
124+
- uses: actions/checkout@v2
125+
- uses: actions/setup-java@v1
126+
with:
127+
java-version: '12.x'
128+
- uses: actions/checkout@v2
129+
- uses: subosito/flutter-action@v2
130+
with:
131+
channel: 'stable'
132+
- name: Install project dependencies
133+
run: flutter pub get
134+
- name: Start Web Build
135+
working-directory: ./example
136+
run: flutter build web

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ pubspec.lock
66
example/ios/Podfile.lock
77
GeneratedPluginRegistrant.java
88
example/android/.gradle
9-
example/android/gradle*
109
WorkspaceSettings.xcsettings
1110
example/.flutter-plugins
1211
example/android/local.properties

android/libwebrtc.aar

-11 MB
Binary file not shown.

example/android/gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
org.gradle.jvmargs=-Xmx1536M
2+
android.useAndroidX=true
3+
android.enableJetifier=true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
zipStoreBase=GRADLE_USER_HOME
4+
zipStorePath=wrapper/dists
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

0 commit comments

Comments
 (0)