Skip to content

Commit aaae9e3

Browse files
Speed up CI by enabling unified build on test_suites_linux (project-chip#41968)
* Speed up CI by enabling unified build on test_suites_linux * Delete out/unified-build after build; fix paths to unified build binaries * Remove ota-provider from unified; fix a few more paths * allow clang config in standalone toolchain so we can enable/disable clang in the unified build * Merge with master and fix conflicts * fix path to chip-lock-app * Remove tv app from unified build. Failing somehow with resource exhausted * Attempt to fix issue with options '--secured-device-port' by defining CHIP_DEVICE_ENABLE_PORT_PARAMS for the standalone toolchain
1 parent a0588e6 commit aaae9e3

File tree

3 files changed

+38
-23
lines changed

3 files changed

+38
-23
lines changed

.github/workflows/tests.yaml

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,27 @@ jobs:
259259
src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml \
260260
src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml \
261261
"
262-
- name: Build Apps (part 1)
262+
- name: Build Apps with Unified Build
263+
run: |
264+
./scripts/run_in_build_env.sh \
265+
"./scripts/build/build_examples.py \
266+
--target linux-x64-bridge-${BUILD_VARIANT}-unified \
267+
--target linux-x64-lock-${BUILD_VARIANT}-unified \
268+
--target linux-x64-microwave-oven-${BUILD_VARIANT}-unified \
269+
--target linux-x64-rvc-${BUILD_VARIANT}-unified \
270+
--target linux-x64-ota-provider-${BUILD_VARIANT}-unified \
271+
--pw-command-launcher=ccache \
272+
build \
273+
--copy-artifacts-to objdir-clone \
274+
"
275+
- name: Clean out
276+
run: rm -rf out/
277+
- name: Build Remaining Apps (part 1)
263278
run: |
264279
./scripts/run_in_build_env.sh \
265280
"./scripts/build/build_examples.py \
266281
--target linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \
267282
--target linux-x64-all-clusters-${BUILD_VARIANT} \
268-
--target linux-x64-lock-${BUILD_VARIANT} \
269-
--target linux-x64-ota-provider-${BUILD_VARIANT} \
270283
--target linux-x64-ota-requestor-${BUILD_VARIANT} \
271284
--target linux-x64-tv-app-${BUILD_VARIANT} \
272285
--pw-command-launcher=ccache \
@@ -275,14 +288,11 @@ jobs:
275288
"
276289
- name: Clean out
277290
run: rm -rf out/
278-
- name: Build Apps (part 2)
291+
- name: Build Remaining Apps (part 2)
279292
run: |
280293
./scripts/run_in_build_env.sh \
281294
"./scripts/build/build_examples.py \
282-
--target linux-x64-bridge-${BUILD_VARIANT} \
283295
--target linux-x64-lit-icd-${BUILD_VARIANT} \
284-
--target linux-x64-microwave-oven-${BUILD_VARIANT} \
285-
--target linux-x64-rvc-${BUILD_VARIANT} \
286296
--target linux-x64-network-manager-${BUILD_VARIANT} \
287297
--target linux-x64-energy-gateway-${BUILD_VARIANT} \
288298
--target linux-x64-energy-management-${BUILD_VARIANT} \
@@ -310,14 +320,14 @@ jobs:
310320
--iterations 1 \
311321
--test-timeout-seconds 120 \
312322
--all-clusters-app ./objdir-clone/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \
313-
--lock-app ./objdir-clone/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \
314-
--ota-provider-app ./objdir-clone/linux-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \
323+
--lock-app ./objdir-clone/linux-x64-lock-${BUILD_VARIANT}-unified/chip-lock-app \
324+
--ota-provider-app ./objdir-clone/linux-x64-ota-provider-${BUILD_VARIANT}-unified/chip-ota-provider-app \
315325
--ota-requestor-app ./objdir-clone/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \
316326
--tv-app ./objdir-clone/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
317-
--bridge-app ./objdir-clone/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
327+
--bridge-app ./objdir-clone/linux-x64-bridge-${BUILD_VARIANT}-unified/chip-bridge-app \
318328
--lit-icd-app ./objdir-clone/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \
319-
--microwave-oven-app ./objdir-clone/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
320-
--rvc-app ./objdir-clone/linux-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \
329+
--microwave-oven-app ./objdir-clone/linux-x64-microwave-oven-${BUILD_VARIANT}-unified/chip-microwave-oven-app \
330+
--rvc-app ./objdir-clone/linux-x64-rvc-${BUILD_VARIANT}-unified/chip-rvc-app \
321331
--network-manager-app ./objdir-clone/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \
322332
--energy-gateway-app ./objdir-clone/linux-x64-energy-gateway-${BUILD_VARIANT}/chip-energy-gateway-app \
323333
--energy-management-app ./objdir-clone/linux-x64-energy-management-${BUILD_VARIANT}/chip-energy-management-app \
@@ -373,14 +383,14 @@ jobs:
373383
--iterations 1 \
374384
--test-timeout-seconds 120 \
375385
--all-clusters-app ./objdir-clone/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \
376-
--lock-app ./objdir-clone/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \
377-
--ota-provider-app ./objdir-clone/linux-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \
386+
--lock-app ./objdir-clone/linux-x64-lock-${BUILD_VARIANT}-unified/chip-lock-app \
387+
--ota-provider-app ./objdir-clone/linux-x64-ota-provider-${BUILD_VARIANT}-unified/chip-ota-provider-app \
378388
--ota-requestor-app ./objdir-clone/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \
379389
--tv-app ./objdir-clone/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
380-
--bridge-app ./objdir-clone/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
390+
--bridge-app ./objdir-clone/linux-x64-bridge-${BUILD_VARIANT}-unified/chip-bridge-app \
381391
--lit-icd-app ./objdir-clone/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \
382-
--microwave-oven-app ./objdir-clone/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
383-
--rvc-app ./objdir-clone/linux-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \
392+
--microwave-oven-app ./objdir-clone/linux-x64-microwave-oven-${BUILD_VARIANT}-unified/chip-microwave-oven-app \
393+
--rvc-app ./objdir-clone/linux-x64-rvc-${BUILD_VARIANT}-unified/chip-rvc-app \
384394
--network-manager-app ./objdir-clone/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \
385395
--energy-gateway-app ./objdir-clone/linux-x64-energy-gateway-${BUILD_VARIANT}/chip-energy-gateway-app \
386396
--energy-management-app ./objdir-clone/linux-x64-energy-management-${BUILD_VARIANT}/chip-energy-management-app \
@@ -395,14 +405,14 @@ jobs:
395405
--iterations 1 \
396406
--test-timeout-seconds 120 \
397407
--all-clusters-app ./objdir-clone/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \
398-
--lock-app ./objdir-clone/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \
399-
--ota-provider-app ./objdir-clone/linux-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \
408+
--lock-app ./objdir-clone/linux-x64-lock-${BUILD_VARIANT}-unified/chip-lock-app \
409+
--ota-provider-app ./objdir-clone/linux-x64-ota-provider-${BUILD_VARIANT}-unified/chip-ota-provider-app \
400410
--ota-requestor-app ./objdir-clone/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \
401411
--tv-app ./objdir-clone/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
402-
--bridge-app ./objdir-clone/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
412+
--bridge-app ./objdir-clone/linux-x64-bridge-${BUILD_VARIANT}-unified/chip-bridge-app \
403413
--lit-icd-app ./objdir-clone/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \
404-
--microwave-oven-app ./objdir-clone/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
405-
--rvc-app ./objdir-clone/linux-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \
414+
--microwave-oven-app ./objdir-clone/linux-x64-microwave-oven-${BUILD_VARIANT}-unified/chip-microwave-oven-app \
415+
--rvc-app ./objdir-clone/linux-x64-rvc-${BUILD_VARIANT-unified}/chip-rvc-app \
406416
--network-manager-app ./objdir-clone/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \
407417
--energy-gateway-app ./objdir-clone/linux-x64-energy-gateway-${BUILD_VARIANT}/chip-energy-gateway-app \
408418
--energy-management-app ./objdir-clone/linux-x64-energy-management-${BUILD_VARIANT}/chip-energy-management-app \

config/standalone/CHIPProjectConfig.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,8 @@
9696
#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1
9797
#endif
9898

99+
#ifndef CHIP_DEVICE_ENABLE_PORT_PARAMS
100+
#define CHIP_DEVICE_ENABLE_PORT_PARAMS 1
101+
#endif
102+
99103
#endif /* CHIPPROJECTCONFIG_H */

config/standalone/toolchain/BUILD.gn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
import("//build_overrides/build.gni")
1616
import("//build_overrides/chip.gni")
1717

18+
import("//build/config/compiler/compiler.gni")
1819
import("${build_root}/toolchain/gcc_toolchain.gni")
1920

2021
gcc_toolchain("standalone") {
2122
toolchain_args = {
2223
current_os = host_os
2324
current_cpu = host_cpu
24-
is_clang = false
25+
is_clang = is_clang
2526
import("${chip_root}/config/standalone/args.gni")
2627
}
2728
}

0 commit comments

Comments
 (0)