Skip to content
This repository has been archived by the owner on Oct 13, 2024. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PizzaAllTheWay authored Jun 2, 2024
0 parents commit 005895d
Show file tree
Hide file tree
Showing 11 changed files with 585 additions and 0 deletions.
115 changes: 115 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
# BasedOnStyle: WebKit
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: No
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: All
BreakBeforeBraces: WebKit
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 0
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
IncludeCategories:
- Regex: '^"config\.h"'
Priority: -1
# The main header for a source file automatically gets category 0
- Regex: '^<.*SoftLink.h>'
Priority: 4
- Regex: '^".*SoftLink.h"'
Priority: 3
- Regex: '^<.*>'
Priority: 2
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 8
UseTab: Never
---
Language: ObjC
PointerAlignment: Right
...
15 changes: 15 additions & 0 deletions .github/issue_template/task-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Task template
about: 'Use this template when defining a new task in an issue. Make sure to fill
out all the fields. '
title: "[TASK]"
labels: ''
assignees: ''

---

**Time estimate:** XX hours
**Deadline:** DD.MONTH

**Description of task:** DESCRIPTION

19 changes: 19 additions & 0 deletions .github/workflows/clang-format-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check C++ code format with clang-format

on:
pull_request:
branches: [main]

jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install clang-format
run: sudo apt-get install clang-format

- name: Check code format
run: find . -regex '.*\.\(cpp\|hpp\|h\|cc\|c\|cxx\)' -exec clang-format -style=file {} \;

29 changes: 29 additions & 0 deletions .github/workflows/clang-formatter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Format C++ code with clang-format

on:
push:
branches: [main]
# pull_request:
# branches: [main]

jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install clang-format
run: sudo apt-get install clang-format

- name: Format code
run: find . -regex '.*\.\(cpp\|hpp\|h\|cc\|c\|cxx\)' -exec clang-format -style=file -i {} \;

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: Clang Robot
author_email: [email protected]
message: 'Committing clang-format changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60 changes: 60 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish Docker image to GHCR

on:
push:
branches: [ main ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout own repository
uses: actions/checkout@v3

# vortex_msgs needs to be in the same location as the rest of the vortex-auv packages
- name: Checkout vortex_msgs
uses: actions/checkout@v3
with:
repository: 'vortexntnu/vortex-msgs'
path: './vortex-msgs'
- name: Move vortex_msgs
run: mv ./vortex-msgs ../vortex-msgs

# robot_localization needs to be in the same location as the rest of the vortex-auv packages
- name: Checkout robot_localization
uses: actions/checkout@v3
with:
repository: 'vortexntnu/robot_localization'
path: './robot_localization'
- name: Move robot_localization
run: mv ./robot_localization ../robot_localization

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ..
file: ./docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
19 changes: 19 additions & 0 deletions .github/workflows/python-format-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check format of python code with black

on:
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Format with black
uses: psf/black@stable
with:
options: "--check --verbose"
src: "."
version: "~= 22.0"
29 changes: 29 additions & 0 deletions .github/workflows/python-formatter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Format python code with black

on:
push:
branches: [main]


jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Format with black
uses: psf/black@stable
with:
options: "--verbose"
src: "."
version: "~= 22.0"

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: Black Robot
author_email: [email protected]
message: 'Committing black-format changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 005895d

Please sign in to comment.