23
23
- " libraries/**/*.cpp"
24
24
- " libraries/**/*.c"
25
25
- " libraries/**/*.h"
26
- - " libraries/**/*.ino"
27
- - " libraries/**/ci.json"
28
26
- " idf_component_examples/**"
29
27
- " idf_component.yml"
30
28
- " Kconfig.projbuild"
33
31
- " .github/scripts/check-cmakelists.sh"
34
32
- " .github/scripts/on-push-idf.sh"
35
33
- " .github/scripts/sketch_utils.sh"
34
+ - " .github/scripts/get_affected.py"
36
35
- " variants/esp32/**"
37
36
- " variants/esp32c2/**"
38
37
- " variants/esp32c3/**"
38
+ - " variants/esp32c5/**"
39
39
- " variants/esp32c6/**"
40
40
- " variants/esp32h2/**"
41
41
- " variants/esp32p4/**"
68
68
outputs :
69
69
idf_ver : ${{ steps.set-matrix.outputs.idf_ver }}
70
70
idf_target : ${{ steps.set-matrix.outputs.idf_target }}
71
+ should_build : ${{ steps.affected-examples.outputs.should_build }}
71
72
steps :
73
+ - name : Install universal-ctags
74
+ uses : awalsh128/cache-apt-pkgs-action@2c09a5e66da6c8016428a2172bd76e5e4f14bb17 # v1.5.3
75
+ with :
76
+ packages : libicu74 libjansson4 libxml2 libyaml-0-2 universal-ctags
77
+ version : 1
78
+ execute_install_scripts : true
79
+
80
+ - name : Checkout repository
81
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
82
+ with :
83
+ fetch-depth : 2
84
+
85
+ - name : Get changed files
86
+ id : changed-files
87
+ uses : tj-actions/changed-files@2f7c5bfce28377bc069a65ba478de0a74aa0ca32 # v46.0.1
88
+
89
+ - name : Get affected examples
90
+ id : affected-examples
91
+ env :
92
+ IS_PR : ${{ github.event_name == 'pull_request' }}
93
+ run : |
94
+ (which ctags-universal || which ctags) || (echo "Error: Neither ctags-universal nor ctags found in PATH" && exit 1)
95
+ python3 ./.github/scripts/get_affected.py --debug --component ${{ steps.changed-files.outputs.all_changed_files }} > affected_examples.txt
96
+
97
+ - name : Upload affected examples
98
+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
99
+ with :
100
+ name : affected_examples
101
+ path : affected_examples.txt
102
+ if-no-files-found : error
103
+
104
+ - name : Upload debug artifacts
105
+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
106
+ with :
107
+ name : get_affected_debug
108
+ path : |
109
+ ctags_defs_by_qname.json
110
+ ctags_header_to_qnames.json
111
+ ctags_tags.jsonl
112
+ dependencies.json
113
+ dependencies_reverse.json
114
+ if-no-files-found : warn
115
+
72
116
- name : Get IDF Version and Targets
73
117
id : set-matrix
74
118
run : |
@@ -100,6 +144,7 @@ jobs:
100
144
name : Build IDF ${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
101
145
runs-on : ubuntu-latest
102
146
needs : set-matrix
147
+ if : ${{ needs.set-matrix.outputs.should_build == '1' }}
103
148
strategy :
104
149
fail-fast : false
105
150
matrix :
@@ -121,13 +166,18 @@ jobs:
121
166
- name : Setup jq
122
167
uses : dcarbone/install-jq-action@e397bd87438d72198f81efd21f876461183d383a # v3.0.1
123
168
169
+ - name : Download affected examples
170
+ uses : actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
171
+ with :
172
+ name : affected_examples
173
+
124
174
- name : Build
125
175
env :
126
176
IDF_TARGET : ${{ matrix.idf_target }}
127
177
shell : bash
128
178
run : |
129
179
chmod a+x ./components/arduino-esp32/.github/scripts/*
130
- ./components/arduino-esp32/.github/scripts/on-push-idf.sh
180
+ ./components/arduino-esp32/.github/scripts/on-push-idf.sh affected_examples.txt
131
181
132
182
- name : Upload generated sdkconfig files for debugging
133
183
uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
0 commit comments