Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatter Check and DartDoc Upload #1383

Merged
merged 7 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- name: Check Dart Format
run: |
# Check for differences in dart format
if dart format --set-exit-if-changed .
littleGnAl marked this conversation as resolved.
Show resolved Hide resolved
then
echo "No formatting issues found."
else
echo "Formatting issues found. Please run 'dart format' to format your code."
exit 1
fi
- uses: axel-op/dart-package-analyzer@v3
id: analysis
with:
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand All @@ -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 🚢
Expand All @@ -52,3 +55,16 @@ 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
- name: Build DartDoc 📖
run: |
# Generate DartDoc
dart doc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not very sure if the action k-paxian/dart-package-publisher@master brings the dart env or not. Maybe we need to test it first.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've aded a step to build.yml to attach it to the workflow. If that works, then this one should work the same…

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's not the same, in the build.yaml, you have set up the dart env by using the action uses: dart-lang/setup-dart@v1, I think you should also add it here.


# Create a zip file of the DartDoc output
zip -r flutter-agora-docs.zip doc
- name: Upload DartDoc Archive to GitHub release ⬆️
uses: svenstaro/[email protected]
with:
file: flutter-agora-docs.zip
littleGnAl marked this conversation as resolved.
Show resolved Hide resolved
asset_name: flutter-agora-docs.zip
tag: ${{ steps.release.outputs.version }}
15 changes: 8 additions & 7 deletions lib/src/impl/platform/io/native_iris_api_engine_bindings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ class NativeIrisApiEngineBinding {
}

late final _FreeIrisVideoFrameBufferManagerPtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(IrisVideoFrameBufferManagerPtr)>>(
ffi
.NativeFunction<ffi.Void Function(IrisVideoFrameBufferManagerPtr)>>(
'FreeIrisVideoFrameBufferManager');
late final _FreeIrisVideoFrameBufferManager =
_FreeIrisVideoFrameBufferManagerPtr.asFunction<
Expand Down Expand Up @@ -297,9 +297,9 @@ class NativeIrisApiEngineBinding {
}

late final _DisableAllVideoFrameBufferPtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(
IrisVideoFrameBufferManagerPtr)>>('DisableAllVideoFrameBuffer');
ffi
.NativeFunction<ffi.Void Function(IrisVideoFrameBufferManagerPtr)>>(
'DisableAllVideoFrameBuffer');
late final _DisableAllVideoFrameBuffer = _DisableAllVideoFrameBufferPtr
.asFunction<void Function(IrisVideoFrameBufferManagerPtr)>();

Expand Down Expand Up @@ -386,8 +386,9 @@ class NativeIrisApiEngineBinding {
}

late final _StopDumpVideoPtr = _lookup<
ffi.NativeFunction<
ffi.Int32 Function(IrisVideoFrameBufferManagerPtr)>>('StopDumpVideo');
ffi
.NativeFunction<ffi.Int32 Function(IrisVideoFrameBufferManagerPtr)>>(
'StopDumpVideo');
late final _StopDumpVideo = _StopDumpVideoPtr.asFunction<
int Function(IrisVideoFrameBufferManagerPtr)>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5885,4 +5885,3 @@ void generatedTestCases(IrisTester irisTester) {
timeout: const Timeout(Duration(minutes: 1)),
);
}

6 changes: 3 additions & 3 deletions test_shard/iris_tester/lib/src/iris_tester_bindings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ class NativeIrisTesterBinding {
}

late final _MockApiReturnCodePtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(
ffi.Pointer<ffi.Int8>, ffi.Int32)>>('MockApiReturnCode');
ffi
.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Int8>, ffi.Int32)>>(
'MockApiReturnCode');
late final _MockApiReturnCode = _MockApiReturnCodePtr.asFunction<
void Function(ffi.Pointer<ffi.Int8>, int)>();

Expand Down
3 changes: 2 additions & 1 deletion test_shard/rendering_test/test_driver/integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ Future<void> 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);
}

Expand Down
Loading