Skip to content

Commit 4096927

Browse files
committed
Adds SDK initial version
Signed-off-by: jfedorov <[email protected]>
1 parent a8b1030 commit 4096927

File tree

106 files changed

+17015
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+17015
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: sdk-build-and-test
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build-and-test:
11+
12+
runs-on: self-hosted
13+
14+
steps:
15+
- name: Clean-up
16+
run: rm -rf .
17+
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Build
22+
run: |
23+
cmake --preset default
24+
cmake --build --preset default -j $(($(nproc)/2))
25+
working-directory: sdk
26+
27+
- name: Test
28+
run: ctest --output-on-failure --test-dir build
29+
30+
- name: BuildSanitized
31+
run: |
32+
cmake --preset asan
33+
cmake --build --preset asan --parallel $(($(nproc)/2))
34+
working-directory: sdk
35+
36+
- name: BuildFuzz
37+
run: |
38+
# To ensure it still builds, run build for fuzz targets until we have
39+
# proper fuzz testing infrastructure in place.
40+
cmake --preset fuzz
41+
cmake --build --preset fuzz --parallel $(($(nproc)/2))
42+
working-directory: sdk
43+
44+
- name: TestSanitized
45+
run: ctest --preset asan --output-on-failure -L samples
46+
working-directory: sdk

