Skip to content

Commit b3affc6

Browse files
committed
update doc build ci
1. remove gen_dxd, link_roles, local_util 2. use esp-docs to build
1 parent c948f36 commit b3affc6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+281
-892
lines changed

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
stages:
2+
- build_doc
23
- pre_check
34
- build
45
- target_test
5-
- build_doc
66
- deploy
77

88
workflow:

.gitlab/ci/docs.yml

+27-30
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
1-
build_docs:
2-
extends:
3-
- .rules:build:docs
1+
variables:
2+
ESP_IDF_DOC_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.2:1-1"
3+
4+
.build_docs_template:
5+
image: $ESP_IDF_DOC_ENV_IMAGE
46
stage: build_doc
5-
image: $CI_DOCKER_REGISTRY/esp-idf-doc-env:v7
67
tags:
78
- build_docs
8-
artifacts:
9-
when: always
10-
paths:
11-
# English version of documentation
12-
- docs/en/doxygen-warning-log.txt
13-
- docs/en/sphinx-warning-log.txt
14-
- docs/en/sphinx-warning-log-sanitized.txt
15-
- docs/en/_build/html
16-
# Chinese version of documentation
17-
- docs/zh_CN/doxygen-warning-log.txt
18-
- docs/zh_CN/sphinx-warning-log.txt
19-
- docs/zh_CN/sphinx-warning-log-sanitized.txt
20-
- docs/zh_CN/_build/html
21-
expire_in: 1 mos
9+
dependencies: []
2210
script:
23-
- source /opt/pyenv/activate && pyenv global 3.6.10
24-
- pip install "setuptools<57.5.0"
25-
- pip install "funcparserlib==0.3.6"
26-
- /opt/pyenv/pyenv-1.2.16/versions/3.6.10/bin/python -m pip install --user -r docs/requirements.txt
2711
- cd docs
12+
- python -m pip install -r requirements.txt
13+
- build-docs -t $DOCTGT -bs $DOC_BUILDERS -l $DOCLANG build
2814
- ./check_lang_folder_sync.sh
29-
- cd en
30-
- make gh-linkcheck
31-
- make html
32-
- ../check_doc_warnings.sh
33-
- cd ../zh_CN
34-
- make gh-linkcheck
35-
- make html
36-
- ../check_doc_warnings.sh
15+
16+
build_docs_html:
17+
extends:
18+
- .build_docs_template
19+
- .rules:build:docs
20+
artifacts:
21+
when: always
22+
paths:
23+
- docs/_build/*/*/*.txt
24+
- docs/_build/*/*/html/*
25+
expire_in: 4 days
26+
variables:
27+
DOC_BUILDERS: "html"
28+
parallel:
29+
matrix:
30+
- DOCLANG: "en"
31+
DOCTGT: "esp32"
32+
- DOCLANG: "zh_CN"
33+
DOCTGT: "esp32"

docs/Doxyfile

+23-19
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ PROJECT_NAME = "ESP IoT Solution Guide"
2121
## and used to include in API reference documentation
2222

2323
INPUT = \
24-
../../components/bus/include/i2c_bus.h \
25-
../../components/bus/include/spi_bus.h \
26-
../../components/bus/include/i2s_lcd_driver.h \
27-
../../components/sensors/sensor_hub/include/sensor_type.h \
28-
../../components/sensors/sensor_hub/include/iot_sensor_hub.h \
29-
../../components/sensors/sensor_hub/include/hal/humiture_hal.h \
30-
../../components/sensors/sensor_hub/include/hal/imu_hal.h \
31-
../../components/sensors/sensor_hub/include/hal/light_sensor_hal.h \
32-
../../components/motor/servo/include/iot_servo.h \
33-
../../components/audio/pwm_audio/include/pwm_audio.h \
34-
../../components/audio/dac_audio/include/dac_audio.h \
35-
../../components/display/screen/screen_driver.h \
36-
../../components/display/screen/interface_driver/scr_interface_driver.h \
37-
../../components/display/touch_panel/touch_panel.h \
38-
../../components/led/led_indicator/include/led_indicator.h \
39-
../../components/button/include/iot_button.h \
40-
../../components/openai/include/OpenAI.h \
41-
../../components/usb/usb_stream/include/usb_stream.h \
42-
../../components/knob/iot_knob.h \
24+
$(PROJECT_PATH)/components/bus/include/i2c_bus.h \
25+
$(PROJECT_PATH)/components/bus/include/spi_bus.h \
26+
$(PROJECT_PATH)/components/bus/include/i2s_lcd_driver.h \
27+
$(PROJECT_PATH)/components/sensors/sensor_hub/include/sensor_type.h \
28+
$(PROJECT_PATH)/components/sensors/sensor_hub/include/iot_sensor_hub.h \
29+
$(PROJECT_PATH)/components/sensors/sensor_hub/include/hal/humiture_hal.h \
30+
$(PROJECT_PATH)/components/sensors/sensor_hub/include/hal/imu_hal.h \
31+
$(PROJECT_PATH)/components/sensors/sensor_hub/include/hal/light_sensor_hal.h \
32+
$(PROJECT_PATH)/components/motor/servo/include/iot_servo.h \
33+
$(PROJECT_PATH)/components/audio/pwm_audio/include/pwm_audio.h \
34+
$(PROJECT_PATH)/components/audio/dac_audio/include/dac_audio.h \
35+
$(PROJECT_PATH)/components/display/screen/screen_driver.h \
36+
$(PROJECT_PATH)/components/display/screen/interface_driver/scr_interface_driver.h \
37+
$(PROJECT_PATH)/components/display/touch_panel/touch_panel.h \
38+
$(PROJECT_PATH)/components/led/led_indicator/include/led_indicator.h \
39+
$(PROJECT_PATH)/components/button/include/iot_button.h \
40+
$(PROJECT_PATH)/components/openai/include/OpenAI.h \
41+
$(PROJECT_PATH)/components/usb/usb_stream/include/usb_stream.h \
42+
$(PROJECT_PATH)/components/knob/iot_knob.h \
4343

4444
## Get warnings for functions that have no documentation for their parameters or return value
4545
##
@@ -84,3 +84,7 @@ QUIET = YES
8484
##
8585
WARN_LOGFILE = "doxygen-warning-log.txt"
8686

87+
## Enable Section Tags for conditional documentation
88+
##
89+
ENABLED_SECTIONS += DOC_EXCLUDE_HEADER_SECTION ## To conditionally remove doc sections from IDF source files without affecting documentation in upstream files.
90+
ENABLED_SECTIONS += DOC_SINGLE_GROUP ## To conditionally remove groups from the documentation and create a 'flat' document without affecting documentation in upstream files.

docs/README.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Documentation Source Folder
2+
3+
This folder contains source files of **ESP-IDF documentation** available in [English](https://docs.espressif.com/projects/espressif-esp-iot-solution/en/latest/index.html) and [中文](https://docs.espressif.com/projects/espressif-esp-iot-solution/zh_CN/latest/index.html).
4+
5+
The sources do not render well in GitHub and some information is not visible at all.
6+
7+
Use actual documentation generated within about 20 minutes on each commit:
8+
9+
# Hosted Documentation
10+
11+
* English: https://docs.espressif.com/projects/espressif-esp-iot-solution/en/latest/index.html
12+
* 中文: https://docs.espressif.com/projects/espressif-esp-iot-solution/zh_CN/latest/index.html
13+
14+
The above URLs are all for the master branch latest version. Click the drop-down in the bottom left to choose a stable version or to download a PDF.
15+
16+
# Building Documentation
17+
18+
The documentation is built using the python package `esp-docs`, which can be installed by running `pip install esp-docs`. Running `build-docs --help` will give a summary of available options. For more information see the `esp-docs` documentation at https://github.com/espressif/esp-docs/blob/master/README.md
19+
20+
If you need to compile html files in this repository, you can use:
21+
22+
```
23+
build-docs -t esp32 -l zh_CN -bs html
24+
build-docs -t esp32 -l en -bs html
25+
```
26+
27+
# Preview
28+
29+
To preview the compiled html files locally:
30+
31+
* Start a local web page
32+
33+
```
34+
python3 -m http.server 8000 --directory _build/zh_CN/esp32/html
35+
```
36+
37+
* Enter the URL: http://localhost:8000/ for online preview

0 commit comments

Comments
 (0)