Skip to content

Commit

Permalink
Update to latest plugin template
Browse files Browse the repository at this point in the history
  • Loading branch information
cg2121 committed Feb 2, 2024
1 parent de84b77 commit a7c8c80
Show file tree
Hide file tree
Showing 108 changed files with 3,977 additions and 2,577 deletions.
133 changes: 117 additions & 16 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# please use clang-format version 8 or later
# please use clang-format version 16 or later

Standard: Cpp11
Standard: c++17
AccessModifierOffset: -8
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
#AllowAllArgumentsOnNextLine: false # requires clang-format 9
#AllowAllConstructorInitializersOnNextLine: false # requires clang-format 9
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
#AllowShortLambdasOnASingleLine: Inline # requires clang-format 9
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
Expand Down Expand Up @@ -52,11 +52,12 @@ ContinuationIndentWidth: 8
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
FixNamespaceComments: false
ForEachMacros:
FixNamespaceComments: true
ForEachMacros:
- 'json_object_foreach'
- 'json_object_foreach_safe'
- 'json_array_foreach'
- 'HASH_ITER'
IncludeBlocks: Preserve
IndentCaseLabels: false
IndentPPDirectives: None
Expand All @@ -65,7 +66,7 @@ IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
#ObjCBinPackProtocolList: Auto # requires clang-format 7
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 8
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
Expand All @@ -83,25 +84,125 @@ ReflowComments: false
SortIncludes: false
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
#SpaceAfterLogicalNot: false # requires clang-format 9
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
#SpaceBeforeCtorInitializerColon: true # requires clang-format 7
#SpaceBeforeInheritanceColon: true # requires clang-format 7
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
#SpaceBeforeRangeBasedForLoopColon: true # requires clang-format 7
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
#StatementMacros: # requires clang-format 8
# - 'Q_OBJECT'
StatementMacros:
- 'Q_OBJECT'
TabWidth: 8
#TypenameMacros: # requires clang-format 9
# - 'DARRAY'
TypenameMacros:
- 'DARRAY'
UseTab: ForContinuationAndIndentation
---
Language: ObjC
AccessModifierOffset: 2
AlignArrayOfStructures: Right
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
AllowShortBlocksOnASingleLine: Never
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: None
AttributeMacros: ['__unused', '__autoreleasing', '_Nonnull', '__bridge']
BitFieldColonSpacing: Both
#BreakBeforeBraces: Webkit
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: Never
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: true
BreakAfterAttributes: Never
BreakArrays: false
BreakBeforeConceptDeclarations: Allowed
BreakBeforeInlineASMColon: OnlyMultiline
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterComma
ColumnLimit: 120
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: Indent
IndentGotoLabels: false
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: true
InsertBraces: false
InsertNewlineAtEOF: true
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 4
ObjCBreakBeforeNestedBlockParam: false
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PPIndentWidth: -1
PackConstructorInitializers: NextLine
QualifierAlignment: Leave
ReferenceAlignment: Right
RemoveSemicolon: false
RequiresClausePosition: WithPreceding
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Always
ShortNamespaceLines: 1
SortIncludes: false
#SortUsingDeclarations: LexicographicNumeric
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInConditionalStatement: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
Standard: c++17
TabWidth: 4
UseTab: Never
30 changes: 27 additions & 3 deletions .cmake-format.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"format": {
"line_width": 120,
"tab_size": 2,
"enable_sort": true,
"autosort": true
},
"additional_commands": {
"find_qt": {
"flags": [],
Expand All @@ -8,9 +14,27 @@
"COMPONENTS_MACOS": "+",
"COMPONENTS_LINUX": "+"
}
},
"set_target_properties_obs": {
"pargs": 1,
"flags": [],
"kwargs": {
"PROPERTIES": {
"kwargs": {
"PREFIX": 1,
"OUTPUT_NAME": 1,
"FOLDER": 1,
"VERSION": 1,
"SOVERSION": 1,
"AUTOMOC": 1,
"AUTOUIC": 1,
"AUTORCC": 1,
"AUTOUIC_SEARCH_PATHS": 1,
"BUILD_RPATH": 1,
"INSTALL_RPATH": 1
}
}
}
}
},
"format": {
"line_width": 100
}
}
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

106 changes: 106 additions & 0 deletions .github/actions/build-plugin/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: 'Set up and build plugin'
description: 'Builds the plugin for specified architecture and build config'
inputs:
target:
description: 'Target architecture for dependencies'
required: true
config:
description: 'Build configuration'
required: false
default: 'RelWithDebInfo'
codesign:
description: 'Enable codesigning (macOS only)'
required: false
default: 'false'
codesignIdent:
description: 'Developer ID for application codesigning (macOS only)'
required: false
default: '-'
workingDirectory:
description: 'Working directory for packaging'
required: false
default: ${{ github.workspace }}
runs:
using: composite
steps:
- name: Run macOS Build
if: runner.os == 'macOS'
shell: zsh --no-rcs --errexit --pipefail {0}
working-directory: ${{ inputs.workingDirectory }}
env:
CODESIGN_IDENT: ${{ inputs.codesignIdent }}
CODESIGN_TEAM: ${{ inputs.codesignTeam }}
run: |
: Run macOS Build
local -a build_args=(--config ${{ inputs.config }})
if (( ${+RUNNER_DEBUG} )) build_args+=(--debug)
if [[ '${{ inputs.codesign }}' == 'true' ]] build_args+=(--codesign)
.github/scripts/build-macos ${build_args}
- name: Install Dependencies 🛍️
if: runner.os == 'Linux'
shell: bash
run: |
: Install Dependencies 🛍️
echo ::group::Install Dependencies
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
brew install --quiet zsh
echo ::endgroup::
- name: Run Ubuntu Build
if: runner.os == 'Linux'
shell: zsh --no-rcs --errexit --pipefail {0}
working-directory: ${{ inputs.workingDirectory }}
run: |
: Run Ubuntu Build
local -a build_args=(
--target linux-${{ inputs.target }}
--config ${{ inputs.config }}
)
if (( ${+RUNNER_DEBUG} )) build_args+=(--debug)
.github/scripts/build-linux ${build_args}
- name: Run Windows Build
if: runner.os == 'Windows'
shell: pwsh
run: |
# Run Windows Build
if ( $Env:RUNNER_DEBUG -ne $null ) {
Set-PSDebug -Trace 1
}
$BuildArgs = @{
Target = '${{ inputs.target }}'
Configuration = '${{ inputs.config }}'
}
.github/scripts/Build-Windows.ps1 @BuildArgs
- name: Create Summary 📊
if: contains(fromJSON('["Linux", "macOS"]'),runner.os)
shell: zsh --no-rcs --errexit --pipefail {0}
env:
CCACHE_CONFIGPATH: ${{ inputs.workingDirectory }}/.ccache.conf
run: |
: Create Summary 📊
local -a ccache_data
if (( ${+RUNNER_DEBUG} )) {
setopt XTRACE
ccache_data=("${(fA)$(ccache -s -vv)}")
} else {
ccache_data=("${(fA)$(ccache -s)}")
}
print '### ${{ runner.os }} Ccache Stats (${{ inputs.target }})' >> $GITHUB_STEP_SUMMARY
print '```' >> $GITHUB_STEP_SUMMARY
for line (${ccache_data}) {
print ${line} >> $GITHUB_STEP_SUMMARY
}
print '```' >> $GITHUB_STEP_SUMMARY
Loading

0 comments on commit a7c8c80

Please sign in to comment.