Skip to content

Commit 9417660

Browse files
committed
Use git submodule to reference Matter SDK
1 parent e961bd3 commit 9417660

File tree

3 files changed

+23
-32
lines changed

3 files changed

+23
-32
lines changed

.github/workflows/build.yaml

+19-32
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: CHIP wheels build
22

33
on: push
44

5-
env:
6-
matter_sdk_ref: v1.2.0.1
7-
85
jobs:
96
build_prepare:
107
name: Prepare build
@@ -15,6 +12,7 @@ jobs:
1512
steps:
1613
- name: Checkout build repository
1714
uses: actions/checkout@v4
15+
submodules: true
1816
with:
1917
fetch-depth: 0
2018
- name: Get version
@@ -43,37 +41,31 @@ jobs:
4341
fi
4442
echo "Building version $version"
4543
echo "version=$version" >> "$GITHUB_OUTPUT"
46-
- name: Checkout CHIP SDK repository
47-
uses: actions/checkout@v4
48-
with:
49-
repository: project-chip/connectedhomeip
50-
ref: ${{ env.matter_sdk_ref }}
51-
path: ./project-chip
5244
- name: Checkout submodules
53-
working-directory: ./project-chip
45+
working-directory: ./connectedhomeip/
5446
run: scripts/checkout_submodules.py --shallow --platform linux
5547
- name: Apply patches
56-
working-directory: ./project-chip
48+
working-directory: ./connectedhomeip/
5749
run: |
5850
for patch in ../*.patch
5951
do
6052
echo "Applying ${patch}"
6153
patch -p1 < $patch
6254
done
6355
- name: Bootstrap
64-
working-directory: ./project-chip
56+
working-directory: ./connectedhomeip/
6557
run: bash scripts/bootstrap.sh -p all,linux
6658
- name: ZAP Code pre-generation
67-
working-directory: ./project-chip
59+
working-directory: ./connectedhomeip/
6860
run: scripts/run_in_build_env.sh "scripts/codepregen.py ./zzz_pregenerated/"
6961
- name: Create Matter SDK tar
70-
working-directory: ./project-chip
71-
run: tar -caf ../project-chip.tar.zst --exclude .environment --use-compress-program=zstdmt .
62+
working-directory: ./connectedhomeip/
63+
run: tar -caf ../connectedhomeip.tar.zst --exclude .environment --use-compress-program=zstdmt .
7264
- name: Store Matter SDK as artifact
7365
uses: actions/upload-artifact@v4
7466
with:
7567
name: matter-sdk-${{ github.run_id }}
76-
path: ./project-chip.tar.zst
68+
path: ./connectedhomeip.tar.zst
7769

7870
build_linux_python_lib:
7971
name: Build Python wheels for Linux (${{ matrix.arch.name }})
@@ -95,7 +87,7 @@ jobs:
9587

9688
defaults:
9789
run:
98-
working-directory: ./project-chip
90+
working-directory: ./connectedhomeip/
9991

10092
container:
10193
image: ${{ matrix.arch.container }}
@@ -112,11 +104,11 @@ jobs:
112104
- name: Extract Matter SDK from tar
113105
working-directory: ./
114106
run: |
115-
rm -rf project-chip
116-
mkdir -p project-chip
117-
cd project-chip
118107
apt update && apt install zstd
119-
tar -xaf ../project-chip.tar.zst --use-compress-program=zstdmt .
108+
rm -rf connectedhomeip/
109+
mkdir -p connectedhomeip/
110+
cd connectedhomeip/
111+
tar -xaf ../connectedhomeip.tar.zst --use-compress-program=zstdmt .
120112
git config --global --add safe.directory "*"
121113
rm -rf out/
122114
- name: Bootstrap
@@ -192,32 +184,27 @@ jobs:
192184

193185
defaults:
194186
run:
195-
working-directory: ./project-chip
187+
working-directory: ./connectedhomeip/
196188

197189
steps:
198190
- name: Checkout build repository
199191
uses: actions/checkout@v4
192+
submodules: true
200193
with:
201194
fetch-depth: 0
202-
- name: Checkout CHIP SDK repository
203-
uses: actions/checkout@v4
204-
with:
205-
repository: project-chip/connectedhomeip
206-
ref: ${{ env.matter_sdk_ref }}
207-
path: ./project-chip
208195
- name: Checkout submodules
209-
working-directory: ./project-chip
196+
working-directory: ./connectedhomeip/
210197
run: scripts/checkout_submodules.py --shallow --platform darwin
211198
- name: Apply patches
212-
working-directory: ./project-chip
199+
working-directory: ./connectedhomeip/
213200
run: |
214201
for patch in ../*.patch
215202
do
216203
echo "Applying ${patch}"
217204
patch -p1 < $patch
218205
done
219206
- name: Bootstrap
220-
working-directory: ./project-chip
207+
working-directory: ./connectedhomeip/
221208
run: bash scripts/bootstrap.sh -p all,darwin
222209
- name: Setup Build, Run Build and Run Tests
223210
run: |
@@ -249,7 +236,7 @@ jobs:
249236
uses: softprops/action-gh-release@v1
250237
if: startsWith(github.ref, 'refs/tags/')
251238
with:
252-
files: project-chip/out/controller/python/*.whl
239+
files: connectedhomeip/out/controller/python/*.whl
253240
- name: Upload wheels to PyPI
254241
if: startsWith(github.ref, 'refs/tags/')
255242
env:

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "connectedhomeip"]
2+
path = connectedhomeip
3+
url = https://github.com/project-chip/connectedhomeip.git

connectedhomeip

Submodule connectedhomeip added at 181b0cb

0 commit comments

Comments
 (0)