Skip to content

Commit

Permalink
Merge branch 'master' into im/fix-event-chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
erjiaqing committed Mar 29, 2022
2 parents df1d50e + 514af46 commit 406b657
Show file tree
Hide file tree
Showing 974 changed files with 89,934 additions and 60,363 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
Checks: 'bugprone-*,-bugprone-not-null-terminated-result,-bugprone-suspicious-memory-comparison,-bugprone-argument-comment,-bugprone-unused-return-value,-bugprone-branch-clone,-bugprone-easily-swappable-parameters,-bugprone-reserved-identifier,-bugprone-macro-parentheses,-bugprone-forward-declaration-namespace,-bugprone-forwarding-reference-overload,-bugprone-undelegated-constructor,-bugprone-sizeof-expression,-bugprone-implicit-widening-of-multiplication-result,-bugprone-too-small-loop-variable,-bugprone-narrowing-conversions,-bugprone-misplaced-widening-cast,-bugprone-suspicious-include,-bugprone-signed-char-misuse,-bugprone-copy-constructor-init,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-core.NullDereference,-clang-analyzer-optin.cplusplus.UninitializedObject,-clang-analyzer-core.uninitialized.Branch,-clang-analyzer-optin.performance,-clang-analyzer-deadcode.DeadStores,-clang-analyzer-cplusplus.Move,-clang-analyzer-optin.cplusplus.VirtualCall,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-nullability.NullablePassedToNonnull,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.insecureAPI.bzero,-clang-analyzer-unix.cstring.NullArg,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-nullability.NullPassedToNonnull,-clang-analyzer-unix.Malloc,-clang-analyzer-valist.Unterminated,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-diagnostic-implicit-int-conversion'
Checks: 'bugprone-*,-bugprone-not-null-terminated-result,-bugprone-suspicious-memory-comparison,-bugprone-argument-comment,-bugprone-unused-return-value,-bugprone-branch-clone,-bugprone-easily-swappable-parameters,-bugprone-reserved-identifier,-bugprone-macro-parentheses,-bugprone-forward-declaration-namespace,-bugprone-forwarding-reference-overload,-bugprone-undelegated-constructor,-bugprone-sizeof-expression,-bugprone-implicit-widening-of-multiplication-result,-bugprone-too-small-loop-variable,-bugprone-narrowing-conversions,-bugprone-misplaced-widening-cast,-bugprone-suspicious-include,-bugprone-signed-char-misuse,-bugprone-copy-constructor-init,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-core.NullDereference,-clang-analyzer-optin.cplusplus.UninitializedObject,-clang-analyzer-core.uninitialized.Branch,-clang-analyzer-optin.performance,-clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker,-clang-analyzer-deadcode.DeadStores,-clang-analyzer-cplusplus.Move,-clang-analyzer-optin.cplusplus.VirtualCall,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-nullability.NullablePassedToNonnull,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.insecureAPI.bzero,-clang-analyzer-unix.cstring.NullArg,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-nullability.NullPassedToNonnull,-clang-analyzer-unix.Malloc,-clang-analyzer-valist.Unterminated,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-diagnostic-implicit-int-conversion'
WarningsAsErrors: '*'
HeaderFilterRegex: '(src|examples|zzz_generated|credentials)'
20 changes: 19 additions & 1 deletion .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ ATWC
AudioOutput
auth
AuthMode
autoApplyImage
autocompletion
autoconnect
autocrlf
Expand Down Expand Up @@ -176,6 +177,7 @@ CCMP
CCS
CCSTUDIO
CCXML
CDEEDC
CDVersionNumber
ced
cfg
Expand Down Expand Up @@ -342,6 +344,7 @@ detokenizer
dev
devcontainer
devCtrl
DevelopmentCerts
DeviceAttestationCredsExample
DeviceCaCerts
DeviceCert
Expand Down Expand Up @@ -441,6 +444,8 @@ entrypoint
enum
Enums
env
epochKey
epochStartTime
eq
errorValue
esd
Expand Down Expand Up @@ -477,6 +482,7 @@ FC
FDDE
fddead
fde
fdx
FECA
FecalColiformAndEColiConcentrationMeasurement
feff
Expand Down Expand Up @@ -545,6 +551,8 @@ Gradle
gradlew
GroupId
GroupKeyManagement
groupKeySecurityPolicy
groupKeySetID
groupsettings
gtk
GUA
Expand Down Expand Up @@ -650,6 +658,7 @@ kAdminister
kBusy
kCase
Kconfig
kDacPublicKey
KeypadInput
keyset
kGroup
Expand Down Expand Up @@ -886,6 +895,7 @@ OTADownloader
otaDownloadPath
otaImageList
OTAImageProcessorDriver
OTAImageProcessorImpl
OTAImageProcessorInterface
OTAProvider
OTAProviderIpAddress
Expand All @@ -904,6 +914,7 @@ outgoingCommands
OxygenConcentrationMeasurement
OzoneConcentrationMeasurement
PAA
PAAs
PacketBuffer
PAI
PairDevice
Expand Down Expand Up @@ -1105,6 +1116,7 @@ showDocumentation
shubhamdp
SIGINT
SiLabs
Silabs's
SiliconLabs
SimpleFileExFlags
SimpleLink
Expand Down Expand Up @@ -1165,6 +1177,7 @@ SulfurDioxideConcentrationMeasurement
svg
SVR
SWD
SWU
symlinks
sysconfdir
SysConfig
Expand Down Expand Up @@ -1237,6 +1250,7 @@ TotalTrihalomethanesConcentrationMeasurement
trackAlloc
trackFree
transitionTime
TransferSession
TransportMgrBase
TrustedRootCertificates
TSG
Expand All @@ -1252,7 +1266,7 @@ TXD
txt
uargument
UART
udc
UDC
udcport
udhcpc
UDP
Expand All @@ -1279,6 +1293,7 @@ ureverse
URI
urlrequest
usbmodem
usbserial
USBtoUART
uscif
UserConsentNeeded
Expand Down Expand Up @@ -1342,12 +1357,14 @@ xab
xaver
xb
xbef
xBEEF
xc
xcd
Xcode
xcodeproj
xcworkspace
xd
xDEAD
xDEADBEEF
xdeadbeefcafe
xds
Expand Down Expand Up @@ -1426,3 +1443,4 @@ UTF
localedef
nameserver
nmcli
tsan
58 changes: 41 additions & 17 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,22 @@ jobs:
for BUILD_TYPE in gcc_release clang; do
case $BUILD_TYPE in
"gcc_release") GN_ARGS='is_debug=false';;
"clang") GN_ARGS='is_clang=true pw_command_launcher="`pwd`/../scripts/helpers/clang-tidy-launcher.py"';;
"clang") GN_ARGS='is_clang=true';;
esac
scripts/build/gn_gen.sh --args="$GN_ARGS"
scripts/run_in_build_env.sh "ninja -C ./out"
scripts/tests/gn_tests.sh
BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
BUILD_TYPE=$BUILD_TYPE scripts/tests/gn_tests.sh
done
- name: Clang-tidy validation
timeout-minutes: 45
run: |
./scripts/run_in_build_env.sh \
"./scripts/run-clang-tidy-on-compile-commands.py \
--no-log-timestamps \
--compile-database out/clang/compile_commands.json \
check \
"
- name: Run Tests with sanitizers
timeout-minutes: 30
env:
Expand All @@ -189,13 +198,12 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --no-log-timestamps \
--target linux-x64-all-clusters-ipv6only \
--target linux-x64-chip-tool-ipv6only \
--target linux-x64-minmdns-ipv6only \
--target linux-x64-all-clusters-ipv6only-clang \
--target linux-x64-chip-tool-ipv6only-clang \
--target linux-x64-minmdns-ipv6only-clang \
--target linux-x64-rpc-console \
build \
"
- name: Run fake linux tests with build_examples
timeout-minutes: 15
run: |
Expand Down Expand Up @@ -321,20 +329,36 @@ jobs:
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
- name: Setup Build, Run Build and Run Tests
timeout-minutes: 120
# Just go ahead and do the "all" build; on Darwin that's fairly
# fast. If this ever becomes slow, we can think about ways to do
# the examples-linux-standalone.yaml tests on darwin without too
# much code duplication.
run: |
for BUILD_TYPE in clang python_lib; do
for BUILD_TYPE in default python_lib; do
case $BUILD_TYPE in
"clang") GN_ARGS='is_clang=true target_os="all" is_asan=true pw_command_launcher="`pwd`/../scripts/helpers/clang-tidy-launcher.py"';;
# We want to build various standalone example apps
# (similar to what examples-linux-standalone.yaml
# does), so use target_os="all" to get those picked
# up as part of the "unified" build. But then to
# save CI resources we want to exclude a few
# redundant things:
#
# * the mbedtls build, since we don't really plan to
# use that on Darwin.
# * the "host clang" build, which uses the pigweed
# clang.
"default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false enable_host_gcc_mbedtls_build=false';;
"python_lib") GN_ARGS='enable_rtti=true enable_pylib=true';;
esac
scripts/build/gn_gen.sh --args="$GN_ARGS"
scripts/run_in_build_env.sh "ninja -C ./out"
scripts/tests/gn_tests.sh
BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
BUILD_TYPE=$BUILD_TYPE scripts/tests/gn_tests.sh
done
- name: Clang-tidy validation
timeout-minutes: 45
run: |
./scripts/run_in_build_env.sh \
"./scripts/run-clang-tidy-on-compile-commands.py \
--no-log-timestamps \
--compile-database out/default/compile_commands.json \
check \
"
- name: Uploading diagnostic logs
uses: actions/upload-artifact@v2
if: ${{ failure() }} && ${{ !env.ACT }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ jobs:
run: xcodebuild clean
working-directory: src/darwin/Framework
- name: Build example chip-tool-darwin
timeout-minutes: 10
timeout-minutes: 15
run: |
scripts/examples/gn_build_example.sh examples/chip-tool-darwin out/debug chip_config_network_layer_ble=false is_asan=true
- name: Build example All Clusters Server
timeout-minutes: 10
timeout-minutes: 15
run: |
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false
- name: Build example OTA Provider
Expand All @@ -110,7 +110,7 @@ jobs:
run: defaults delete com.apple.dt.xctest.tool
continue-on-error: true
- name: Run Framework Tests
timeout-minutes: 10
timeout-minutes: 15
run: |
mkdir -p /tmp/darwin/framework-tests
../../../out/debug/chip-all-clusters-app > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# TODO ESP32 https://github.com/project-chip/connectedhomeip/issues/1510
esp32:
name: ESP32
timeout-minutes: 80
timeout-minutes: 90

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
out/esp32-m5stack-all-clusters/chip-all-clusters-app.elf \
/tmp/bloat_reports/
- name: Build example All Clusters App C3
timeout-minutes: 10
timeout-minutes: 15
run: scripts/examples/esp_example.sh all-clusters-app sdkconfig_c3devkit.defaults
- name: Copy aside build products
run: |
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:

esp32_1:
name: ESP32_1
timeout-minutes: 70
timeout-minutes: 90

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/examples-linux-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ jobs:
- name: Build example Standalone All Clusters Server
timeout-minutes: 5
run: |
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/all_clusters_debug \
chip_bypass_rendezvous=true
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/all_clusters_debug
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
linux debug all-clusters-app \
out/all_clusters_debug/chip-all-clusters-app \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-nrfconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF52840 DK with RPC
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 10
timeout-minutes: 20
run: |
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840 -DOVERLAY_CONFIG=rpc.overlay
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-telink:0.5.58
image: connectedhomeip/chip-build-telink:0.5.59
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzzing-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target darwin-x64-all-clusters-no-ble-asan-libfuzzer \
--target darwin-x64-all-clusters-no-ble-asan-libfuzzer-clang \
build \
--copy-artifacts-to objdir-clone \
"
Expand Down
Loading

0 comments on commit 406b657

Please sign in to comment.