@@ -29,57 +29,28 @@ concurrency:
2929
3030jobs :
3131 build :
32+ continue-on-error : ${{ matrix.allow_fail == true }}
3233 env :
3334 component_manager_ver : " 2.2.*"
3435 idf_build_apps_ver : " 2.10.1"
3536 strategy :
37+ fail-fast : false
3638 matrix :
39+ idf_ver :
40+ - " latest"
41+ - " release-v6.0"
42+ - " release-v5.5"
43+ - " release-v5.4"
44+ - " release-v5.3"
45+ - " release-v5.2"
46+ - " release-v5.1"
47+ parallel_index : [1, 2, 3]
3748 include :
49+ # Default values for all versions
50+ - parallel_count : 3
51+ allow_fail : false
3852 - idf_ver : " latest"
39- parallel_count : 5
40- parallel_index : 1
41- - idf_ver : " latest"
42- parallel_count : 5
43- parallel_index : 2
44- - idf_ver : " latest"
45- parallel_count : 5
46- parallel_index : 3
47- - idf_ver : " latest"
48- parallel_count : 5
49- parallel_index : 4
50- - idf_ver : " latest"
51- parallel_count : 5
52- parallel_index : 5
53- - idf_ver : " release-v5.1"
54- parallel_count : 2
55- parallel_index : 1
56- - idf_ver : " release-v5.1"
57- parallel_count : 2
58- parallel_index : 2
59- - idf_ver : " release-v5.2"
60- parallel_count : 2
61- parallel_index : 1
62- - idf_ver : " release-v5.2"
63- parallel_count : 2
64- parallel_index : 2
65- - idf_ver : " release-v5.3"
66- parallel_count : 2
67- parallel_index : 1
68- - idf_ver : " release-v5.3"
69- parallel_count : 2
70- parallel_index : 2
71- - idf_ver : " release-v5.4"
72- parallel_count : 2
73- parallel_index : 1
74- - idf_ver : " release-v5.4"
75- parallel_count : 2
76- parallel_index : 2
77- - idf_ver : " release-v5.5"
78- parallel_count : 2
79- parallel_index : 1
80- - idf_ver : " release-v5.5"
81- parallel_count : 2
82- parallel_index : 2
53+ allow_fail : true
8354 runs-on : ubuntu-latest
8455 container : espressif/idf:${{ matrix.idf_ver }}
8556 steps :
@@ -93,19 +64,39 @@ jobs:
9364 separator : ' ;' # idf-build-apps expects files seprated with semicolon
9465
9566 - name : Build ESP-BSP applications
67+ continue-on-error : ${{ matrix.allow_fail == true }}
9668 if : always()
9769 shell : bash
9870 env :
9971 IDF_EXTRA_ACTIONS_PATH : " ${{ github.workspace }}/examples"
10072 # When event not a pull-request, the action before must be skipped and the steps.changed-files.outputs.all_modified_files variable is not exists and must be removed
101- ALL_CHANGED_FILES : ${{ (github.event_name != 'pull_request') && format(' ') || format('--modified-files=') }}${{ (github.event_name != 'pull_request') && format(' ') || steps.changed-files.outputs.all_modified_files }}
73+ # ALL_CHANGED_FILES: ${{ (github.event_name != 'pull_request') && format(' ') || format('--modified-files=') }}${{ (github.event_name != 'pull_request') && format(' ') || steps.changed-files.outputs.all_modified_files }}
74+ ALL_CHANGED_FILES :
10275 run : |
10376 . ${IDF_PATH}/export.sh
10477 pip install idf-component-manager==${{ env.component_manager_ver }} ruamel.yaml idf-build-apps==${{ env.idf_build_apps_ver }} --upgrade
10578
10679 echo "Files changed: "${{env.ALL_CHANGED_FILES}}
10780 idf-build-apps find ${{env.ALL_CHANGED_FILES}}
108- 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
81+ 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 || echo "BUILD_FAILED=true" >> $GITHUB_ENV
82+
83+ # Warning, if failed with master
84+ - name : Warn if latest build failed
85+ if : ${{ env.BUILD_FAILED == 'true' && matrix.allow_fail == true }}
86+ run : |
87+ echo "::warning::Build failed for idf_ver=${{ matrix.idf_ver }} (ignored because it's 'latest')"
88+ echo "### ⚠️ Build failed for idf_ver=${{ matrix.idf_ver }}" >> $GITHUB_STEP_SUMMARY
89+ echo "This failure was ignored (continue-on-error enabled)." >> $GITHUB_STEP_SUMMARY
90+
91+ # Warning, if failed with master
92+ - name : Warn if latest build failed Comment PR
93+ if : ${{ env.BUILD_FAILED == 'true' && matrix.allow_fail == true }}
94+ uses : thollander/actions-comment-pull-request@v3
95+ with :
96+ comment-tag : ci_fail_warn_${{ matrix.idf_ver }}
97+ message : |
98+ ### ⚠️ Build failed for idf_ver=${{ matrix.idf_ver }} index=${{ matrix.parallel_index }}
99+ This failure was ignored (continue-on-error enabled).
109100
110101 - uses : actions/upload-artifact@v4
111102 if : github.repository_owner == 'espressif' && needs.prepare.outputs.build_only == '0'
0 commit comments