-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e524065
commit 091695b
Showing
27 changed files
with
1,478 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# Options are listed here: | ||
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html | ||
--- | ||
AccessModifierOffset: -4 | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveAssignments: false | ||
AlignConsecutiveDeclarations: false | ||
AlignEscapedNewlines: Right | ||
AlignOperands: true | ||
AlignTrailingComments: true | ||
AllowAllArgumentsOnNextLine: true | ||
AllowAllConstructorInitializersOnNextLine: true | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: None | ||
AllowShortLambdasOnASingleLine: All | ||
AllowShortIfStatementsOnASingleLine: Never | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakAfterDefinitionReturnType: None | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: false | ||
AlwaysBreakTemplateDeclarations: MultiLine | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BitFieldColonSpacing: Both | ||
BraceWrapping: | ||
AfterCaseLabel: true | ||
AfterClass: true | ||
AfterControlStatement: true | ||
AfterEnum: true | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterStruct: true | ||
AfterUnion: true | ||
AfterExternBlock: true | ||
BeforeCatch: true | ||
BeforeElse: true | ||
IndentBraces: false | ||
SplitEmptyFunction: true | ||
SplitEmptyRecord: true | ||
SplitEmptyNamespace: true | ||
BreakBeforeBinaryOperators: None | ||
BreakBeforeBraces: Custom | ||
BreakBeforeInheritanceComma: false | ||
BreakInheritanceList: BeforeColon | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializersBeforeComma: false | ||
BreakConstructorInitializers: AfterColon | ||
BreakStringLiterals: true | ||
ColumnLimit: 100 | ||
CompactNamespaces: false | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
ConstructorInitializerIndentWidth: 4 | ||
ContinuationIndentWidth: 4 | ||
Cpp11BracedListStyle: false | ||
DeriveLineEnding: false | ||
DerivePointerAlignment: false | ||
EmptyLineBeforeAccessModifier: LogicalBlock | ||
EmptyLineAfterAccessModifier: Never | ||
FixNamespaceComments: false | ||
IncludeBlocks: Preserve | ||
IncludeCategories: | ||
- Regex: '^"(llvm|llvm-c|clang|clang-c)/' | ||
Priority: 2 | ||
- Regex: '^(<|"(gtest|gmock|isl|json)/)' | ||
Priority: 3 | ||
- Regex: '.*' | ||
Priority: 1 | ||
IncludeIsMainRegex: '(Test)?$' | ||
IndentCaseLabels: true | ||
IndentPPDirectives: None | ||
IndentWidth: 4 | ||
IndentWrappedFunctionNames: true | ||
InsertBraces: true | ||
KeepEmptyLinesAtTheStartOfBlocks: true | ||
Language: Cpp | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: All | ||
PenaltyBreakAssignment: 2 | ||
PenaltyBreakBeforeFirstCallParameter: 19 | ||
PenaltyBreakComment: 300 | ||
PenaltyBreakFirstLessLess: 120 | ||
PenaltyBreakString: 1000 | ||
PenaltyBreakTemplateDeclaration: 10 | ||
PenaltyExcessCharacter: 1000000 | ||
PenaltyReturnTypeOnItsOwnLine: 1000 | ||
PointerAlignment: Right | ||
ReflowComments: true | ||
SortIncludes: true | ||
SortUsingDeclarations: true | ||
SpaceAfterCStyleCast: false | ||
SpaceAfterLogicalNot: false | ||
SpaceAfterTemplateKeyword: true | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeCaseColon: false | ||
SpaceBeforeCpp11BracedList: false | ||
SpaceBeforeCtorInitializerColon: true | ||
SpaceBeforeInheritanceColon: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceBeforeRangeBasedForLoopColon: true | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 1 | ||
SpacesInAngles: false | ||
SpacesInContainerLiterals: true | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInParentheses: true | ||
SpacesInSquareBrackets: false | ||
Standard: c++17 | ||
TabWidth: 4 | ||
UseCRLF: false | ||
UseTab: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Main | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '.gitignore' | ||
- '*.md' | ||
|
||
jobs: | ||
lint: | ||
name: 🧹 Lint / 📜 C++ | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run clang-format style check | ||
uses: jidicula/[email protected] | ||
with: | ||
clang-format-version: '15' | ||
exclude-regex: 'extern' | ||
|
||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build_type: ['Debug', 'Release'] | ||
config: | ||
- { name: '🍏 macOS Clang', os: macos-latest } | ||
- { name: '🐧 Linux GCC', os: ubuntu-latest } | ||
- { name: '🪟 Windows MSVC', os: windows-latest } | ||
|
||
name: 🛠 Build / ${{ matrix.config.name }} (${{ matrix.build_type }}) | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Dependencies (macOS) | ||
if: matrix.config.os == 'macos-latest' | ||
run: brew install ccache ninja | ||
|
||
- name: Install Dependencies (Linux) | ||
if: matrix.config.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ccache ninja-build | ||
- name: Install Dependencies (Windows) | ||
if: matrix.config.os == 'windows-latest' | ||
run: | | ||
choco upgrade ccache ninja | ||
- name: Setup MSVC (Windows) | ||
if: matrix.config.os == 'windows-latest' | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
max-size: '10G' | ||
key: ${{ matrix.config.os }}-${{ matrix.build_type }} | ||
|
||
- name: Configure | ||
run: > | ||
mkdir GDExtension-build | ||
cmake | ||
-B GDExtension-build | ||
-G "Ninja" | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | ||
--install-prefix ${{ github.workspace }}/install-${{ matrix.build_type }} | ||
. | ||
- name: Build | ||
run: cmake --build GDExtension-build | ||
|
||
- name: Install | ||
run: cmake --install GDExtension-build | ||
|
||
- name: Upload artifact (Debug) | ||
if: matrix.build_type == 'Debug' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ github.event.repository.name }}-Debug | ||
path: | | ||
${{ github.workspace }}/install-${{ matrix.build_type }}/* | ||
- name: Upload artifact (Release) | ||
if: matrix.build_type == 'Release' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ github.event.repository.name }}-Release | ||
path: | | ||
${{ github.workspace }}/install-${{ matrix.build_type }}/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CMakeLists.txt.user | ||
.vscode/settings.json | ||
GDExtensionTemplate* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[submodule "extern/godot-cpp"] | ||
path = extern/godot-cpp | ||
url = https://github.com/godotengine/godot-cpp | ||
branch = 4.1 | ||
branch = 4.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-vscode.cpptools-extension-pack", | ||
"ms-vscode.cmake-tools" | ||
] | ||
} |
Oops, something went wrong.