Skip to content

Commit a8323e3

Browse files
authored
Running ZAP code gen check against the v1.0-branch release of Chip and the tip of chip repo (#1655)
Github: ZAP #960
1 parent bbf4320 commit a8323e3

File tree

1 file changed

+55
-9
lines changed

1 file changed

+55
-9
lines changed

.github/workflows/matter.yml

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,59 @@ jobs:
182182
name: zap-linux-x64-deb
183183
path: dist/zap-linux-x64.deb
184184

185-
matter-sdk-codegen:
186-
name: Test matter sdk codegen changes
185+
matter-sdk-codegen-master:
186+
name: Test matter sdk codegen changes (master)
187+
needs: [build-zap]
188+
runs-on: ubuntu-22.04
189+
190+
# CHIP container required because clang-format version needs to match
191+
container:
192+
image: ghcr.io/project-chip/chip-build:125
193+
194+
steps:
195+
- uses: actions/download-artifact@v4
196+
with:
197+
name: zap-linux-x64-zip
198+
199+
- name: Unpack linux artifact
200+
run: |
201+
mkdir zap-release && cd zap-release && unzip ../zap-linux-x64.zip
202+
203+
# Checkout without actions/checkout@v4 since that one uses a repository specific token
204+
- name: Checkout Matter SDK (master)
205+
run: |
206+
git clone --depth 1 --branch master https://github.com/project-chip/connectedhomeip.git chip_repo
207+
208+
- name: Ensure matter embedded zap is not available
209+
run: |
210+
rm -f /usr/bin/zap-cli
211+
rm -rf /opt/zap-*
212+
213+
- name: Generate all (master)
214+
run: |
215+
cd chip_repo
216+
./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
217+
ZAP_INSTALL_PATH=$(pwd)/../zap-release scripts/run_in_build_env.sh "scripts/tools/zap_regen_all.py --type global"
218+
ZAP_INSTALL_PATH=$(pwd)/../zap-release scripts/run_in_build_env.sh "scripts/tools/zap_regen_all.py --type specific"
219+
220+
- name: Ensure git works in the chip repository checkout
221+
run: git config --global --add safe.directory `pwd`/chip_repo
222+
223+
- name: Check for uncommited changes (master)
224+
run: |
225+
cd chip_repo
226+
git add .
227+
# Show the full diff
228+
git diff-index -p HEAD --
229+
# Also show just the files that are different, to make it easy
230+
# to tell at a glance what might be going on. And throw in
231+
# --exit-code to make this job fail if there is a difference.
232+
git diff-index --exit-code HEAD --
233+
234+
matter-sdk-codegen-v1-4-2:
235+
name: Test matter sdk codegen changes (v1.4.2-branch)
187236
needs: [build-zap]
188237
runs-on: ubuntu-22.04
189-
strategy:
190-
matrix:
191-
node-version: [20.x]
192238

193239
# CHIP container required because clang-format version needs to match
194240
container:
@@ -204,16 +250,16 @@ jobs:
204250
mkdir zap-release && cd zap-release && unzip ../zap-linux-x64.zip
205251
206252
# Checkout without actions/checkout@v4 since that one uses a repository specific token
207-
- name: Checkout Matter SDK
253+
- name: Checkout Matter SDK (v1.4.2-branch)
208254
run: |
209-
git clone --depth 1 https://github.com/project-chip/connectedhomeip.git chip_repo
255+
git clone --depth 1 --branch v1.4.2-branch https://github.com/project-chip/connectedhomeip.git chip_repo
210256
211257
- name: Ensure matter embedded zap is not available
212258
run: |
213259
rm -f /usr/bin/zap-cli
214260
rm -rf /opt/zap-*
215261
216-
- name: Generate all
262+
- name: Generate all (v1.4.2-branch)
217263
run: |
218264
cd chip_repo
219265
./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
@@ -223,7 +269,7 @@ jobs:
223269
- name: Ensure git works in the chip repository checkout
224270
run: git config --global --add safe.directory `pwd`/chip_repo
225271

226-
- name: Check for uncommited changes
272+
- name: Check for uncommited changes (v1.4.2-branch)
227273
run: |
228274
cd chip_repo
229275
git add .

0 commit comments

Comments
 (0)