Skip to content

Commit

Permalink
Merge pull request #196 from project-chip/master
Browse files Browse the repository at this point in the history
update local master
  • Loading branch information
hnnajh authored May 13, 2024
2 parents 05df01e + 0180ee6 commit 1211c4f
Show file tree
Hide file tree
Showing 15,871 changed files with 3,327,995 additions and 1,296,497 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
27 changes: 27 additions & 0 deletions .actrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file contains settings for local github action runner act:
# https://github.com/nektos/act
#
# It is recommended to run specific jobs that you need, all jobs except those
# running on should darwin work.
# e.g. act -j build_linux
#
# It is recommended to set up a separate bridge network
# and possibly define it in ~/.actrc like so:
# --network=bridge
# https://docs.docker.com/network/drivers/bridge/

# Remove containers after finishing a job, comment out for debugging
--rm

# Reuse the checkout from host, otherwise act will do docker cp that makes
# running jobs a lot longer even on SSD. Clean up your .environment before
# running it.
--bind

# Easier to have 1:1 match between triggering jobs and reading logs when they
# use the same name
--log-prefix-job-id

# Default runner image does not include enough.
# https://github.com/nektos/act#default-runners-are-intentionally-incomplete
-P ubuntu-latest=catthehacker/ubuntu:full-latest
127 changes: 6 additions & 121 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -106,130 +106,15 @@ SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 8
UseTab: Never
InsertNewlineAtEOF: true
---
Language: ObjC
# BasedOnStyle: WebKit
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: false
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: All
BreakBeforeBraces: WebKit
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 132
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
Language: ObjC
BasedOnStyle: WebKit
Standard: c++17
PointerAlignment: Middle
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseTab: Never
SpaceInEmptyBlock: false
ObjCBreakBeforeNestedBlockParam: false
---
Language: JavaScript
BasedOnStyle: WebKit
Expand Down
49 changes: 47 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,49 @@
---
Checks: 'readability-else-after-return,modernize-use-nullptr,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'
Checks: >
bugprone-*,
modernize-redundant-void-arg,
modernize-use-bool-literals,
modernize-use-nullptr,
performance-for-range-copy,
readability-const-return-type,
readability-else-after-return,
readability-redundant-control-flow,
readability-redundant-string-cstr,
readability-redundant-string-init,
-bugprone-assignment-in-if-condition,
-bugprone-branch-clone,
-bugprone-copy-constructor-init,
-bugprone-easily-swappable-parameters,
-bugprone-forward-declaration-namespace,
-bugprone-forwarding-reference-overload,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-inc-dec-in-conditions,
-bugprone-macro-parentheses,
-bugprone-misplaced-widening-cast,
-bugprone-multi-level-implicit-pointer-conversion,
-bugprone-narrowing-conversions,
-bugprone-not-null-terminated-result,
-bugprone-reserved-identifier,
-bugprone-signed-char-misuse,
-bugprone-suspicious-include,
-bugprone-switch-missing-default-case,
-bugprone-undelegated-constructor,
-bugprone-unused-return-value,
-clang-analyzer-core.CallAndMessage,
-clang-analyzer-core.NonNullParamChecker,
-clang-analyzer-core.NullDereference,
-clang-analyzer-cplusplus.Move,
-clang-analyzer-deadcode.DeadStores,
-clang-analyzer-nullability.NullablePassedToNonnull,
-clang-analyzer-optin.core.EnumCastOutOfRange,
-clang-analyzer-optin.cplusplus.UninitializedObject,
-clang-analyzer-optin.cplusplus.VirtualCall,
-clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker,
-clang-analyzer-optin.performance,
-clang-analyzer-optin.performance.Padding,
-clang-analyzer-security.insecureAPI.rand,
-clang-analyzer-security.insecureAPI.strcpy,
-clang-analyzer-unix.Malloc,
-clang-diagnostic-implicit-int-conversion
WarningsAsErrors: '*'
HeaderFilterRegex: '(src|examples|zzz_generated|credentials)'
HeaderFilterRegex: '(src|examples|zzz_generated|credentials).*(?<!third_party.*repo)'
74 changes: 37 additions & 37 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
ARG BUILD_VERSION

# All tools required for compilation belong in chip-build, forms "truth" for CHIP build tooling
FROM connectedhomeip/chip-build-vscode:${BUILD_VERSION}
FROM ghcr.io/project-chip/chip-build-vscode:${BUILD_VERSION}
LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip

# This Dockerfile contains things useful for an interactive development environment
ARG USERNAME=vscode
Expand All @@ -25,52 +26,51 @@ ENV LANG en_US.utf8

