Skip to content

Commit 1176928

Browse files
committed
ci(github-pages): Join Launchpad and release checker to one job
1 parent d26aee1 commit 1176928

File tree

24 files changed

+147
-175
lines changed

24 files changed

+147
-175
lines changed

.github/ci/bsp_noglib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import sys
1111
import argparse
1212
from pathlib import Path
13-
from idf_component_tools.manifest import ManifestManager
13+
from idf_component_tools.manager import ManifestManager
1414
from update_readme_dependencies import check_bsp_readme
1515

1616
DEFINE_NOGLIB_OFF = '#define BSP_CONFIG_NO_GRAPHIC_LIB (0)'

.github/ci/release_checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def get_change_key(row):
210210
row[3] = pad_visual(row[3], 8)
211211

212212
# Table header
213-
headers = ["Component", "Version", "Released", "Changed", "Files"]
213+
headers = ["Component", "Version", "Released", "Changed", "File Types"]
214214

215215
tz = pytz.timezone("Europe/Prague")
216216
last_updated = datetime.now(tz).strftime("%d.%m.%Y %H:%M:%S %Z")

.github/ci/update_readme_dependencies.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import subprocess
1515
import urllib.request
1616
from pathlib import Path
17-
from idf_component_tools.manifest import ManifestManager
17+
from idf_component_tools.manager import ManifestManager
1818
from py_markdown_table.markdown_table import markdown_table
1919
from typing import Any
2020

@@ -81,13 +81,14 @@ def map_capability_to_driver(capability, manifest):
8181
components = []
8282
try:
8383
component_regex = capability_dict[capability]
84-
for item in manifest.dependencies:
85-
result = re.findall(component_regex, item.name)
84+
for name, dependency in manifest.dependencies.items():
85+
result = re.findall(component_regex, name)
8686
if result:
87-
version = item.version_spec if item.version_spec else ""
88-
component = item.name
87+
version = dependency if isinstance(dependency, str) else dependency.version
88+
component = name
8989
# Add hyperlinks to components (but not to IDF component)
9090
if component != "idf":
91+
component = name if name.startswith("espressif/") else f"espressif/{name}"
9192
component = "[{}]({}{})".format(component, ESP_REGISTRY_URL, component)
9293

9394
components.append((component, version))
@@ -395,7 +396,8 @@ def check_all_bsps(filenames):
395396

396397
try:
397398
check_bsp_readme(bsp_path)
398-
except Exception:
399+
except Exception as e:
400+
print(e)
399401
ret += 1
400402
return ret
401403

.github/workflows/build-examples-launchpad.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/workflows/deploy_gh_pages.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/gh-pages.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Build examples for Launchpad
2+
3+
# This job:
4+
# - Build all examples for Launchpad
5+
# - Prepare release check table
6+
# - Deploy all to github-pages (config.toml, release_checker.html)
7+
8+
on:
9+
push:
10+
branches:
11+
- master
12+
13+
jobs:
14+
15+
build-launchpad:
16+
strategy:
17+
matrix:
18+
idf_ver: ["v5.4"]
19+
runs-on: ubuntu-latest
20+
container: espressif/idf:${{ matrix.idf_ver }}
21+
steps:
22+
- name: Checkout repo
23+
uses: actions/checkout@v4
24+
with:
25+
submodules: 'recursive'
26+
27+
- name: Upgrade component manager
28+
shell: bash
29+
run: |
30+
. ${IDF_PATH}/export.sh
31+
pip install idf-component-manager==2.* --upgrade
32+
33+
- name: Action for building binaries and config.toml
34+
env:
35+
IDF_EXTRA_ACTIONS_PATH: "${{ github.workspace }}/examples"
36+
uses: espressif/[email protected]
37+
with:
38+
idf_version: ${{ matrix.idf_ver }}
39+
config_file: examples/.idf_build_apps.toml
40+
41+
- name: Upload Artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: built_files
45+
path: binaries/
46+
47+
release-check:
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Checkout repo
51+
uses: actions/checkout@v4
52+
with:
53+
fetch-depth: 0 # all git history
54+
55+
- name: Set up Python
56+
uses: actions/setup-python@v5
57+
with:
58+
python-version: '3.11'
59+
60+
- name: Run release_checker.py
61+
run: |
62+
pip install requests pyyaml tabulate wcwidth pytz
63+
mkdir site
64+
python .github/ci/release_checker.py > site/release_checker.html
65+
66+
- name: Upload Artifact
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: release_checker
70+
path: site/
71+
72+
deploy:
73+
needs:
74+
- build-launchpad
75+
- release-check
76+
77+
permissions:
78+
pages: write
79+
id-token: write
80+
81+
environment:
82+
name: github-pages
83+
url: ${{ steps.deployment.outputs.page_url }}
84+
85+
runs-on: ubuntu-latest
86+
steps:
87+
- name: Download built files
88+
uses: actions/download-artifact@v4
89+
with:
90+
name: built_files
91+
path: binaries/
92+
93+
- name: Download built files
94+
uses: actions/download-artifact@v4
95+
with:
96+
name: release_checker
97+
path: site/
98+
99+
- name: Prepare combined site
100+
run: |
101+
mkdir pages
102+
cp -r binaries/* pages/
103+
cp -r site/* pages/
104+
105+
- name: Upload combined site to GitHub Pages
106+
uses: actions/upload-pages-artifact@v4
107+
with:
108+
path: pages/
109+
110+
- name: Deploy to GitHub Pages
111+
id: deployment
112+
uses: actions/deploy-pages@v4
113+

.github/workflows/release_checker.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/upload_component_noglib.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
env:
1919
BSPs: "bsp/esp_wrover_kit bsp/esp32_s3_eye bsp/esp32_p4_function_ev_board bsp/m5stack_core_s3 bsp/m5stack_core_2 bsp/m5stack_core bsp/m5dial bsp/m5_atom_s3 bsp/esp-box-3 bsp/esp32_s3_lcd_ev_board bsp/esp32_s3_korvo_2"
2020
run: |
21-
pip install idf-component-manager==1.* py-markdown-table --upgrade
21+
pip install idf-component-manager==2.* py-markdown-table --upgrade
2222
python .github/ci/bsp_noglib.py ${BSPs}
2323
- uses: espressif/upload-components-ci-action@v2
2424
with:

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
language: python
3030
files: 'bsp/.*/include/bsp/.*\.h|bsp/.*/idf_component\.yml|bsp/.*/README\.md' # All idf_component.yml, README.md and .h files in bsp directory
3131
additional_dependencies:
32-
- idf_component_manager==1.4.2
32+
- idf_component_manager==2.4.1
3333
- py-markdown-table
3434

