diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6f1b7ffc2..6b493a2ac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,6 +17,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + - name: Check Dart Format + run: bash ci/dart_pub_publish_check.sh - uses: axel-op/dart-package-analyzer@v3 id: analysis with: @@ -31,7 +36,25 @@ jobs: echo Pub Score too low. exit 1 fi - + attach_docs: + name: Attach dartdoc + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + - name: Build DartDoc 📖 + run: | + # Generate DartDoc + dart doc + # Create a zip file of the DartDoc output + zip -r agora_rtc_engine_docs.zip doc + - name: Upload DartDoc Artifact ⬆️ + uses: actions/upload-artifact@v3 + with: + name: agora_rtc_engine_docs.zip + path: agora_rtc_engine_docs.zip pub_publish_check: name: pub publish check if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 701f21c39..30a639572 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,9 @@ jobs: run: | git config user.name "${GITHUB_ACTOR}" git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - - run: | + - name: Release + id: release + run: | PUBSPEC_VERSION=$(grep 'version: ' pubspec.yaml | sed -e 's,.*: \(.*\),\1,') echo "pubspec version: ${PUBSPEC_VERSION}" @@ -42,6 +44,7 @@ jobs: --github.release \ --no-github.web \ --ci + echo "::set-output name=version::${PUBSPEC_VERSION}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish Dart Package 🚢 @@ -52,3 +55,20 @@ jobs: refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }} force: true # We have checked the `dart pub publish --dry-run` `in build.yaml`, it's ok to force publish here. skipTests: true + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + - name: Build DartDoc 📖 + run: | + dart --version + # Generate DartDoc + dart doc + + # Create a zip file of the DartDoc output + zip -r agora_rtc_engine_docs.zip doc + - name: Upload DartDoc Archive to GitHub release ⬆️ + uses: svenstaro/upload-release-action@2.6.0 + with: + file: agora_rtc_engine_docs.zip + asset_name: agora_rtc_engine_docs.zip + tag: ${{ steps.release.outputs.version }} diff --git a/lib/src/impl/platform/io/native_iris_api_engine_bindings.dart b/lib/src/impl/platform/io/native_iris_api_engine_bindings.dart index 5a5ee79bb..79222097f 100644 --- a/lib/src/impl/platform/io/native_iris_api_engine_bindings.dart +++ b/lib/src/impl/platform/io/native_iris_api_engine_bindings.dart @@ -157,8 +157,8 @@ class NativeIrisApiEngineBinding { } late final _FreeIrisVideoFrameBufferManagerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(IrisVideoFrameBufferManagerPtr)>>( + ffi + .NativeFunction>( 'FreeIrisVideoFrameBufferManager'); late final _FreeIrisVideoFrameBufferManager = _FreeIrisVideoFrameBufferManagerPtr.asFunction< @@ -297,9 +297,9 @@ class NativeIrisApiEngineBinding { } late final _DisableAllVideoFrameBufferPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - IrisVideoFrameBufferManagerPtr)>>('DisableAllVideoFrameBuffer'); + ffi + .NativeFunction>( + 'DisableAllVideoFrameBuffer'); late final _DisableAllVideoFrameBuffer = _DisableAllVideoFrameBufferPtr .asFunction(); @@ -386,8 +386,9 @@ class NativeIrisApiEngineBinding { } late final _StopDumpVideoPtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(IrisVideoFrameBufferManagerPtr)>>('StopDumpVideo'); + ffi + .NativeFunction>( + 'StopDumpVideo'); late final _StopDumpVideo = _StopDumpVideoPtr.asFunction< int Function(IrisVideoFrameBufferManagerPtr)>(); diff --git a/test_shard/fake_test_app/integration_test/generated/rtcengine_rtcengineeventhandler_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/rtcengine_rtcengineeventhandler_testcases.generated.dart index 4ac69077f..5608f2abb 100644 --- a/test_shard/fake_test_app/integration_test/generated/rtcengine_rtcengineeventhandler_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/rtcengine_rtcengineeventhandler_testcases.generated.dart @@ -5885,4 +5885,3 @@ void generatedTestCases(IrisTester irisTester) { timeout: const Timeout(Duration(minutes: 1)), ); } - diff --git a/test_shard/iris_tester/lib/src/iris_tester_bindings.dart b/test_shard/iris_tester/lib/src/iris_tester_bindings.dart index 77715e1e7..4a8092bd0 100644 --- a/test_shard/iris_tester/lib/src/iris_tester_bindings.dart +++ b/test_shard/iris_tester/lib/src/iris_tester_bindings.dart @@ -71,9 +71,9 @@ class NativeIrisTesterBinding { } late final _MockApiReturnCodePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Int32)>>('MockApiReturnCode'); + ffi + .NativeFunction, ffi.Int32)>>( + 'MockApiReturnCode'); late final _MockApiReturnCode = _MockApiReturnCodePtr.asFunction< void Function(ffi.Pointer, int)>(); diff --git a/test_shard/rendering_test/test_driver/integration_test.dart b/test_shard/rendering_test/test_driver/integration_test.dart index 18c572b67..ec614f715 100644 --- a/test_shard/rendering_test/test_driver/integration_test.dart +++ b/test_shard/rendering_test/test_driver/integration_test.dart @@ -43,7 +43,8 @@ Future main() async { } if ((Platform.environment[_saveDebugGoldenKey] ?? 'false') == 'true') { - final File debugGoldenFile = File('screenshot/$screenshotName.debug.png'); + final File debugGoldenFile = + File('screenshot/$screenshotName.debug.png'); debugGoldenFile.writeAsBytesSync(imageBytes); }