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

Prepare the Dart FFI package for publish #4299

Closed
wants to merge 14 commits into from
18 changes: 18 additions & 0 deletions .github/workflows/publish-dart.yaml
mosuem marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# A CI configuration to auto-publish pub packages.

name: Publish

on:
pull_request:
branches: [ main ]
paths:
- '.github/workflows/publish-dart.yml'
- 'ffi/capi/dart/**'
push:
tags: [ '[0-9A-z]+-v[0-9]+.[0-9]+.[0-9]+' ]

jobs:
publish:
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
with:
write-comments: false
16 changes: 16 additions & 0 deletions .github/workflows/write-comments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Comment on the pull request

on:
# Trigger this workflow after the Health workflow completes. This workflow will have permissions to
# do things like create comments on the PR, even if the original workflow couldn't.
workflow_run:
workflows:
- Publish
types:
- completed

jobs:
upload:
uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main
permissions:
pull-requests: write
3 changes: 3 additions & 0 deletions ffi/capi/dart/package/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.1.0

- Initial version.
1 change: 1 addition & 0 deletions ffi/capi/dart/package/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--license TBD--
mosuem marked this conversation as resolved.
Show resolved Hide resolved
16 changes: 16 additions & 0 deletions ffi/capi/dart/package/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Dart bindings for ICU4X
[![Docs](https://docs.rs/icu/badge.svg)](https://docs.rs/icu) [![Build Status](https://github.com/unicode-org/icu4x/actions/workflows/build-test.yml/badge.svg)](https://github.com/unicode-org/icu4x/actions) [![pub package](https://img.shields.io/pub/v/icu.svg)](https://pub.dev/packages/icu) [![package publisher](https://img.shields.io/pub/publisher/icu.svg)](https://pub.dev/packages/icu/publisher)
mosuem marked this conversation as resolved.
Show resolved Hide resolved

Experimental Dart bindings for ICU4X.

Example:

```dart
main() {
mosuem marked this conversation as resolved.
Show resolved Hide resolved
//TODO: Implement build.dart, `@Native` annotations, and compiled targets storage to remove this.
init(path.absolute('path/to/dynamic/library'));

final x = FixedDecimal.fromDoubleWithLowerMagnitude(1.49403, -7);
print(x); //prints '1.4940300'
}
```
9 changes: 5 additions & 4 deletions ffi/capi/dart/package/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: icu
version: 0.0.0
repository: https://github.com/unicode-org/icu4x
version: 0.1.0
description: Dart bindings for ICU4X.
repository: https://github.com/unicode-org/icu4x/tree/main/ffi/capi/dart/package

environment:
sdk: '>=2.18.0'

dependencies:
ffi: '>=1.1.0'
ffi: ^2.1.0
robertbastian marked this conversation as resolved.
Show resolved Hide resolved

dev_dependencies:
lints: ^2.0.0
lints: ^3.0.0
test: ^1.21.0
path: ^1.0.0
2 changes: 1 addition & 1 deletion tools/make/tidy.toml
mosuem marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exit_on_error true
glob_pattern_array = array "./**/*.rs" "./**/*.yml" "./**/*.toml" "./**/*.rst" "./**/*.bat" "./**/*.c" "./**/*.cpp"

# Skip the files matching these patterns.
glob_skip_pattern_array = array "**/target/**/*" "ffi/capi/**/docs/**/*" "**/node_modules/**/*" "**/data/**/*" "ffi/gn/vendor/**/*" "ffi/gn/third_party_tools/**/*" "ffi/capi/c/examples/fixeddecimal_tiny/baked_data/**/*"
glob_skip_pattern_array = array "**/target/**/*" "ffi/capi/**/docs/**/*" "**/node_modules/**/*" "**/data/**/*" "ffi/gn/vendor/**/*" "ffi/gn/third_party_tools/**/*" "ffi/capi/c/examples/fixeddecimal_tiny/baked_data/**/*" ".github/workflows/**"

blank_line = set ""

Expand Down
Loading