Skip to content

Commit 9880420

Browse files
authored
Add CI for checking markdown format. (#161)
Signed-off-by: ChenYing Kuo <[email protected]>
1 parent c58f7ef commit 9880420

File tree

4 files changed

+56
-42
lines changed

4 files changed

+56
-42
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ jobs:
5959
- name: Gradle Test
6060
run: gradle jvmTest --info
6161

62+
markdown_lint:
63+
runs-on: ubuntu-latest
64+
steps:
65+
- uses: actions/checkout@v4
66+
- uses: DavidAnson/markdownlint-cli2-action@v18
67+
with:
68+
config: '.markdownlint.yaml'
69+
globs: '**/README.md'
70+
6271
# NOTE: In GitHub repository settings, the "Require status checks to pass
6372
# before merging" branch protection rule ensures that commits are only merged
6473
# from branches where specific status checks have passed. These checks are
@@ -67,7 +76,7 @@ jobs:
6776
ci:
6877
name: CI status checks
6978
runs-on: ubuntu-latest
70-
needs: build
79+
needs: [build, markdown_lint]
7180
if: always()
7281
steps:
7382
- name: Check whether all jobs pass

.markdownlint.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"MD013": false, # Line length limitation
3+
"MD024": false, # Allow multiple headings with the same content
4+
"MD033": false, # Enable Inline HTML
5+
"MD041": false, # Allow first line heading
6+
"MD045": false, # Allow Images have no alternate text
7+
}

