Skip to content

Commit

Permalink
Code Release 2022
Browse files Browse the repository at this point in the history
Co-authored-by: Leon B.
Co-authored-by: Dominik Brämer <[email protected]>
Co-authored-by: Lisa Dasmann <[email protected]>
Co-authored-by: Jonas Dauer <[email protected]>
Co-authored-by: Alicia Gayda <[email protected]>
Co-authored-by: Henri Gründer <[email protected]>
Co-authored-by: Mrunal Hatwar <[email protected]>
Co-authored-by: Joël Haubold <[email protected]>
Co-authored-by: Diana Kleingarn <[email protected]>
Co-authored-by: Thomas Klute <[email protected]>
Co-authored-by: Simon Koschel <[email protected]>
Co-authored-by: Aaron Larisch <[email protected]>
Co-authored-by: Mahdokht Mohammadi <[email protected]>
Co-authored-by: Arne Moos <[email protected]>
Co-authored-by: Steven Pieper <[email protected]>
Co-authored-by: Ingmar Schwarz <[email protected]>
Co-authored-by: Oliver Urbann <[email protected]>
Co-authored-by: Alexander Voß <[email protected]>
  • Loading branch information
17 people committed Feb 16, 2023
1 parent b47d2ce commit e8116f9
Show file tree
Hide file tree
Showing 14,226 changed files with 291,984 additions and 2,720,850 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
162 changes: 162 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Requires clang-format>=13. If that changes, also modify .github/workflows/clang-format.sh
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: DontAlign
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Left
AlignOperands: DontAlign
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
AttributeMacros: []
BinPackArguments: false
BinPackParameters: false
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: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeConceptDeclarations: true
BreakBeforeBraces: Allman
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 180
CommentPragmas: ''
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: false
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
BasedOnStyle: 'LLVM'
FixNamespaceComments: true
ForEachMacros: []
IfMacros: []
IncludeBlocks: Preserve
IncludeCategories: []
IncludeIsMainRegex: ''
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 19
PenaltyBreakBeforeFirstCallParameter: 39
PenaltyBreakComment: 600
PenaltyBreakFirstLessLess: 80
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 20
PenaltyExcessCharacter: 1
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 5
PointerAlignment: Left
PPIndentWidth: -1
ReferenceAlignment: Pointer
ReflowComments: false
ShortNamespaceLines: 1
SortIncludes: Never
SortJavaStaticImport: Before
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
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
StatementAttributeLikeMacros: []
StatementMacros: []
TabWidth: 2
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- DEFINES_PARAMETERS
- ENUM
- LOADS_PARAMETERS
- MODULE
- option
- STREAMABLE
- STREAMABLE_WITH_BASE
- STREAMABLE_WITH_BASE_EMPTY
- BIGENUM
...

9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
48 changes: 48 additions & 0 deletions .github/workflows/clang-format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash
# Format all files in a git repo and output the resulting diff.
# Should be run with a clean working directory.
# If a git ref is provided as first argument, only format the changes between the ref and HEAD.
# The clang-format binary can be set with git setting clangFormat.binary or environment variable CF_BINARY.
# return values:
# 0 formatting correct
# 2 incorrect formatting (=non-empty diff)
# 3 wrong version of clang-format

MIN_VERSION=13

# Set clang-format binary
CF_BINARY_GIT=$(git config clangFormat.binary)
[ -z "${CF_BINARY}" ] && CF_BINARY=${CF_BINARY_GIT:-'clang-format'}

# Check version
VERSION=$("${CF_BINARY}" --version | sed -e 's/[^0-9]*//')
MAJ_VERSION=$(echo ${VERSION} | sed -e 's/\([0-9]*\)\.[0-9]*\.[0-9]*.*/\1/')
if [ "${MAJ_VERSION}" -lt "${MIN_VERSION}" ]; then
echo >&2 "requirement clang-format>=${MIN_VERSION} not met (provided ${VERSION})"
exit 3
fi

# Set patterns to exclude from formatting
[ -z ${CF_EXCLUDE} ] && CF_EXCLUDE=(
':!/Util/GameController/**'
':!/Util/libqxt/**'
':!/Util/qtpropertybrowser/**'
':!/Util/visualmesh/**'
)

if [ -n "$1" ]; then
echo "using ref for checking changes: origin/$1"
F=$(git diff --name-only "origin/$1" -- "*.cpp" "*.h" ${CF_EXCLUDE[*]})
else
echo "no ref provided: checking all files"
F=$(git ls-files -- "*.cpp" "*.h" ${CF_EXCLUDE[*]})
fi

for f in $F; do
msg="$("$CF_BINARY" --style=file -i "$f" 2>&1)"
[[ -z "$msg" ]] || echo "$f: $msg"
done

git diff --exit-code -- . ${CF_EXCLUDE[*]} || exit 2

echo "ok"
30 changes: 0 additions & 30 deletions .github/workflows/dorsh_linux.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/dorsh_windows.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Formatting

on:
pull_request:

jobs:
clang_format:
name: ClangFormat
runs-on: self-hosted
timeout-minutes: 10
steps:
- uses: actions/checkout@v1
with:
fetch-depth: '0'
- name: Check C++ formatting
run: bash -l -c ".github/workflows/clang-format.sh $Env:GITHUB_BASE_REF"
line_endings:
name: Line endings
runs-on: self-hosted
timeout-minutes: 10
steps:
- uses: actions/checkout@v1
with:
fetch-depth: '0'
- name: Check line endings
run: bash -l -c ".github/workflows/line-endings.sh $Env:GITHUB_BASE_REF"
33 changes: 33 additions & 0 deletions .github/workflows/line-endings.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
# Set the line ending of all text files in a git repo to LF and output the resulting diff.
# Should be run with a clean working directory.
# If a git ref is provided as first argument, only touch the changed files between the ref and HEAD.
# return values:
# 0 line endings were correct
# 2 incorrect line endings (=non-empty diff)

# Set patterns to exclude from formatting
[ -z ${LE_EXCLUDE} ] && LE_EXCLUDE=(
':!/Util/GameController/**'
':!/Util/libqxt/**'
':!/Util/qtpropertybrowser/**'
':!/Util/visualmesh/**'
)

if [ -n "$1" ]; then
echo "using ref for checking changes: origin/$1"
F=$(git diff --name-only "origin/$1" -- ${LE_EXCLUDE[*]})
else
echo "no ref provided: checking all files"
F=$(git ls-files -- ${LE_EXCLUDE[*]})
fi

for f in $F; do
if file -bi "$f" | grep text >/dev/null; then
dos2unix -q "$f"
fi
done

git diff --exit-code -- . ${LE_EXCLUDE[*]} || exit 2

echo "ok"
29 changes: 29 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and test on Linux

on:
pull_request:
push:
paths:
- '.github/workflows/**'
- 'CMakeLists.txt'
- 'CMakePresets.json'
- 'Config/**'
- '!Config/Robots/**'
- 'Config/Robots/Nao/**'
- '!Config/Overlays/**'
- 'Make/CMake/**'
- 'Make/Common/test.sh'
- 'Src/**'
- 'Util/**'

jobs:
build_simrobot:
name: Build framework
runs-on: self-hosted
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
- name: compile
run: bash -l -c "Make/Linux/compile.sh"
- name: test
run: bash -l -c "Make/Common/test.sh"
Loading

0 comments on commit e8116f9

Please sign in to comment.