Skip to content

Commit a979d42

Browse files
committed
feat(launchpad): add launchpad readme txt
1 parent 981676d commit a979d42

File tree

6 files changed

+25
-8
lines changed

6 files changed

+25
-8
lines changed

.gitlab/ci/deploy.yml

-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ pack-upload_files:
9797
expire_in: 1 week
9898
rules:
9999
- if: $CI_COMMIT_REF_NAME == "master"
100-
- if: $CI_COMMIT_REF_NAME == "feat/usb_device_example_support_usb_otg"
101100
script:
102101
- pip install rtoml ruamel.yaml --upgrade
103102
- pip install idf_build_apps

components/openai/test_apps/pytest_openai.py

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
@pytest.mark.target('esp32s2')
1919
@pytest.mark.target('esp32s3')
2020
@pytest.mark.env('generic')
21+
@pytest.mark.timeout(1000)
2122
@pytest.mark.parametrize(
2223
'config',
2324
[

conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def session_tempdir() -> str:
5353
@multi_dut_argument
5454
def config(request: FixtureRequest) -> str:
5555
config_marker = list(request.node.iter_markers(name='config'))
56-
return config_marker[0].args[0] if config_marker else 'default'
56+
return config_marker[0].args[0] if config_marker else 'defaults'
5757

5858

5959
@pytest.fixture

tools/build_apps.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def main(args): # type: (argparse.Namespace) -> None
128128
)
129129
parser.add_argument(
130130
'--config',
131-
default=['sdkconfig.defaults=default', 'sdkconfig.ci.*=', '=default'],
131+
default=['sdkconfig.defaults=defaults', 'sdkconfig.ci.*=', '=defaults'],
132132
action='append',
133133
help='Adds configurations (sdkconfig file names) to build. This can either be '
134134
'FILENAME[=NAME] or FILEPATTERN. FILENAME is the name of the sdkconfig file, '

tools/ci/launchpad/generateFiles.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ def __init__(self, app):
3232
self.build_info = []
3333
# App version
3434
self.app_version = ''
35+
# App readme
36+
self.readme = ''
3537

3638
current_app = App(None)
3739

@@ -131,6 +133,9 @@ def remove_app_from_config(apps):
131133
matched_build_info.append(build_info)
132134
if matched_build_info:
133135
app['build_info'] = matched_build_info
136+
if config_apps[app_dir].get('readme'):
137+
print(config_apps[app_dir]['readme'])
138+
app['readme'] = config_apps[app_dir]['readme']
134139
new_apps.append(app)
135140

136141
return new_apps
@@ -208,6 +213,8 @@ def write_app(app):
208213
toml_obj[support_app] = {}
209214
toml_obj[support_app]['android_app_url'] = ''
210215
toml_obj[support_app]['ios_app_url'] = ''
216+
if app.get('readme'):
217+
toml_obj[support_app]['readme.text'] = app['readme']
211218
if not toml_obj[support_app].get('chipsets'):
212219
toml_obj[support_app]['chipsets'] = [f'{build_info["target"]}-{build_info["sdkconfig"]}']
213220
else:
@@ -225,14 +232,14 @@ def create_config_toml(apps):
225232

226233
# This is a workaround to remove the quotes around the image.<string> in the config.toml file as dot is not allowed in the key by default
227234
with open('binaries/config.toml', 'r') as toml_file:
228-
fixed = replace_image_string(toml_file.read())
235+
fixed = replace_image_and_readme_string(toml_file.read())
229236

230237
with open('binaries/config.toml', 'w') as toml_file:
231238
toml_file.write(fixed)
232239

233-
def replace_image_string(text):
240+
def replace_image_and_readme_string(text):
234241
# Define the regular expression pattern to find "image.<string>"
235-
pattern = r'"(image\.[\w-]+)"'
242+
pattern = r'"((image|readme)\.[\w-]+)"'
236243
# Use re.sub() to replace the matched pattern with image.<string>
237244
result = re.sub(pattern, r'\1', text)
238245
return result

tools/ci/launchpad/upload_project_config.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,37 @@
77
# sdkconfig: // sdkconfig name
88
# - b // sdkconfig.ci.a
99
# - default // sdkconfig.default
10+
# readme: // readme url must point a README.md link
11+
# <URL>
1012

1113
examples/usb/device/usb_dual_uvc_device:
1214
esp32s3:
1315
sdkconfig:
1416
- esp32s3_usb_otg
1517
esp32p4:
1618
sdkconfig:
17-
- default
19+
- defaults
20+
readme:
21+
https://raw.githubusercontent.com/espressif/esp-iot-solution/master/examples/usb/device/usb_dual_uvc_device/README.md
1822

1923
examples/usb/device/usb_webcam:
2024
esp32s3:
2125
sdkconfig:
2226
- esp32s3_eye
27+
readme:
28+
https://raw.githubusercontent.com/espressif/esp-iot-solution/master/examples/usb/device/usb_webcam/README.md
2329

2430
examples/usb/host/usb_camera_lcd_display:
2531
esp32s3:
2632
sdkconfig:
2733
- esp32s3_lcd_ev_board
34+
readme:
35+
https://raw.githubusercontent.com/espressif/esp-iot-solution/master/examples/usb/host/usb_camera_lcd_display/README.md
2836

2937
examples/usb/host/usb_camera_mic_spk:
3038
esp32s3:
3139
sdkconfig:
3240
- esp32s3_usb_otg
33-
- default
41+
- defaults
42+
readme:
43+
https://raw.githubusercontent.com/espressif/esp-iot-solution/master/examples/usb/host/usb_camera_mic_spk/README.md

0 commit comments

Comments
 (0)