mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-09 20:27:41 +08:00
ci(docs): add mdx linter and enable checks for PRs (#10013)
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
name: Build Docs
|
||||
name: Build Docs
|
||||
|
||||
on:
|
||||
workflow_dispatch: # allow manual triggering
|
||||
pull_request:
|
||||
paths:
|
||||
- 'docs/**'
|
||||
- 'src/**'
|
||||
- 'examples/**'
|
||||
- 'demos/**'
|
||||
- 'configs/ci/docs/**'
|
||||
- 'scripts/build_html_examples.sh'
|
||||
- 'scripts/find_version.sh'
|
||||
- 'lv_conf_template.h'
|
||||
- 'lv_version.h'
|
||||
- 'lvgl.h'
|
||||
- '.github/workflows/compile_docs.yml'
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
@@ -75,13 +89,11 @@ jobs:
|
||||
|
||||
# Tool used to convert Doxygen XML to .mdx API pages
|
||||
- name: Install doxymark
|
||||
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
|
||||
run: |
|
||||
npm install github:mutahharmkhan/doxymark
|
||||
|
||||
# Generate Documentation API pages
|
||||
- name: Generate API pages
|
||||
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
|
||||
run: |
|
||||
npx doxymark \
|
||||
--input docs/doxygen/xml \
|
||||
@@ -101,12 +113,20 @@ jobs:
|
||||
npx -p @lvgl/examples-generator lvgl-examples-check-examples --src examples
|
||||
|
||||
- name: Generate Example Documentation
|
||||
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
|
||||
run: |
|
||||
npx -p @lvgl/examples-generator lvgl-examples-gen \
|
||||
--src examples \
|
||||
--out docs/src/examples
|
||||
|
||||
- name: Install mdx linter
|
||||
run: npm i @lvgl/mdx-lint
|
||||
|
||||
- name: Run mdx linter
|
||||
run: |
|
||||
npx @lvgl/mdx-lint "docs/**/*.{md,mdx}" \
|
||||
--fail-on-warning \
|
||||
--reporter github
|
||||
|
||||
- name: Retrieve version
|
||||
id: version
|
||||
run: |
|
||||
|
||||
@@ -45,12 +45,12 @@ python ./lvgl/scripts/generate_lv_conf.py \
|
||||
--config $LV_CONF_PATH \
|
||||
--defaults lvgl/configs/ci/docs/lv_conf_docs.defaults
|
||||
|
||||
mkdir cmbuild
|
||||
cd cmbuild
|
||||
emcmake cmake .. -DLV_BUILD_CONF_PATH=$LV_CONF_PATH -DLVGL_CHOSEN_DEMO=lv_example_noop -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
emmake make -j$(nproc)
|
||||
rm -rf CMakeFiles
|
||||
cd ..
|
||||
|
||||
emcmake cmake -B cmbuild -GNinja -DLV_BUILD_CONF_PATH=$LV_CONF_PATH -DLVGL_CHOSEN_DEMO=lv_example_noop -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
cmake --build cmbuild
|
||||
|
||||
rm -rf cmbuild/CMakeFiles
|
||||
|
||||
if [ "$ARG_1" != "--symlink" ]; then
|
||||
cp -a cmbuild ../docs/built_lv_examples
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user