3535
- repo: local
@@ -40,7 +40,8 @@ repos:
4040
language: python
4141
files: ^README\.md$|^bsp/
4242
additional_dependencies:
43-
- idf_component_manager==1.4.2
43+
- PyYAML
44+
- idf_component_manager==2.4.1
4445

4546
- repo: local
4647
hooks:

bsp/esp-box-3/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ ESP32-S3-BOX-3 also uses a Type-C USB connector that provides 5 V of power input
2828

2929
| Available | Capability |Controller/Codec| Component | Version |
3030
|------------------|------------------------|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|
31-
|:heavy_check_mark:| :pager: DISPLAY | st7789, ili9341| [espressif/esp_lcd_ili9341](https://components.espressif.com/components/espressif/esp_lcd_ili9341)<br/>idf |^2.0.1<br/>>=5.3|
31+
|:heavy_check_mark:| :pager: DISPLAY | st7789, ili9341| idf<br/>[espressif/esp_lcd_ili9341](https://components.espressif.com/components/espressif/esp_lcd_ili9341) |>=5.3<br/>^2.0.1|
3232
|:heavy_check_mark:|:black_circle: LVGL_PORT| | [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^2 |
33-
|:heavy_check_mark:| :point_up: TOUCH | tt21100, gt911 |[espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911)<br/>[espressif/esp_lcd_touch_tt21100](https://components.espressif.com/components/espressif/esp_lcd_touch_tt21100)| ^1<br/>^1 |
33+
|:heavy_check_mark:| :point_up: TOUCH | tt21100, gt911 |[espressif/esp_lcd_touch_tt21100](https://components.espressif.com/components/espressif/esp_lcd_touch_tt21100)<br/>[espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911)| ^1<br/>^1 |
3434
|:heavy_check_mark:| :radio_button: BUTTONS | | [espressif/button](https://components.espressif.com/components/espressif/button) | ^4 |
3535
|:heavy_check_mark:| :musical_note: AUDIO | | [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ~1.5 |
3636
|:heavy_check_mark:| :speaker: AUDIO_SPEAKER| es8311 | | |
3737
|:heavy_check_mark:| :microphone: AUDIO_MIC | es7210 | | |
3838
|:heavy_check_mark:| :floppy_disk: SDCARD | | idf | >=5.3 |
39-
|:heavy_check_mark:| :video_game: IMU | | [icm42670](https://components.espressif.com/components/icm42670) | ^2.0.2 |
39+
|:heavy_check_mark:| :video_game: IMU | | [espressif/icm42670](https://components.espressif.com/components/espressif/icm42670) | ^2.0.2 |
4040

4141
<!-- END_DEPENDENCIES -->
4242
</div>

0 commit comments

Comments
 (0)