README.md

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
[![License](https://img.shields.io/badge/License-EPL%202.0-blue)](https://choosealicense.com/licenses/epl-2.0/)
88
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
99

10-
1110
# Eclipse Zenoh
1211

1312
The Eclipse Zenoh: Zero Overhead Pub/sub, Store/Query and Compute.
@@ -16,29 +15,27 @@ Zenoh (pronounce _/zeno/_) unifies data in motion, data at rest and computations
1615

1716
Check the website [zenoh.io](http://zenoh.io) and the [roadmap](https://github.com/eclipse-zenoh/roadmap) for more detailed information.
1817

19-
2018
----
2119

2220
# <img src="jvm.png" alt="Java" height="150"> Java API
2321

24-
2522
This repository provides a Java compatible Kotlin binding based on the main [Zenoh implementation written in Rust](https://github.com/eclipse-zenoh/zenoh).
2623

2724
The code relies on the Zenoh JNI native library, which written in Rust and communicates with the Kotlin layer via the Java Native Interface (JNI).
2825

2926
## Documentation
3027

31-
The documentation of the API is published at https://eclipse-zenoh.github.io/zenoh-java/index.html.
28+
The documentation of the API is published at [https://eclipse-zenoh.github.io/zenoh-java/index.html](https://eclipse-zenoh.github.io/zenoh-java/index.html).
3229

3330
Alternatively, you can build it locally as [explained below](#building-the-documentation).
3431

3532
----
36-
# How to import
3733

34+
# How to import
3835

3936
:warning: Note nº1: **Breaking changes incoming**
4037

41-
With the purpose of providing an upgraded API across all the languages supported by the Zenoh ecosystem,
38+
With the purpose of providing an upgraded API across all the languages supported by the Zenoh ecosystem,
4239
we are currently releasing a series of alpha and beta versions, the latest one being currently the
4340
[1.0.0-beta.1](https://github.com/eclipse-zenoh/zenoh-java/releases/tag/1.0.0-beta.1).
4441

@@ -50,13 +47,13 @@ the time comes.
5047
:warning: Note nº2: **About the released packages**
5148

5249
The released packages can be found in the "packages" section of this repository, or in the links below:
53-
* [Android packages](https://github.com/eclipse-zenoh/zenoh-java/packages/2019754/versions)
54-
* [JVM packages](https://github.com/eclipse-zenoh/zenoh-java/packages/2017294/versions)
50+
51+
- [Android packages](https://github.com/eclipse-zenoh/zenoh-java/packages/2019754/versions)
52+
- [JVM packages](https://github.com/eclipse-zenoh/zenoh-java/packages/2017294/versions)
5553

5654
These are 'nightly' packages that need to be imported as explained in the following sections of this README.
5755
We plan to publish our packages into Maven central for the `1.0.0` stable release.
5856

59-
6057
## <img src="android-robot.png" alt="Android" height="50"> For Android applications
6158

6259
For this first version we have published a [Github package](https://github.com/eclipse-zenoh/zenoh-java/packages/2019754) with the library which can be imported on your projects.
@@ -95,6 +92,7 @@ implementation("io.zenoh:zenoh-java-android:0.11.0")
9592
### Platforms
9693

9794
The library targets the following platforms:
95+
9896
- x86
9997
- x86_64
10098
- arm
@@ -150,26 +148,27 @@ implementation("io.zenoh:zenoh-java-jvm:0.11.0")
150148

151149
For the moment, the library targets the following platforms:
152150

153-
- x86_64-unknown-linux-gnu
154-
- aarch64-unknown-linux-gnu
155-
- x86_64-apple-darwin
156-
- aarch64-apple-darwin
157-
- x86_64-pc-windows-msvc
151+
- x86_64-unknown-linux-gnu
152+
- aarch64-unknown-linux-gnu
153+
- x86_64-apple-darwin
154+
- aarch64-apple-darwin
155+
- x86_64-pc-windows-msvc
158156

159-
160-
---
157+
----
161158

162159
# How to build it
163160

164161
## What you need
165162

166163
Basically:
167-
* Rust ([Installation guide](https://doc.rust-lang.org/cargo/getting-started/installation.html))
168-
* Kotlin ([Installation guide](https://kotlinlang.org/docs/getting-started.html#backend))
169-
* Gradle ([Installation guide](https://gradle.org/install/))
164+
165+
- Rust ([Installation guide](https://doc.rust-lang.org/cargo/getting-started/installation.html))
166+
- Kotlin ([Installation guide](https://kotlinlang.org/docs/getting-started.html#backend))
167+
- Gradle ([Installation guide](https://gradle.org/install/))
170168

171169
and in case of targetting Android you'll also need:
172-
* Android SDK ([Installation guide](https://developer.android.com/about/versions/11/setup-sdk))
170+
171+
- Android SDK ([Installation guide](https://developer.android.com/about/versions/11/setup-sdk))
173172

174173
## <img src="jvm.png" alt="JVM" height="50"> JVM
175174

@@ -189,7 +188,7 @@ Once we have published the package, we should be able to find it under `~/.m2/re
189188

190189
Finally, in the `build.gradle.kts` file of the project where you intend to use this library, add mavenLocal to the list of repositories and add zenoh-java as a dependency:
191190

192-
```
191+
```kotlin
193192
repositories {
194193
mavenCentral()
195194
mavenLocal()
@@ -212,14 +211,14 @@ It can be set up by using Android Studio (go to `Preferences > Languages & Frame
212211
or alternatively it can be found [here](https://developer.android.com/ndk/downloads).
213212

214213
The native platforms we are going to target are the following ones:
215-
```
214+
216215
- x86
217216
- x86_64
218217
- arm
219218
- arm64
220-
```
221219

222220
Therefore, if they are not yet already added to the Rust toolchain, run:
221+
223222
```bash
224223
rustup target add armv7-linux-androideabi; \
225224
rustup target add i686-linux-android; \
@@ -229,8 +228,8 @@ rustup target add x86_64-linux-android
229228

230229
to install them.
231230

232-
233231
So, in order to publish the library onto Maven Local, run:
232+
234233
```bash
235234
gradle -Pandroid=true publishAndroidReleasePublicationToMavenLocal
236235
```
@@ -240,7 +239,8 @@ publish the library, containing the native binaries.
240239

241240
You should now be able to see the package under `~/.m2/repository/io/zenoh/zenoh-java-android/0.11.0`
242241
with the following files:
243-
```
242+
243+
```raw
244244
zenoh-java-android-0.11.0-sources.jar
245245
zenoh-java-android-0.11.0.aar
246246
zenoh-java-android-0.11.0.module
@@ -251,7 +251,8 @@ Now the library is published on maven local, let's now see how to import it into
251251

252252
First, we need to indicate we want to look into mavenLocal for our library, so in your top level `build.gradle.kts` you need to specify
253253
the `mavenLocal` repository:
254-
```
254+
255+
```kotlin
255256
repositories {
256257
mavenCentral()
257258
...
@@ -260,13 +261,14 @@ repositories {
260261
```
261262

262263
Then in your app's `build.gradle.kts` filen add the dependency:
263-
```
264+
265+
```kotlin
264266
implementation("io.zenoh:zenoh-java-android:0.11.0")
265267
```
266268

267269
And finally, do not forget to add the required internet permissions on your manifest!
268270

269-
```
271+
```xml
270272
<uses-permission android:name="android.permission.INTERNET" />
271273
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
272274
```
@@ -278,6 +280,7 @@ And that was it! You can now import the code from the `io.zenoh` package and use
278280
Because it's a Kotlin project, we use [Dokka](https://kotlinlang.org/docs/dokka-introduction.html) to generate the documentation.
279281

280282
In order to build it, run:
283+
281284
```bash
282285
gradle zenoh-java:dokkaHtml
283286
```
@@ -308,7 +311,7 @@ causes the logs to appear in standard output.
308311

309312
The log levels are the ones from Rust: `trace`, `info`, `debug`, `error` and `warn`.
310313

311-
---
314+
----
312315

313316
# Examples
314317

@@ -323,25 +326,20 @@ For instance in order to run the [ZPub](examples/src/main/java/io.zenoh/ZPub.jav
323326

324327
You can find more info about these examples on the [examples README file](/examples/README.md).
325328

326-
327-
328-
329-
330329
----
331330

332331
# :warning: Considerations & Future work
333332

334-
### Packaging
333+
## Packaging
335334

336335
We intend to publish this code on Maven in the short term in order to ease the installation, but for the moment, until we
337336
add some extra functionalities and test this library a bit further, we will only publish packages to Github packages.
338337

339-
### Potential API changes
340-
341-
When using this library, keep in mind the api is not fully stable. Changes are to be expected, especially for version 1.0.0.
338+
## Potential API changes
342339

340+
When using this library, keep in mind the api is not fully stable. Changes are to be expected, especially for version 1.0.0.
343341

344-
### Performance
342+
## Performance
345343

346344
The communication between the Kotlin code and the Rust code through the java native interface (JNI) has its toll on performance.
347345

examples/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44

55
## Start instructions
66

7-
8-
97
```bash
108
./gradle <example>
119
```
1210

1311
:warning: Passing arguments to these examples has not been enabled yet for this first version. Altering the Zenoh
1412
configuration for these examples must be done programmatically. :warning:
1513

16-
----
14+
----
1715

1816
## Examples description
1917

@@ -29,6 +27,7 @@ Usage:
2927
```
3028

3129
### ZSub
30+
3231
Creates a subscriber with a key expression.
3332
The subscriber will be notified of each put made on any key expression matching
3433
the subscriber's key expression, and will print this notification.
@@ -61,6 +60,7 @@ Usage:
6160
```
6261

6362
### ZDelete
63+
6464
Performs a Delete operation into a path/value into Zenoh.
6565

6666
Usage:

0 commit comments

Comments
 (0)