sdk/.clang-format

Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: Google
4+
AccessModifierOffset: -1
5+
AlignAfterOpenBracket: Align
6+
AlignArrayOfStructures: None
7+
AlignConsecutiveAssignments:
8+
Enabled: false
9+
AcrossEmptyLines: false
10+
AcrossComments: false
11+
AlignCompound: false
12+
PadOperators: true
13+
AlignConsecutiveBitFields:
14+
Enabled: false
15+
AcrossEmptyLines: false
16+
AcrossComments: false
17+
AlignCompound: false
18+
PadOperators: false
19+
AlignConsecutiveDeclarations:
20+
Enabled: false
21+
AcrossEmptyLines: false
22+
AcrossComments: false
23+
AlignCompound: false
24+
PadOperators: false
25+
AlignConsecutiveMacros:
26+
Enabled: false
27+
AcrossEmptyLines: false
28+
AcrossComments: false
29+
AlignCompound: false
30+
PadOperators: false
31+
AlignEscapedNewlines: Left
32+
AlignOperands: Align
33+
AlignTrailingComments: true
34+
AllowAllArgumentsOnNextLine: true
35+
AllowAllParametersOfDeclarationOnNextLine: true
36+
AllowShortEnumsOnASingleLine: true
37+
AllowShortBlocksOnASingleLine: Never
38+
AllowShortCaseLabelsOnASingleLine: false
39+
AllowShortFunctionsOnASingleLine: All
40+
AllowShortLambdasOnASingleLine: All
41+
AllowShortIfStatementsOnASingleLine: WithoutElse
42+
AllowShortLoopsOnASingleLine: true
43+
AlwaysBreakAfterDefinitionReturnType: None
44+
AlwaysBreakAfterReturnType: None
45+
AlwaysBreakBeforeMultilineStrings: true
46+
AlwaysBreakTemplateDeclarations: Yes
47+
AttributeMacros:
48+
- __capability
49+
BinPackArguments: true
50+
BinPackParameters: true
51+
BraceWrapping:
52+
AfterCaseLabel: false
53+
AfterClass: false
54+
AfterControlStatement: Never
55+
AfterEnum: false
56+
AfterFunction: false
57+
AfterNamespace: false
58+
AfterObjCDeclaration: false
59+
AfterStruct: false
60+
AfterUnion: false
61+
AfterExternBlock: false
62+
BeforeCatch: false
63+
BeforeElse: false
64+
BeforeLambdaBody: false
65+
BeforeWhile: false
66+
IndentBraces: false
67+
SplitEmptyFunction: true
68+
SplitEmptyRecord: true
69+
SplitEmptyNamespace: true
70+
BreakBeforeBinaryOperators: None
71+
BreakBeforeConceptDeclarations: Always
72+
BreakBeforeBraces: Attach
73+
BreakBeforeInheritanceComma: false
74+
BreakInheritanceList: BeforeColon
75+
BreakBeforeTernaryOperators: true
76+
BreakConstructorInitializersBeforeComma: false
77+
BreakConstructorInitializers: BeforeColon
78+
BreakAfterJavaFieldAnnotations: false
79+
BreakStringLiterals: true
80+
ColumnLimit: 100
81+
CommentPragmas: '^ IWYU pragma:'
82+
QualifierAlignment: Leave
83+
CompactNamespaces: false
84+
ConstructorInitializerIndentWidth: 4
85+
ContinuationIndentWidth: 4
86+
Cpp11BracedListStyle: true
87+
DeriveLineEnding: true
88+
DerivePointerAlignment: true
89+
DisableFormat: false
90+
EmptyLineAfterAccessModifier: Never
91+
EmptyLineBeforeAccessModifier: LogicalBlock
92+
ExperimentalAutoDetectBinPacking: false
93+
PackConstructorInitializers: NextLine
94+
BasedOnStyle: ''
95+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
96+
AllowAllConstructorInitializersOnNextLine: true
97+
FixNamespaceComments: true
98+
ForEachMacros:
99+
- foreach
100+
- Q_FOREACH
101+
- BOOST_FOREACH
102+
IfMacros:
103+
- KJ_IF_MAYBE
104+
IncludeBlocks: Regroup
105+
IncludeCategories:
106+
- Regex: '^<ext/.*\.h>'
107+
Priority: 2
108+
SortPriority: 0
109+
CaseSensitive: false
110+
- Regex: '^<.*\.h>'
111+
Priority: 1
112+
SortPriority: 0
113+
CaseSensitive: false
114+
- Regex: '^<.*'
115+
Priority: 2
116+
SortPriority: 0
117+
CaseSensitive: false
118+
- Regex: '.*'
119+
Priority: 3
120+
SortPriority: 0
121+
CaseSensitive: false
122+
IncludeIsMainRegex: '([-_](test|unittest))?$'
123+
IncludeIsMainSourceRegex: ''
124+
IndentAccessModifiers: false
125+
IndentCaseLabels: true
126+
IndentCaseBlocks: false
127+
IndentGotoLabels: true
128+
IndentPPDirectives: None
129+
IndentExternBlock: AfterExternBlock
130+
IndentRequiresClause: true
131+
IndentWidth: 2
132+
IndentWrappedFunctionNames: false
133+
InsertBraces: false
134+
InsertTrailingCommas: None
135+
JavaScriptQuotes: Leave
136+
JavaScriptWrapImports: true
137+
KeepEmptyLinesAtTheStartOfBlocks: false
138+
LambdaBodyIndentation: Signature
139+
MacroBlockBegin: ''
140+
MacroBlockEnd: ''
141+
MaxEmptyLinesToKeep: 1
142+
NamespaceIndentation: None
143+
ObjCBinPackProtocolList: Never
144+
ObjCBlockIndentWidth: 2
145+
ObjCBreakBeforeNestedBlockParam: true
146+
ObjCSpaceAfterProperty: false
147+
ObjCSpaceBeforeProtocolList: true
148+
PenaltyBreakAssignment: 2
149+
PenaltyBreakBeforeFirstCallParameter: 1
150+
PenaltyBreakComment: 300
151+
PenaltyBreakFirstLessLess: 120
152+
PenaltyBreakOpenParenthesis: 0
153+
PenaltyBreakString: 1000
154+
PenaltyBreakTemplateDeclaration: 10
155+
PenaltyExcessCharacter: 1000000
156+
PenaltyReturnTypeOnItsOwnLine: 200
157+
PenaltyIndentedWhitespace: 0
158+
PointerAlignment: Left
159+
PPIndentWidth: -1
160+
RawStringFormats:
161+
- Language: Cpp
162+
Delimiters:
163+
- cc
164+
- CC
165+
- cpp
166+
- Cpp
167+
- CPP
168+
- 'c++'
169+
- 'C++'
170+
CanonicalDelimiter: ''
171+
BasedOnStyle: google
172+
- Language: TextProto
173+
Delimiters:
174+
- pb
175+
- PB
176+
- proto
177+
- PROTO
178+
EnclosingFunctions:
179+
- EqualsProto
180+
- EquivToProto
181+
- PARSE_PARTIAL_TEXT_PROTO
182+
- PARSE_TEST_PROTO
183+
- PARSE_TEXT_PROTO
184+
- ParseTextOrDie
185+
- ParseTextProtoOrDie
186+
- ParseTestProto
187+
- ParsePartialTestProto
188+
CanonicalDelimiter: pb
189+
BasedOnStyle: google
190+
ReferenceAlignment: Pointer
191+
ReflowComments: true
192+
RemoveBracesLLVM: false
193+
RequiresClausePosition: OwnLine
194+
SeparateDefinitionBlocks: Leave
195+
ShortNamespaceLines: 1
196+
SortIncludes: CaseSensitive
197+
SortJavaStaticImport: Before
198+
SortUsingDeclarations: true
199+
SpaceAfterCStyleCast: false
200+
SpaceAfterLogicalNot: false
201+
SpaceAfterTemplateKeyword: true
202+
SpaceBeforeAssignmentOperators: true
203+
SpaceBeforeCaseColon: false
204+
SpaceBeforeCpp11BracedList: false
205+
SpaceBeforeCtorInitializerColon: true
206+
SpaceBeforeInheritanceColon: true
207+
SpaceBeforeParens: ControlStatements
208+
SpaceBeforeParensOptions:
209+
AfterControlStatements: true
210+
AfterForeachMacros: true
211+
AfterFunctionDefinitionName: false
212+
AfterFunctionDeclarationName: false
213+
AfterIfMacros: true
214+
AfterOverloadedOperator: false
215+
AfterRequiresInClause: false
216+
AfterRequiresInExpression: false
217+
BeforeNonEmptyParentheses: false
218+
SpaceAroundPointerQualifiers: Default
219+
SpaceBeforeRangeBasedForLoopColon: true
220+
SpaceInEmptyBlock: false
221+
SpaceInEmptyParentheses: false
222+
SpacesBeforeTrailingComments: 2
223+
SpacesInAngles: Never
224+
SpacesInConditionalStatement: false
225+
SpacesInContainerLiterals: true
226+
SpacesInCStyleCastParentheses: false
227+
SpacesInLineCommentPrefix:
228+
Minimum: 1
229+
Maximum: -1
230+
SpacesInParentheses: false
231+
SpacesInSquareBrackets: false
232+
SpaceBeforeSquareBrackets: false
233+
BitFieldColonSpacing: Both
234+
Standard: Auto
235+
StatementAttributeLikeMacros:
236+
- Q_EMIT
237+
StatementMacros:
238+
- Q_UNUSED
239+
- QT_REQUIRE_VERSION
240+
TabWidth: 8
241+
UseCRLF: false
242+
UseTab: Never
243+
WhitespaceSensitiveMacros:
244+
- STRINGIZE
245+
- PP_STRINGIZE
246+
- BOOST_PP_STRINGIZE
247+
- NS_SWIFT_NAME
248+
- CF_SWIFT_NAME
249+
...
250+

