@@ -18,10 +18,14 @@ jobs:
1818 DEBIAN_FRONTEND : noninteractive
1919
2020 steps :
21- - name : Install base dependencies (git/python/etc.)
21+ - name : Checkout repository
22+ uses : actions/checkout@v4
23+ with :
24+ submodules : false
25+
26+ - name : Install base dependencies
2227 shell : bash
2328 run : |
24- set -euxo pipefail
2529 apt-get update -y
2630 apt-get install -y --no-install-recommends \
2731 ca-certificates curl xz-utils jq \
@@ -36,30 +40,19 @@ jobs:
3640 zlib1g-dev
3741 rm -rf /var/lib/apt/lists/*
3842
39- - name : Checkout repository
40- uses : actions/checkout@v4
41- with :
42- submodules : false
43- fetch-depth : 0
44-
4543 - name : Mark repo as safe
4644 shell : bash
4745 run : |
48- set -euxo pipefail
49- cd "$GITHUB_WORKSPACE"
5046 git config --global --add safe.directory "$GITHUB_WORKSPACE"
5147
5248 - name : Initialize required submodules
5349 shell : bash
5450 run : |
55- set -euxo pipefail
56- cd "$GITHUB_WORKSPACE"
57- git submodule update --init --depth 1 third_party/matter_sdk
51+ git submodule update --init third_party/matter_sdk
5852
5953 - name : Checkout matter_sdk submodules
6054 shell : bash
6155 run : |
62- set -euxo pipefail
6356 cd "$GITHUB_WORKSPACE/third_party/matter_sdk"
6457 python ./scripts/checkout_submodules.py --platform linux
6558
@@ -69,71 +62,17 @@ jobs:
6962 - name : Build chip-tool
7063 shell : bash
7164 run : |
72- set -euxo pipefail
7365 cd "$GITHUB_WORKSPACE/third_party/matter_sdk"
74- set +u
75- source ./scripts/activate.sh
76- set -u
77-
78- python3 -m pip install --upgrade pip
79- python3 -m pip install --upgrade click
80-
81- ./scripts/build/build_examples.py \
82- --target linux-arm64-chip-tool-ipv6only-clang \
83- build
66+ ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-chip-tool-ipv6only-clang build"
8467
8568 - name : Build OTA provider
8669 shell : bash
8770 run : |
88- set -euxo pipefail
8971 cd "$GITHUB_WORKSPACE/third_party/matter_sdk"
90- set +u
91- source ./scripts/activate.sh
92- set -u
93-
94- python3 -m pip install --upgrade pip
95- python3 -m pip install --upgrade click
96-
97- ./scripts/build/build_examples.py \
98- --target linux-arm64-ota-provider-ipv6only-clang \
99- build
72+ ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-ota-provider-ipv6only-clang build"
10073
10174 - name : Build all-clusters app
10275 shell : bash
10376 run : |
104- set -euxo pipefail
10577 cd "$GITHUB_WORKSPACE/third_party/matter_sdk"
106- set +u
107- source ./scripts/activate.sh
108- set -u
109-
110- python3 -m pip install --upgrade pip
111- python3 -m pip install --upgrade click
112-
113- ./scripts/build/build_examples.py \
114- --target linux-arm64-all-clusters-clang \
115- build
116-
117- - name : Build summary (artifact presence)
118- if : always()
119- shell : bash
120- run : |
121- set -euxo pipefail
122- cd "$GITHUB_WORKSPACE"
123- echo "## Build summary" >> "$GITHUB_STEP_SUMMARY"
124- echo "" >> "$GITHUB_STEP_SUMMARY"
125- echo "Built on native Ubuntu ARM runner, inside ubuntu:24.04 container." >> "$GITHUB_STEP_SUMMARY"
126- echo "" >> "$GITHUB_STEP_SUMMARY"
127-
128- CHIP_TOOL="third_party/matter_sdk/out/linux-arm64-chip-tool-ipv6only-clang/chip-tool"
129- OTA_PROV="third_party/matter_sdk/out/linux-arm64-ota-provider-ipv6only-clang/chip-ota-provider-app"
130- ALL_CLUS="third_party/matter_sdk/out/linux-arm64-all-clusters-clang/chip-all-clusters-app"
131-
132- for f in "$CHIP_TOOL" "$OTA_PROV" "$ALL_CLUS"; do
133- if [ -f "$f" ]; then
134- echo "- ✅ $(basename "$f") at \`$f\`" >> "$GITHUB_STEP_SUMMARY"
135- else
136- echo "- ❌ Missing: \`$f\`" >> "$GITHUB_STEP_SUMMARY"
137- exit 1
138- fi
139- done
78+ ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-all-clusters-clang build"
0 commit comments