@@ -37,7 +37,7 @@ concurrency:
37
37
cancel-in-progress : true
38
38
39
39
jobs :
40
- Build :
40
+ Build-Matter :
41
41
# Disable the job in forks
42
42
if : ${{ github.repository_owner == 'espressif' && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success') }}
43
43
@@ -46,33 +46,118 @@ jobs:
46
46
image : espressif/esp-matter:latest
47
47
strategy :
48
48
matrix :
49
- build-dir : ['examples/light', 'examples/light_switch']
50
- targets : ['esp32', 'esp32c3', 'esp32c6', 'esp32h2']
49
+ targets :
50
+ - {example: light, target: esp32, prefix: wifi}
51
+ - {example: light, target: esp32c3, prefix: wifi}
52
+ - {example: light, target: esp32c6, prefix: wifi}
53
+ - {example: light, target: esp32c6, prefix: thread, sdkconfig: sdkconfig.defaults.c6_thread}
54
+ - {example: light, target: esp32h2, prefix: thread}
55
+ - {example: light_switch, target: esp32c3, prefix: wifi}
51
56
52
57
steps :
53
58
- run : mkdir -p images
54
59
- name : build application
55
60
run : |
56
61
. $IDF_PATH/export.sh
57
62
. $ESP_MATTER_PATH/export.sh
58
- cd $ESP_MATTER_PATH/${{matrix.build-dir}}
59
- idf.py set-target ${{matrix.targets}} build
63
+ cd $ESP_MATTER_PATH/examples/${{ matrix.targets.example }}
64
+
65
+ SDK_CFG="sdkconfig.defaults"
66
+ if [ "${{ matrix.targets.sdkconfig }}" != "" ]; then
67
+ # sdkconfig.defaults.esp32c6 contains the configuration for wifi
68
+ # For now its a workaround for not including wifi configs in C6's final sdkconfig
69
+ # we can restructure the sdkconfig for c6_wifi and c6_thread and re-visit this
70
+ # https://docs.espressif.com/projects/esp-idf/en/v5.2.1/esp32c6/api-guides/build-system.html#custom-sdkconfig-defaults
71
+ # Please check the above link for sequece of application of configuration
72
+ rm -f sdkconfig.defaults.${{ matrix.targets.target }}
73
+
74
+ SDK_CFG="$SDK_CFG;${{ matrix.targets.sdkconfig }}"
75
+ elif [ -f sdkconfig.defaults.${{ matrix.targets.target }} ]; then
76
+ SDK_CFG="$SDK_CFG;sdkconfig.defaults.${{ matrix.targets.target }}"
77
+ fi
78
+
79
+ idf.py -D SDKCONFIG_DEFAULTS="$SDK_CFG" set-target ${{ matrix.targets.target }} build
60
80
cd build
81
+
61
82
TARGET_CHIP=`cat project_description.json | python3 -c 'import sys,json; print(json.load(sys.stdin)["target"])'`
62
83
APP_BIN=`cat project_description.json | python3 -c 'import sys,json; print(json.load(sys.stdin)["app_bin"])'`
63
- esptool.py --chip $TARGET_CHIP merge_bin -o "$GITHUB_WORKSPACE/images/$TARGET_CHIP"_"$APP_BIN" `cat flash_args | tr '\n' '\ '`
84
+ OUT_BIN="$GITHUB_WORKSPACE/images/$TARGET_CHIP"_${{ matrix.targets.prefix }}_"$APP_BIN"
85
+ esptool.py --chip $TARGET_CHIP merge_bin -o $OUT_BIN `cat flash_args | tr '\n' '\ '`
86
+
87
+ # record the esp-idf and esp-matter commit
88
+ idf_rev=`git -C $IDF_PATH rev-parse --short HEAD`
89
+ mtr_rev=`git -C $ESP_MATTER_PATH rev-parse --short HEAD`
90
+ chip_rev=`git -C $ESP_MATTER_PATH/connectedhomeip/connectedhomeip rev-parse --short HEAD`
91
+ echo "- esp-idf: [$idf_rev](https://github.com/espressif/esp-idf/tree/$idf_rev)" >> $GITHUB_WORKSPACE/images/.esp-idf
92
+ echo "- esp-matter: [$mtr_rev](https://github.com/espressif/esp-matter/tree/$mtr_rev)" >> $GITHUB_WORKSPACE/images/.esp-matter
93
+ echo "- connectedhomeip: [$chip_rev](https://github.com/project-chip/connectedhomeip/tree/$chip_rev)" >> $GITHUB_WORKSPACE/images/.chip
64
94
65
95
- name : Upload artifact
66
- uses : actions/upload-artifact@v3
96
+ uses : actions/upload-artifact@v4
67
97
with :
68
- name : build-images
98
+ name : build-images-${{ matrix.targets.target }}-${{ matrix.targets.prefix }}-${{ matrix.targets.example }}
69
99
path : images/
70
100
101
+ Build-Rainmaker :
102
+ # Disable the job in forks
103
+ if : ${{ github.repository_owner == 'espressif' && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success') }}
104
+
105
+ runs-on : ubuntu-latest
106
+ container :
107
+ image : espressif/esp-matter:latest
108
+ strategy :
109
+ matrix :
110
+ targets :
111
+ - {example: matter_light, target: esp32c3, prefix: wifi_rainmaker}
112
+
113
+ steps :
114
+ - run : mkdir -p images
115
+
116
+ - uses : actions/checkout@v4
117
+ with :
118
+ repository : ' espressif/esp-rainmaker'
119
+ submodules : ' recursive'
120
+ path : ' esp-rainmaker'
121
+
122
+ - name : build application
123
+ run : |
124
+ . $IDF_PATH/export.sh
125
+ . $ESP_MATTER_PATH/export.sh
126
+ cd esp-rainmaker/examples/matter/${{ matrix.targets.example }}
127
+
128
+ SDK_CFG="sdkconfig.defaults"
129
+ if [ "${{ matrix.targets.sdkconfig }}" != "" ]; then
130
+ SDK_CFG="$SDK_CFG;${{ matrix.targets.sdkconfig }}"
131
+ elif [ -f sdkconfig.defaults.${{ matrix.targets.target }} ]; then
132
+ SDK_CFG="$SDK_CFG;sdkconfig.defaults.${{ matrix.targets.target }}"
133
+ fi
134
+
135
+ idf.py -D SDKCONFIG_DEFAULTS="$SDK_CFG" set-target ${{ matrix.targets.target }} build
136
+ cd build
137
+
138
+ TARGET_CHIP=`cat project_description.json | python3 -c 'import sys,json; print(json.load(sys.stdin)["target"])'`
139
+ APP_BIN=`cat project_description.json | python3 -c 'import sys,json; print(json.load(sys.stdin)["app_bin"])'`
140
+ OUT_BIN="$GITHUB_WORKSPACE/images/$TARGET_CHIP"_${{ matrix.targets.prefix }}_"$APP_BIN"
141
+ esptool.py --chip $TARGET_CHIP merge_bin -o $OUT_BIN `cat flash_args | tr '\n' '\ '`
142
+
143
+ # record the esp-rainmaker commit
144
+ rmaker_rev=`git rev-parse --short HEAD`
145
+ echo "- esp-rainmaker: [$rmaker_rev](https://github.com/espressif/esp-rainmaker/tree/$rmaker_rev)" >> $GITHUB_WORKSPACE/images/.esp-rainmaker
146
+
147
+ - name : Upload artifact
148
+ uses : actions/upload-artifact@v4
149
+ with :
150
+ name : build-images-${{ matrix.targets.target }}-${{ matrix.targets.prefix }}-${{ matrix.targets.example }}
151
+ path : images/
152
+
153
+
71
154
deploy :
72
155
# Disable the job in forks
73
156
if : ${{ github.repository_owner == 'espressif' }}
74
157
75
- needs : Build
158
+ needs :
159
+ - Build-Matter
160
+ - Build-Rainmaker
76
161
77
162
environment :
78
163
name : github-pages
@@ -83,25 +168,34 @@ jobs:
83
168
84
169
steps :
85
170
- name : Download builds
86
- uses : actions/download-artifact@v3
171
+ uses : actions/download-artifact@v4
87
172
with :
88
- name : build-images
173
+ pattern : build-images-*
89
174
path : images/
175
+ merge-multiple : true
90
176
91
177
- name : generate launchpad config
92
178
run : |
93
179
cd images/
94
- ls
95
- $ESP_MATTER_PATH/tools/launchpad/generate_launchpad_config.sh
180
+ $ESP_MATTER_PATH/tools/launchpad/generate_launchpad_config.sh ${{ github.repository_owner }}
181
+
182
+ # Put together the commit ids used when building the firmwares
183
+ echo "#### Build Config" >> build_cfg.md
184
+ cat .esp-idf >> build_cfg.md
185
+ cat .esp-matter >> build_cfg.md
186
+ cat .chip >> build_cfg.md
187
+ cat .esp-rainmaker >> build_cfg.md
188
+
189
+ tree -H '.' -L 1 --noreport -T 'ESP Matter Launchpad Artifacts' -shi --charset utf-8 -I "index.html" -o index.html
96
190
97
191
- name : Setup Pages
98
- uses : actions/configure-pages@v2
192
+ uses : actions/configure-pages@v4
99
193
100
194
- name : Upload artifact
101
- uses : actions/upload-pages-artifact@v1
195
+ uses : actions/upload-pages-artifact@v3
102
196
with :
103
197
path : images/
104
198
105
199
- name : Deploy to GitHub Pages
106
200
id : deployment
107
- uses : actions/deploy-pages@v1
201
+ uses : actions/deploy-pages@v4
0 commit comments