Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into brettlangdon/allchecks
Browse files Browse the repository at this point in the history
  • Loading branch information
brettlangdon committed Aug 21, 2024
2 parents 35da3a8 + 4d1e946 commit ac57216
Show file tree
Hide file tree
Showing 1,869 changed files with 63,256 additions and 57,552 deletions.
73 changes: 42 additions & 31 deletions .circleci/config.templ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,42 @@ commands:
description: "Install riot"
steps:
# Make sure we install and run riot on Python 3
- run: pip3 install riot==0.19.0
- run: pip3 install riot==0.19.1

setup_rust:
description: "Install rust toolchain"
steps:
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
- run: echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> "$BASH_ENV"

setup_sccache:
description: "Install and configure sccache"
steps:
- run:
name: "Install sccache"
command: |
curl -L https://github.com/mozilla/sccache/releases/download/v0.8.1/sccache-v0.8.1-x86_64-unknown-linux-musl.tar.gz | tar zx --strip-components=1 -C /usr/local/bin/ sccache-v0.8.1-x86_64-unknown-linux-musl/sccache
echo "export SCCACHE_DIR=/root/.cache/sccache" >> "$BASH_ENV"
echo "export SCCACHE_CACHE_SIZE=1G" >> "$BASH_ENV"
echo "export SCCACHE_DIRECT=true" >> "$BASH_ENV"
echo "export DD_USE_SCCACHE=1" >> "$BASH_ENV"
/usr/local/bin/sccache --version
- restore_cache:
name: Restore sccache cache
key: v0-sccache-cache-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ .Environment.CIRCLE_NODE_INDEX }}

save_sccache:
description: "Save the sccache cache"
steps:
- run:
name: "sccache stats"
command: /usr/local/bin/sccache --show-stats
- save_cache:
name: Save sccache cache
key: v0-sccache-cache-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ .Environment.CIRCLE_NODE_INDEX }}-{{ epoch }}
paths:
- /root/.cache/sccache/

setup_hatch:
description: "Install hatch"
steps:
Expand Down Expand Up @@ -153,6 +181,7 @@ commands:
environment:
DD_TRACE_AGENT_URL: << parameters.trace_agent_url >>
RIOT_RUN_RECOMPILE_REQS: "<< pipeline.parameters.riot_run_latest >>"
no_output_timeout: 5m
command: |
ulimit -c unlimited
./scripts/run-test-suite '<<parameters.pattern>>' <<pipeline.parameters.coverage>> 1
Expand Down Expand Up @@ -188,6 +217,7 @@ commands:
- run:
environment:
RIOT_RUN_RECOMPILE_REQS: "<< pipeline.parameters.riot_run_latest >>"
no_output_timeout: 5m
command: |
ulimit -c unlimited
./scripts/run-test-suite '<<parameters.pattern>>' <<pipeline.parameters.coverage>>
Expand Down Expand Up @@ -455,13 +485,15 @@ jobs:
steps:
- checkout
- setup_riot
- setup_sccache
- run:
name: "Generate base virtual environments."
# DEV: riot list -i tracer lists all supported Python versions
command: "riot list -i tracer | circleci tests split | xargs -I PY riot -P -v generate --python=PY"
environment:
CMAKE_BUILD_PARALLEL_LEVEL: 12
PIP_VERBOSE: 1
- save_sccache
- persist_to_workspace:
root: .
paths:
Expand Down Expand Up @@ -519,36 +551,6 @@ jobs:
run_agent_checks: false
docker_services: "pygoat"

appsec_threats_django:
parallelism: 12
<<: *contrib_job
docker:
- image: *ddtrace_dev_image
steps:
- run_hatch_env_test:
env: 'appsec_threats_django'
snapshot: false

appsec_threats_flask:
parallelism: 10
<<: *contrib_job
docker:
- image: *ddtrace_dev_image
steps:
- run_hatch_env_test:
env: 'appsec_threats_flask'
snapshot: false

appsec_threats_fastapi:
parallelism: 9
<<: *contrib_job
docker:
- image: *ddtrace_dev_image
steps:
- run_hatch_env_test:
env: 'appsec_threats_fastapi'
snapshot: false

aws_lambda:
<<: *machine_executor
steps:
Expand All @@ -572,6 +574,7 @@ jobs:
pattern: "datastreams"

tracer:
parallelism: 10
<<: *contrib_job_large
steps:
- run_test:
Expand Down Expand Up @@ -1044,6 +1047,14 @@ jobs:
pattern: 'pytest'
snapshot: true

pytest_v2:
<<: *machine_executor
parallelism: 10
steps:
- run_hatch_env_test:
env: 'pytest_plugin_v2'
snapshot: true

unittest:
<<: *machine_executor
steps:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
name: Generate config
command: |
export GIT_COMMIT_DESC=$(git log -n 1 $CIRCLE_SHA1)
pip3 install riot==0.19.0
pip3 install riot==0.19.1
riot -P -v run --pass-env -s circleci-gen-config -- -v
- continuation/continue:
configuration_path: .circleci/config.gen.yml
Expand Down
245 changes: 245 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveShortCaseStatements:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCaseColons: false
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowBreakBeforeNoexceptSpecifier: Never
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortCompoundRequirementOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: TopLevel
AlwaysBreakAfterReturnType: TopLevel
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros:
- __capability
BinPackArguments: false
BinPackParameters: false
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: Never
AfterEnum: true
AfterExternBlock: true
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: false
SplitEmptyNamespace: true
BreakAdjacentStringLiterals: true
BreakAfterAttributes: Leave
BreakAfterJavaFieldAnnotations: false
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Mozilla
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertBraces: false
InsertNewlineAtEOF: false
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
BinaryMinDigits: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
KeepEmptyLinesAtEOF: false
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: false
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakScopeResolution: 500
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
PPIndentWidth: -1
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
RemoveParentheses: Leave
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SkipMacroDefinitionBody: false
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: LexicographicNumeric
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeJsonColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterPlacementOperator: true
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParens: Never
SpacesInParensOptions:
InCStyleCasts: false
InConditionalStatements: false
InEmptyParentheses: false
Other: false
SpacesInSquareBrackets: false
Standard: Latest
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseTab: Never
VerilogBreakBetweenInstancePorts: true
WhitespaceSensitiveMacros:
- BOOST_PP_STRINGIZE
- CF_SWIFT_NAME
- NS_SWIFT_NAME
- PP_STRINGIZE
- STRINGIZE
...

Loading

0 comments on commit ac57216

Please sign in to comment.