Skip to content

Commit 9dd651d

Browse files
workflows: Create Matter validation workflows and scripts
- Added script to validate Matter documentation - Added script to validate Matter sample consistency - Added a workflow to run automatically above scripts Signed-off-by: Arkadiusz Balys <[email protected]>
1 parent 1513eca commit 9dd651d

24 files changed

+5060
-7
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Matter Validation
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- 'v*-branch'
8+
9+
paths:
10+
- 'samples/matter/**'
11+
- 'applications/matter_bridge/**'
12+
- 'applications/matter_weather_station/**'
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
matter-validation:
19+
runs-on: ubuntu-24.04
20+
steps:
21+
- name: Checkout the code
22+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
with:
24+
ref: ${{ github.event.pull_request.head.sha }}
25+
fetch-depth: 0
26+
path: ncs/nrf
27+
28+
- name: Rebase
29+
if: github.event_name == 'pull_request'
30+
continue-on-error: true
31+
env:
32+
BASE_REF: ${{ github.base_ref }}
33+
PR_HEAD: ${{ github.event.pull_request.head.sha }}
34+
working-directory: ncs/nrf
35+
run: |
36+
git config --global user.email "[email protected]"
37+
git config --global user.name "Github Actions"
38+
rm -fr ".git/rebase-apply"
39+
rm -fr ".git/rebase-merge"
40+
git rebase origin/${BASE_REF}
41+
git clean -f -d
42+
git log --graph --oneline HEAD...${PR_HEAD}
43+
44+
- name: Set up Python
45+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
46+
with:
47+
python-version: 3.12
48+
cache: pip
49+
cache-dependency-path: ncs/nrf/scripts/requirements.txt
50+
51+
- name: Install packages
52+
working-directory: ncs/nrf
53+
run: |
54+
sudo apt update
55+
sudo apt-get install -y wget python3-pip git
56+
pip install -r scripts/requirements.txt
57+
58+
- name: Checkout Matter repository
59+
working-directory: ncs
60+
run: |
61+
git clone https://github.com/nrfconnect/sdk-connectedhomeip modules/lib/matter
62+
cd modules/lib/matter
63+
git checkout master
64+
65+
- name: validate Matter samples and documentation
66+
working-directory: ncs
67+
run: |
68+
python nrf/scripts/matter/matter_sample_checker/matter_sample_checker.py --samples-zap-yaml nrf/samples/matter/common/src/zap_samples.yml --base nrf

samples/matter/common/src/zap_samples.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
# Base dir related to ZEPHYR_BASE
88
- base_dir: ../nrf
99

10-
# applications
11-
- name: matter_bridge
12-
zap_file: applications/matter_bridge/src/default_zap/bridge.zap
13-
- name: matter_bridge_on_off_plug
14-
zap_file: applications/matter_bridge/snippets/onoff_plug/bridge.zap
15-
- name: matter_weather_station
16-
zap_file: applications/matter_weather_station/src/default_zap/weather-station.zap
10+
# # applications
11+
# - name: matter_bridge
12+
# zap_file: applications/matter_bridge/src/default_zap/bridge.zap
13+
# - name: matter_bridge_on_off_plug
14+
# zap_file: applications/matter_bridge/snippets/onoff_plug/bridge.zap
15+
# - name: matter_weather_station
16+
# zap_file: applications/matter_weather_station/src/default_zap/weather-station.zap
1717

1818
# light bulb
1919
- name: light_bulb

0 commit comments

Comments
 (0)