Skip to content

Commit

Permalink
Merge branch 'master' into tc-idm-4.3-(python)
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-marquez-csa committed May 29, 2024
2 parents e566592 + 20b1457 commit ce9f2a0
Show file tree
Hide file tree
Showing 189 changed files with 12,139 additions and 2,757 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ jobs:
scripts/run_in_build_env.sh 'virtualenv pyenv'
source pyenv/bin/activate
pip3 install -r src/setup_payload/python/requirements.txt
python3 src/setup_payload/tests/run_python_setup_payload_gen_test.py out/chip-tool
python3 src/setup_payload/tests/run_python_setup_payload_test.py out/chip-tool
build_linux_python_lighting_device:
name: Build on Linux (python lighting-app)
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ jobs:
bootstrap-logs-framework-${{ matrix.options.flavor }}
- name: Build example All Clusters Server
run: |
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/all-clusters-app chip_config_network_layer_ble=false
- name: Build example OTA Provider
run: |
scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false
scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug/ota-provider-app chip_config_network_layer_ble=false
- name: Build example OTA Requestor
run: |
scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug/ota-requestor-app chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0
Expand All @@ -113,13 +113,8 @@ jobs:
run: |
mkdir -p /tmp/darwin/framework-tests
echo "This is a simple log" > /tmp/darwin/framework-tests/end_user_support_log.txt
../../../out/debug/chip-all-clusters-app --interface-id -1 --end_user_support_log /tmp/darwin/framework-tests/end_user_support_log.txt > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
../../../out/debug/chip-all-clusters-app --interface-id -1 --dac_provider ../../../credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json --product-id 32768 --discriminator 3839 --secured-device-port 5539 --KVS /tmp/chip-all-clusters-app-kvs2 > >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid-err.log >&2) &
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 101 --passcode 1001 --KVS /tmp/chip-all-clusters-app-kvs101 --secured-device-port 5531 &
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 102 --passcode 1002 --KVS /tmp/chip-all-clusters-app-kvs102 --secured-device-port 5532 &
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 103 --passcode 1003 --KVS /tmp/chip-all-clusters-app-kvs103 --secured-device-port 5533 &
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 104 --passcode 1004 --KVS /tmp/chip-all-clusters-app-kvs104 --secured-device-port 5534 &
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 105 --passcode 1005 --KVS /tmp/chip-all-clusters-app-kvs105 --secured-device-port 5535 &
../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 --end_user_support_log /tmp/darwin/framework-tests/end_user_support_log.txt > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 --dac_provider ../../../credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json --product-id 32768 --discriminator 3839 --secured-device-port 5539 --KVS /tmp/chip-all-clusters-app-kvs2 > >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid-err.log >&2) &
export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ jobs:
--known-failure controller/ExamplePersistentStorage.cpp \
--known-failure controller/ExamplePersistentStorage.h \
--known-failure app/AttributeAccessToken.h \
--known-failure app/CommandHandler.h \
--known-failure app/CommandHandlerInterface.h \
--known-failure app/CommandResponseSender.h \
--known-failure app/CommandSenderLegacyCallback.h \
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/minimal-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ concurrency:
cancel-in-progress: true

jobs:
minimal:
minimal-all-clusters:
name: Linux / configure build of all-clusters-app

if: github.actor != 'restyled-io[bot]'
Expand All @@ -47,3 +47,25 @@ jobs:
- name: Configure and build All Clusters App
run: |
CC=gcc CXX=g++ scripts/configure --project=examples/all-clusters-app/linux && ./ninja-build
minimal-network-manager:
name: Linux / configure build of network-manager-app

if: github.actor != 'restyled-io[bot]'
runs-on: ubuntu-latest

container:
image: ghcr.io/project-chip/chip-build-minimal:50

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout submodules # but don't bootstrap!
uses: ./.github/actions/checkout-submodules
with:
platform: linux

