Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 80 additions & 33 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,45 +1,85 @@
---
Language: Cpp
AccessModifierOffset: -4
BasedOnStyle: Google
AccessModifierOffset: '-4'
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
AlignArrayOfStructures: Left
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
AlignCompound: true
PadOperators: true
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
AlignCompound: true
PadOperators: true
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
AlignCompound: true
PadOperators: true
AlignEscapedNewlines: Left
AlignOperands: true
AlignConsecutiveBitFields: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Empty
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: None
AlwaysBreakTemplateDeclarations: 'Yes'
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: ''
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
ColumnLimit: '120'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: '4'
ContinuationIndentWidth: '4'
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: []
IncludeBlocks: Preserve
IncludeCategories: []
IncludeIsMainRegex: '$'
FixNamespaceComments: true
IncludeBlocks: Preserve
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
IndentWidth: '4'
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
Expand All @@ -48,19 +88,26 @@ PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: false
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: false
SpaceInEmptyParentheses: false
SpaceBeforeCpp11BracedList: true
SpacesBeforeTrailingComments: 1
SpacesBeforeTrailingComments: '1'
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: c++11
TabWidth: 8
UseTab: Never
...
Standard: Cpp11
TabWidth: '4'
UseTab: Never

...
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
description: Build the PDF
type: boolean
required: false
default: true
default: false
deploy:
description: Deploy archived PDF to gh-pages
type: boolean
Expand All @@ -34,6 +34,14 @@ on:
type: boolean
required: false
default: true
defs:
description: '*_defs directory'
type: string
required: false
default: 'sample_defs'

env:
WORK_PATH: ${{ github.workspace }}

# Force bash to apply pipefail option so pipeline failures aren't masked
defaults:
Expand Down Expand Up @@ -61,6 +69,7 @@ jobs:
if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' || contains(github.ref, 'main') }}
name: Build Documentation
runs-on: ubuntu-22.04
container: ghcr.io/arielswalker/cfsbuildenv-doxygen:latest

strategy:
fail-fast: false
Expand All @@ -79,41 +88,12 @@ jobs:
if: ${{ inputs.cache-key != '' }}
uses: actions/cache@v4
with:
path: /home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/*
path: ${{ env.WORK_PATH }}/
key: ${{ inputs.cache-key }}

- name: Checkout Bundle Main
if: ${{ inputs.app-name != '' }}
uses: actions/checkout@v4
with:
submodules: true
repository: nasa/cFS

- name: Checkout Repo
if: ${{ inputs.app-name != '' }}
uses: actions/checkout@v4
with:
path: apps/${{ inputs.app-name }}

- name: Copy Files
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs

- name: Add Repo To Build
if: ${{ inputs.app-name != '' }}
run: echo 'set(MISSION_GLOBAL_APPLIST ${{ inputs.app-name }})' >> sample_defs/targets.cmake

- name: Make Prep
run: make prep

- name: Install Doxygen Dependencies
run: sudo apt-get update && sudo apt-get install doxygen graphviz -y

- name: Install PDF Generation Dependencies
if: ${{ inputs.buildpdf == true }}
run: |
sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
- name: Set up app source
if: steps.cache-src-bld.outputs.cache-hit != 'true'
uses: arielswalker/cFS/actions/setup-app@fix-cfs/workflows#177

- name: Generate OSAL header list
if: ${{ inputs.needs_osal_api == true }}
Expand All @@ -137,21 +117,25 @@ jobs:
run: |
if [[ -s ${{ matrix.target }}_stderr.txt ]]; then
cat ${{ matrix.target }}_stderr.txt
exit -1
exit 1
fi

- name: Check For Document Warnings
run: |
if [[ -s ${{ matrix.target }}-warnings.log ]]; then
cat ${{ matrix.target }}-warnings.log
exit -1
exit 1
fi

- name: Generate PDF
if: ${{ inputs.buildpdf == true }}
run: |
make -C ./build/docs/${{ matrix.target }}/latex
mkdir deploy
if ! make LATEX_CMD="pdflatex -file-line-error -halt-on-error" -C ./build/docs/${{ matrix.target }}/latex > pdflatex.log; then
echo "Errors reported, tail of latex output follows"
tail -100 pdflatex.log
exit -1
fi
mkdir -p deploy
mv ./build/docs/${{ matrix.target }}/latex/refman.pdf ./deploy/${{ matrix.target }}.pdf
# Could add pandoc and convert to github markdown
# pandoc ${{ matrix.target }}.pdf -t gfm
Expand All @@ -164,10 +148,10 @@ jobs:
path: ./deploy/${{ matrix.target }}.pdf

- name: Deploy to GitHub
if: ${{ inputs.deploy == true }}
if: ${{ inputs.buildpdf == true && inputs.deploy == true }}
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: deploy
single-commit: true
single-commit: true
Loading
Loading