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.
This commit is contained in:
CloudWebRTC
2023-05-17 10:59:14 +08:00
committed by GitHub
parent 1ba03065b0
commit a66bde8268
5 changed files with 122 additions and 19 deletions

View File

@ -7,34 +7,130 @@ on:
branches: [ main ]
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
dart-format-and-analyze-check:
name: Dart Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.7.12'
channel: 'stable'
cache: true
- run: flutter packages get
- run: flutter format lib/ test/ --set-exit-if-changed
- run: flutter pub run import_sorter:main --no-comments --exit-if-changed
- run: flutter analyze
- run: flutter test
- name: Start Web Build
working-directory: ./example
run: flutter build web --release
- name: Start android Build
- name: Install project dependencies
run: flutter pub get
- name: Dart Format Check
run: dart format lib/ test/ --set-exit-if-changed
- name: Import Sorter Check
run: flutter pub run import_sorter:main --no-comments --exit-if-changed
- name: Dart Analyze Check
run: flutter analyze
- name: Dart Test Check
run: flutter test
build-for-android:
name: Build for Flutter Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install project dependencies
run: flutter pub get
- name: Start Android Build
working-directory: ./example
run: flutter build apk
build-for-ios:
name: Build for Flutter iOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install project dependencies
run: flutter pub get
- name: Build for iOS
working-directory: ./example
run: flutter build ios --release --no-codesign
build-for-windows:
name: Build for flutter Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- name: Install project dependencies
run: flutter pub get
- name: Build for windows
working-directory: ./example
run: flutter build windows --release
build-for-macos:
name: Build for flutter macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- name: Install project dependencies
run: flutter pub get
- name: Build for windows
working-directory: ./example
run: flutter build macos --release
build-for-linux:
name: Build for Flutter Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install project dependencies
run: flutter pub get
- name: Install ninja-build libgtk-3-dev
run: sudo apt-get install -y ninja-build libgtk-3-dev
- name: Start Linux Build
working-directory: ./example
run: flutter build linux
build-for-web:
name: Build for Flutter Web
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install project dependencies
run: flutter pub get
- name: Start Web Build
working-directory: ./example
run: flutter build web

1
.gitignore vendored
View File

@ -6,7 +6,6 @@ pubspec.lock
example/ios/Podfile.lock
GeneratedPluginRegistrant.java
example/android/.gradle
example/android/gradle*
WorkspaceSettings.xcsettings
example/.flutter-plugins
example/android/local.properties

Binary file not shown.

View File

@ -0,0 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true

View File

@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip