Skip to content

Commit ad668c7

Browse files
authored
Merge pull request #706 from espressif/petr/ci/refactor
Petr/ci/refactor
2 parents 8d2470c + b109273 commit ad668c7

File tree

154 files changed

+1441
-848
lines changed

Some content is hidden

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

154 files changed

+1441
-848
lines changed

.github/ci/update_readme_dependencies.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
#
3-
# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
3+
# SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD
44
# SPDX-License-Identifier: Apache-2.0
55

66
"""
@@ -291,13 +291,6 @@ def get_examples_table(bsp_name):
291291
return active_table
292292

293293

294-
def index_regexp(yourlist, yourstring):
295-
for i, line in enumerate(yourlist):
296-
if yourstring in line:
297-
return i
298-
return -1
299-
300-
301294
def check_bsp_readme(bsp_path) -> Any:
302295
# Get list of capabilities and dependencies of this BSP
303296
bsp_name = bsp_path.stem if not bsp_path.stem.endswith('_noglib') else bsp_path.stem[:-7]
@@ -362,7 +355,7 @@ def check_bsp_readme(bsp_path) -> Any:
362355
# UPDATE BENCHMARK TABLE
363356
try:
364357
benchmark_path = BENCHMARK_RELEASE_URL + "benchmark_" + bsp_name.replace('-', '_') + ".md"
365-
with urllib.request.urlopen(benchmark_path) as response:
358+
with urllib.request.urlopen(benchmark_path, timeout=10) as response:
366359
benchmark_content = response.read().decode("utf-8")
367360
pattern = re.compile(
368361
rf"{BENCHMARK_START}.*?{BENCHMARK_END}", re.DOTALL
@@ -382,6 +375,8 @@ def check_bsp_readme(bsp_path) -> Any:
382375
print(f"Markers benchmark not in {bsp_name} README.md")
383376
except urllib.error.HTTPError:
384377
print(f"Benchmarks for {bsp_name} does not exist")
378+
except (urllib.error.URLError, TimeoutError) as e:
379+
print(f"[WARNING] Could not fetch benchmarks for {bsp_name} (Network/Timeout): {e}")
385380
except Exception as e:
386381
print(f"[WARNING] Failed to update benchmarks: {e}")
387382

.github/workflows/build-run-applications.yml

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ name: Build ESP-BSP apps
66
on:
77
pull_request:
88
types: [opened, reopened, synchronize, labeled]
9+
paths-ignore:
10+
- '*.md'
911
push:
1012
branches:
1113
- master
14+
paths-ignore:
15+
- '*.md'
1216
schedule:
1317
- cron: '0 0 * * *' # every day at midnight
1418
workflow_dispatch:
@@ -32,6 +36,8 @@ jobs:
3236
env:
3337
component_manager_ver: "2.2.*"
3438
idf_build_apps_ver: "2.10.1"
39+
outputs:
40+
ignored_failure: ${{ steps.ignored-failure.outputs.failed }}
3541
strategy:
3642
matrix:
3743
idf_ver:
@@ -77,26 +83,15 @@ jobs:
7783
idf-build-apps find ${{env.ALL_CHANGED_FILES}}
7884
idf-build-apps build --parallel-count ${{ matrix.parallel_count }} --parallel-index ${{ matrix.parallel_index }} ${{env.ALL_CHANGED_FILES}} --collect-app-info build_info_${{ matrix.idf_ver }}_${{ matrix.parallel_index }}.json
7985
80-
# Warning, if failed with master
81-
- name: Warn if latest build failed
86+
- name: Save and write the outcome of an ignored failing job
87+
id: ignored-failure
8288
if: ${{ github.event_name == 'pull_request' && steps.buildapps.outcome == 'failure' && matrix.allow_fail == true }}
8389
run: |
90+
echo "failed=true" >> "$GITHUB_OUTPUT"
8491
echo "::warning::Build failed for idf_ver=${{ matrix.idf_ver }} (ignored because it's '${{ matrix.idf_ver }}')"
8592
echo "### ⚠️ Build failed for idf_ver=${{ matrix.idf_ver }}" >> $GITHUB_STEP_SUMMARY
8693
echo "This failure was ignored (continue-on-error enabled)." >> $GITHUB_STEP_SUMMARY
8794
88-
# Warning, if failed with master
89-
- name: Warn if latest build failed Comment PR
90-
if: ${{ github.event_name == 'pull_request' && steps.buildapps.outcome == 'failure' && matrix.allow_fail == true }}
91-
uses: thollander/actions-comment-pull-request@v3
92-
with:
93-
comment-tag: build_warning_${{ matrix.idf_ver }}_${{ matrix.parallel_index }}
94-
mode: recreate
95-
message: |
96-
### ⚠️ Build failed for idf_ver=${{ matrix.idf_ver }} index=${{ matrix.parallel_index }}
97-
This failure was ignored (continue-on-error enabled).
98-
See details: [View build logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#step:${{ github.job }})
99-
10095
- uses: actions/upload-artifact@v4
10196
if: github.repository_owner == 'espressif' # && needs.prepare.outputs.build_only == '0'
10297
with:
@@ -109,6 +104,27 @@ jobs:
109104
examples/*/build_*/config/sdkconfig.json
110105
build_info*.json
111106
107+
comment-failure:
108+
name: Comment on the PR about the ignored failure
109+
needs: build
110+
runs-on: ubuntu-latest
111+
container:
112+
image: python:3.11-bookworm
113+
env:
114+
IGNORED_FAILURE: ${{needs.build.outputs.ignored_failure}}
115+
steps:
116+
- name: Write a comment
117+
if: |
118+
env.IGNORED_FAILURE == 'true' &&
119+
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association)
120+
uses: thollander/actions-comment-pull-request@v3
121+
with:
122+
comment-tag: build_warning_latest_failed
123+
mode: recreate
124+
message: |
125+
### ⚠️ Build failure was ignored (continue-on-error enabled).
126+
See details: [View build logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#step:build)
127+
112128
run-target:
113129
name: Run apps
114130
if: github.repository_owner == 'espressif' && !contains(github.event.pull_request.labels.*.name, 'Build only')

.github/workflows/doxygen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
runs-on: ubuntu-24.04
1414
steps:
1515
- uses: actions/checkout@v2
16-
- uses: mattnotmitt/doxygen-action@v1.9.5
16+
- uses: mattnotmitt/doxygen-action@v1.12.0
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1-
name: Sync issue comments to JIRA
1+
name: Sync Jira with Github
22

3-
# This workflow will be triggered when new issue comment is created (including PR comments)
4-
on: issue_comment
3+
on:
4+
schedule:
5+
# TODO: Could be removed?
6+
# Triggered every 6 hours
7+
- cron: "0 */6 * * *"
8+
issues:
9+
types: [opened]
10+
issue_comment:
511

612
jobs:
7-
sync_issue_comments_to_jira:
8-
name: Sync Issue Comments to Jira
13+
jira_sync:
14+
name: Sync Jira with Github
915
runs-on: ubuntu-latest
1016
steps:
1117
- uses: actions/checkout@v5
12-
- name: Sync issue comments to JIRA
18+
- name: Sync Jira with Github
1319
uses: espressif/sync-jira-actions@v1
1420
env:
1521
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1622
JIRA_PASS: ${{ secrets.JIRA_PASS }}
1723
JIRA_PROJECT: BSP
1824
JIRA_COMPONENT: GitHub
1925
JIRA_URL: ${{ secrets.JIRA_URL }}
20-
JIRA_USER: ${{ secrets.JIRA_USER }}
26+
JIRA_USER: ${{ secrets.JIRA_USER }}

.github/workflows/new_issues.yml

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

.github/workflows/new_prs.yml

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

.github/workflows/upload_component.yml

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,46 @@ on:
44
push:
55
branches:
66
- master
7+
paths:
8+
- '.github/**'
9+
- 'bsp/**'
10+
- 'components/**'
711
pull_request:
812
types: [opened, reopened, synchronize]
13+
paths:
14+
- '.github/**'
15+
- 'bsp/**'
16+
- 'components/**'
917

1018
jobs:
1119
upload_bsp_components:
1220
runs-on: ubuntu-latest
1321
strategy:
1422
matrix:
15-
bsp: [
16-
esp32_azure_iot_kit,
17-
esp32_s2_kaluga_kit,
18-
esp_wrover_kit,
19-
esp-box,
20-
esp-box-3,
21-
esp-box-lite,
22-
esp32_s3_usb_otg,
23-
esp32_s3_eye,
24-
esp32_s3_lcd_ev_board,
25-
esp32_s3_korvo_1,
26-
esp32_s3_korvo_2,
27-
esp32_lyrat,
28-
esp32_c3_lcdkit,
29-
esp_bsp_generic,
30-
esp_bsp_devkit,
31-
esp32_p4_function_ev_board,
32-
m5stack_core,
33-
m5stack_core_2,
34-
m5stack_core_s3,
35-
m5_atom_s3,
36-
m5dial,
37-
esp32_p4_eye,
38-
m5stack_tab5,
39-
]
23+
bsp:
24+
- esp32_azure_iot_kit
25+
- esp32_s2_kaluga_kit
26+
- esp_wrover_kit
27+
- esp-box
28+
- esp-box-3
29+
- esp-box-lite
30+
- esp32_s3_usb_otg
31+
- esp32_s3_eye
32+
- esp32_s3_lcd_ev_board
33+
- esp32_s3_korvo_1
34+
- esp32_s3_korvo_2
35+
- esp32_lyrat
36+
- esp32_c3_lcdkit
37+
- esp_bsp_generic
38+
- esp_bsp_devkit
39+
- esp32_p4_function_ev_board
40+
- m5stack_core
41+
- m5stack_core_2
42+
- m5stack_core_s3
43+
- m5_atom_s3
44+
- m5dial
45+
- esp32_p4_eye
46+
- m5stack_tab5
4047
steps:
4148
- uses: actions/checkout@v5
4249

.github/workflows/upload_component_noglib.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ on:
44
push:
55
branches:
66
- master
7+
paths:
8+
- 'bsp/**'
79
pull_request:
810
types: [opened, reopened, synchronize]
11+
paths:
12+
- 'bsp/**'
913

1014
jobs:
1115
upload_components:

0 commit comments

Comments
 (0)