Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
daantimmer committed Jan 4, 2024
0 parents commit 5d0973b
Show file tree
Hide file tree
Showing 78 changed files with 5,880 additions and 0 deletions.
164 changes: 164 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
---
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: true
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeComma
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 0
CommentPragmas: "^ IWYU pragma:|^NOSONAR"
QualifierAlignment: Leave
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
PackConstructorInitializers: Never
FixNamespaceComments: false
IncludeBlocks: Merge
IncludeCategories:
- Regex: ^(<|"(gtest|gmock)/)
Priority: 2
- Regex: ^(</)
Priority: 3
- Regex: .*
Priority: 1
IncludeIsMainRegex: (Test)?$
IncludeIsMainSourceRegex: ""
IndentAccessModifiers: false
IndentCaseLabels: true
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
MacroBlockBegin: ""
MacroBlockEnd: ""
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 1000
PenaltyIndentedWhitespace: 0
PointerAlignment: Left
PPIndentWidth: -1
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
SeparateDefinitionBlocks: Always
ShortNamespaceLines: 1
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
BeforeNonEmptyParentheses: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Latest
TabWidth: 4
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- CONCAT
- GIVEN
- WHEN
- THEN
5 changes: 5 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
Checks: '-*,modernize-use-override'
WarningsAsErrors: ''
HeaderFilterRegex: '.*'
FormatStyle: file
12 changes: 12 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
CompileFlags:
CompilationDatabase: .build/
Diagnostics:
UnusedIncludes: Strict
ClangTidy:
Add: []
Remove: []
InlayHints:
Enabled: Yes
ParameterNames: No
DeducedTypes: No
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM ghcr.io/philips-software/amp-devcontainer:v4.1.0@sha256:5fcae1beec518afa5e574322ed0f742108c1598ad71ebf7349a4b6ce055336b1
24 changes: 24 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/cpp
{
"build": {
"context": "..",
"dockerfile": "Dockerfile"
},
// Add the IDs of extensions you want installed when the container is created.
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"mcu-debug.debug-tracker-vscode",
"matepek.vscode-catch2-test-adapter",
"ms-vscode.cmake-tools",
"llvm-vs-code-extensions.vscode-clangd",
"twxs.cmake",
"ms-vscode.cpptools",
"akiramiyakoda.cppincludeguard",
"alexkrechik.cucumberautocomplete"
]
}
}
}
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @philips-software/awesome-embedded-projects
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
version: 2

updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
commit-message:
prefix: "build(deps)"
- package-ecosystem: docker
directory: .devcontainer
schedule:
interval: daily
83 changes: 83 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
name: Build & Test

on:
push:
branches: [develop]
tags:
- v**
merge_group:
pull_request:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

env:
GTEST_COLOR: 1

jobs:
build-windows:
name: Windows Host Build
runs-on: [ubuntu-latest]
container: ghcr.io/philips-software/amp-devcontainer@sha256:2d052e0bcb3840ea45aaa21ea6904f6d84b0e310c97e5690a6d48da522ec384e #v4.0.2
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
id: cache-winsdk
with:
path: /winsdk
key: cache-winsdk
- if: ${{ steps.cache-winsdk.outputs.cache-hit != 'true' }}
run: ./get-winsdk.sh
- uses: hendrikmuhs/ccache-action@2a51777f6f64b7b7bea213601acba8f5f4fdbe03 #v1.2.11
with:
key: ${{ github.job }}
max-size: 2G
- run: |
cmake --preset=Windows
cmake --build --preset=Windows-Release
build-linux:
name: Linux Host Build
runs-on: [ubuntu-latest]
container: ghcr.io/philips-software/amp-devcontainer@sha256:2d052e0bcb3840ea45aaa21ea6904f6d84b0e310c97e5690a6d48da522ec384e #v4.0.2
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: hendrikmuhs/ccache-action@2a51777f6f64b7b7bea213601acba8f5f4fdbe03 #v1.2.11
with:
key: ${{ github.job }}
max-size: 2G
- run: |
cmake --preset=Host
cmake --build --preset=Host-Release
ctest --preset=Host-Release
test-linux:
name: Linux Host Test
runs-on: [ubuntu-latest]
permissions:
contents: read
issues: read
checks: write
pull-requests: write
container: ghcr.io/philips-software/amp-devcontainer@sha256:2d052e0bcb3840ea45aaa21ea6904f6d84b0e310c97e5690a6d48da522ec384e #v4.0.2
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: hendrikmuhs/ccache-action@2a51777f6f64b7b7bea213601acba8f5f4fdbe03 #v1.2.11
with:
key: ${{ github.job }}
max-size: 2G
- run: |
cmake --preset=Host
cmake --build --preset=Host-Debug
bats --formatter junit test/test.bats | tee test-report.xml
- uses: EnricoMi/publish-unit-test-result-action@e780361cd1fc1b1a170624547b3ffda64787d365 # v2.12.0
if: always()
with:
files: test-report.xml
19 changes: 19 additions & 0 deletions .github/workflows/conventional-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: conventional-pr

on:
merge_group:
pull_request:

permissions: read-all

jobs:
conventional_commit:
runs-on: [ubuntu-latest]
steps:
- uses: Namchee/conventional-pr@b31518c34a4243c21484e3187abbbee4a44d0ec4 # v0.15.4
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
body: false
issue: false
close: false
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.build
.install
.xwin-cache
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
38 changes: 38 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.launchTargetPath}",
"args": [
"--tag",
"@smoke",
"--feature",
"cucumber-cpp-example/features/1very_long.feature",
"cucumber-cpp-example/features/2simple.feature",
"--report",
"json",
"console",
"junit-xml",
"--Xapp,--st"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
Loading

0 comments on commit 5d0973b

Please sign in to comment.