# these are installed for terminal/dev convenience. If more tooling for build is required, please
# add them to chip-build (in integrations/docker/images/chip-build)
RUN apt-get update
RUN apt-get install -y locales && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
RUN apt-get -fy install git vim emacs sudo \
RUN apt-get update \
&& apt-get install -y locales \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
&& apt-get -fy install git vim emacs sudo \
apt-utils dialog zsh \
iproute2 procps lsb-release \
bash-completion \
build-essential cmake cppcheck valgrind \
wget curl telnet \
docker.io \
iputils-ping net-tools \
libncurses5
libncurses5 \
libncursesw5 \
libpython2.7 \
&& :

RUN groupadd -g $USER_GID $USERNAME
RUN useradd -s /bin/bash -u $USER_UID -g $USER_GID -G docker -m $USERNAME
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME
RUN chmod 0440 /etc/sudoers.d/$USERNAME
RUN groupadd -g $USER_GID $USERNAME \
&& useradd -s /bin/bash -u $USER_UID -g $USER_GID -G docker,sudo -m $USERNAME \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
&& :

RUN mkdir -p /var/downloads
RUN cd /var/downloads
RUN curl -JL https://github.com/microsoft/vscode-cpptools/releases/download/0.27.0/cpptools-linux.vsix > extension.zip
RUN unzip extension.zip
RUN mkdir -p /home/$USERNAME/.vscode-server/extensions
RUN mv extension /home/$USERNAME/.vscode-server/extensions/ms-vscode.cpptools-0.27.0
RUN mkdir -p /home/$USERNAME/bin
RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/restyle-path -o /home/$USERNAME/bin/restyle-path
RUN chmod +x /home/$USERNAME/bin/restyle-path
RUN chown -R $USERNAME:$USERNAME /home/$USERNAME
RUN echo "PATH=/home/$USERNAME/bin:${PATH}" >> /home/$USERNAME/.bashrc
RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/restyle-path -o /usr/local/bin/restyle-path \
&& chmod +x /usr/local/bin/restyle-path \
&& :

# $USERNAME needs to own the esp-idf and tools for the examples to build
RUN chown -R $USERNAME:$USERNAME /opt/espressif/esp-idf
RUN chown -R $USERNAME:$USERNAME /opt/espressif/tools
RUN mkdir -p /opt/sdk/sdks/ \
&& chown -R $USERNAME:$USERNAME \
/opt/sdk/sdks/ `# NXP uses a patch_sdk script to change SDK files` \
/opt/NordicSemiconductor/nrfconnect/ `# $USERNAME needs to own west configuration to build nRF Connect examples` \
$IDF_PATH `# $USERNAME needs to own the esp-idf and tools for the examples to build` \
$IDF_TOOLS_PATH \
$SYSROOT_AARCH64 `# allow read/write access to header and libraries` \
$ANDROID_HOME `# allow licenses to be accepted` \
$AMEBA_PATH `# AmebaD requires access to change build_info.h` \
$IMX_SDK_ROOT \
&& :

# $USERNAME needs to own west configuration to build nRF Connect examples
RUN chown -R $USERNAME:$USERNAME /opt/NordicSemiconductor/nrfconnect/
# Fix Tizen SDK paths for new user
RUN sed -i '/^TIZEN_SDK_DATA_PATH/d' $TIZEN_SDK_ROOT/sdk.info \
&& echo TIZEN_SDK_DATA_PATH=/home/$USERNAME/tizen-sdk-data >> $TIZEN_SDK_ROOT/sdk.info \
&& ln -sf /home/$USERNAME/.tizen-cli-config $TIZEN_SDK_ROOT/tools/.tizen-cli-config \
&& : # last line

# allow read/write access to header and libraries
RUN chown -R $USERNAME:$USERNAME /opt/ubuntu-21.04-aarch64-sysroot/usr/
ENV TIZEN_ROOTFS /tizen_rootfs

# allow licenses to be accepted
RUN chown -R $USERNAME:$USERNAME /opt/android/sdk

# AmebaD requires access to change build_info.h
RUN chown -R $USERNAME:$USERNAME /opt/ameba/ambd_sdk_with_chip_non_NDA/

# NXP uses a patch_sdk script to change SDK files
RUN chown -R $USERNAME:$USERNAME /opt/sdk/sdks/

RUN chown -R $USERNAME:$USERNAME /opt/fsl-imx-xwayland/5.10-hardknott/
# Fast Model GDB plugins path for debugging support
ENV FAST_MODEL_PLUGINS_PATH /opt/FastModelsPortfolio_11.16/plugins/Linux64_GCC-9.3
Loading

0 comments on commit 1211c4f

Please sign in to comment.