- name: Configure and build Network Manager App
run: |
CC=gcc CXX=g++ scripts/configure --project=examples/network-manager-app/linux && ./ninja-build
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \
src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/matter-devices.xml \
Expand Down
3 changes: 2 additions & 1 deletion build/chip/linux/BUILD.gn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 Project CHIP Authors
# Copyright (c) 2020-2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -21,4 +21,5 @@ pkg_config("glib") {
"glib-2.0",
"gio-unix-2.0",
]
optional = true # Only certain conditionally-compiled modules depend on glib
}
11 changes: 8 additions & 3 deletions build/config/linux/pkg-config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Copyright (c) 2020 Project CHIP Authors
# Copyright (c) 2020-2024 Project CHIP Authors
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -127,6 +127,7 @@ def RewritePath(path, strip_prefix, sysroot):
def main():
parser = OptionParser()
parser.add_option('-d', '--debug', action='store_true')
parser.add_option('-o', '--optional', action='store_true')
parser.add_option('-p', action='store', dest='pkg_config', type='string',
default='pkg-config')
parser.add_option('-v', action='append', dest='strip_out', type='string')
Expand Down Expand Up @@ -209,6 +210,10 @@ def main():
try:
flag_string = subprocess.check_output(cmd).decode('utf-8')
except Exception:
if options.optional:
sys.stderr.write('Ignoring failure to run pkg-config for optional library.\n')
print(json.dumps([False])) # Output a GN array indicating missing optional packages
return 0
sys.stderr.write('Could not run pkg-config.\n')
return 1

Expand Down Expand Up @@ -248,10 +253,10 @@ def main():
else:
cflags.append(flag)

# Output a GN array, the first one is the cflags, the second are the libs. The
# Output a GN array, indicating success and our output lists.
# JSON formatter prints GN compatible lists when everything is a list of
# strings.
print(json.dumps([includes, cflags, libs, lib_dirs]))
print(json.dumps([True, includes, cflags, libs, lib_dirs]))
return 0


Expand Down
56 changes: 33 additions & 23 deletions build/config/linux/pkg_config.gni
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Copyright (c) 2020 Project CHIP Authors
# Copyright (c) 2020-2024 Project CHIP Authors
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -43,9 +43,14 @@
#
# You can also use "extra args" to filter out results (see pkg-config.py):
# extra_args = [ "-v, "foo" ]
#
# To ignore libs and ldflags (only cflags/defines will be set, which is useful
# when doing manual dynamic linking), set:
# ignore_libs = true
#
# To allow the build to proceed if (any of) the requested packages are absent, set:
# optional = true
# In this case the resulting config object will be empty.

import("//build_overrides/build.gni")
import("${build_root}/config/sysroot.gni")
Expand Down Expand Up @@ -109,37 +114,42 @@ template("pkg_config") {
} else {
args = pkg_config_args + invoker.packages
}
if (defined(invoker.optional) && invoker.optional) {
args += [ "-o" ]
}
if (defined(invoker.extra_args)) {
args += invoker.extra_args
}

# pkgresult = [present, includes, cflags, libs, lib_dirs]
pkgresult = exec_script(pkg_config_script, args, "value")
cflags = pkgresult[1]
if (pkgresult[0]) {
cflags = pkgresult[2]

foreach(include, pkgresult[0]) {
cflags += [ "-I$include" ]
}
foreach(include, pkgresult[1]) {
cflags += [ "-I$include" ]
}

if (!defined(invoker.ignore_libs) || !invoker.ignore_libs) {
libs = pkgresult[2]
lib_dirs = pkgresult[3]
}
if (!defined(invoker.ignore_libs) || !invoker.ignore_libs) {
libs = pkgresult[3]
lib_dirs = pkgresult[4]
}

# Link libraries statically for OSS-Fuzz fuzzer build
if (oss_fuzz) {
libs = []
ldflags = [ "-Wl,-Bstatic" ]
foreach(lib, pkgresult[2]) {
ldflags += [ "-l$lib" ]
# Link libraries statically for OSS-Fuzz fuzzer build
if (oss_fuzz) {
libs = []
ldflags = [ "-Wl,-Bstatic" ]
foreach(lib, pkgresult[3]) {
ldflags += [ "-l$lib" ]
}
ldflags += [ "-Wl,-Bdynamic" ]
lib_dirs = pkgresult[4]
}
ldflags += [ "-Wl,-Bdynamic" ]
lib_dirs = pkgresult[3]
}

forward_variables_from(invoker,
[
"defines",
"visibility",
])
forward_variables_from(invoker, [ "defines" ])
}
}

# Always forward visibility
forward_variables_from(invoker, [ "visibility" ])
}
Loading

0 comments on commit ce9f2a0

Please sign in to comment.