sdk/.clang-tidy

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Checks: '-*,google*,cppcoreguidelines*,readability*'
2+
CheckOptions:
3+
- key: readability-identifier-naming.GlobalConstantCase
4+
value: CamelCase
5+
- key: readability-identifier-naming.GlobalConstantPrefix
6+
value: k
7+
- key: readability-identifier-naming.ClassCase
8+
value: CamelCase
9+
- key: readability-identifier-naming.EnumCase
10+
value: CamelCase
11+
- key: readability-identifier-naming.EnumConstantCase
12+
value: CamelCase
13+
- key: readability-identifier-naming.EnumConstantPrefix
14+
value: k
15+
- key: readability-identifier-naming.FunctionCase
16+
value: CamelCase
17+
- key: readability-identifier-naming.ClassMemberCase
18+
value: lower_case
19+
- key: readability-identifier-naming.ClassMemberSuffix
20+
value: _
21+
- key: readability-identifier-naming.VariableCase
22+
value: lower_case
23+
- key: readability-identifier-naming.IgnoreMainLikeFunctions
24+
value: 1
25+
- key: readability-implicit-bool-conversion.AllowPointerConditions
26+
value: 1
27+
- key: readability-implicit-bool-conversion.AllowIntegerConditions
28+
value: 1

0 commit comments

Comments
 (0)