Skip to content

Commit

Permalink
Merge pull request #862 from ZettaScaleLabs/check_markdown
Browse files Browse the repository at this point in the history
Add CI for checking markdown format.
  • Loading branch information
Mallets authored Dec 18, 2024
2 parents 2d54e44 + 1144eed commit 8974132
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,15 @@ jobs:
cmake -DCMAKE_TOOLCHAIN_FILE="../ci/toolchains/TC-x86_64-pc-windows-gnu.cmake" -DZENOHC_BUILD_WITH_SHARED_MEMORY=ON -DZENOHC_BUILD_WITH_UNSTABLE_API=ON ..
cmake --build . --target examples
markdown_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v18
with:
config: '.markdownlint.yaml'
globs: '**/README.md'

# NOTE: In GitHub repository settings, the "Require status checks to pass
# before merging" branch protection rule ensures that commits are only merged
# from branches where specific status checks have passed. These checks are
Expand All @@ -239,7 +248,7 @@ jobs:
ci:
name: CI status checks
runs-on: ubuntu-latest
needs: build
needs: [build, cross-compile-mac-os, cross-compile-ubuntu, markdown_lint]
if: always()
steps:
- name: Check whether all jobs pass
Expand Down
6 changes: 6 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"MD013": false, # Line length limitation
"MD033": false, # Enable Inline HTML
"MD041": false, # Allow first line heading
"MD045": false, # Allow Images have no alternate text
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ cmake ../zenoh-c/examples -DCMAKE_INSTALL_PREFIX=~/.local
```

## Documentation

Zenoh-c API documentation is available on [Read the Docs](https://zenoh-c.readthedocs.io/en/latest/index.html).

It can be built manually by performing the following steps:
Expand All @@ -186,6 +187,7 @@ sphinx-build -b html . _build/html
```

## Cross-Compilation

Cross-compilation can be performed using standard cmake approach as described in [[cmake-toolchains](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html)].

In addition the following project-specific options might need to be set for cross-compilation:
Expand Down Expand Up @@ -217,6 +219,7 @@ and release files will be located at
`/path/to/zenoh-c/target/x86_64-pc-windows-gnu/release`

> :warning: **WARNING** :warning: : Perhaps additional efforts are necessary, that will depend of your environment.
## Rust Version

The Rust version we use is defined in [rust-toolchain.toml](rust-toolchain.toml), which is `1.75.0`.
Expand All @@ -233,6 +236,7 @@ cmake ../zenoh-c -DZENOHC_CARGO_CHANNEL="+1.75.0"
It's necessary sometimes to build zenoh-c library with set of features different from default. For example: enable TCP and UDP only. This can be done by changing `ZENOHC_CARGO_FLAGS` parameter for cmake (notice ";" instead of space due to cmake peculiarities)

Available features can be found in [Cargo.toml](./Cargo.toml)

```bash
cmake ../zenoh-c -DZENOHC_CARGO_FLAGS="--no-default-features;--features=transport_tcp,transport_udp"
```
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
zenoh-c API documentation is available on [Read the Docs](https://zenoh-c.readthedocs.io/en/latest/index.html).

-------------------------------

## How to build it

```bash
Expand Down

0 comments on commit 8974132

Please sign in to comment.