Skip to content

Commit

Permalink
refactor: migrate to xmake
Browse files Browse the repository at this point in the history
  • Loading branch information
shad0wshayd3 committed Nov 21, 2024
1 parent 5d52135 commit 3db433b
Show file tree
Hide file tree
Showing 29 changed files with 204 additions and 618 deletions.
163 changes: 95 additions & 68 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,100 +1,127 @@
---
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignArrayOfStructures: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: Consecutive
AlignConsecutiveDeclarations: None
AlignConsecutiveMacros: None
AlignEscapedNewlines: Right
AlignOperands: Align
AllowAllArgumentsOnNextLine: False
AllowAllParametersOfDeclarationOnNextLine: False
AlignAfterOpenBracket: Align
AlignArrayOfStructures: Left
AlignConsecutiveAssignments:
Enabled: false
AlignConsecutiveBitFields:
Enabled: false
AlignConsecutiveDeclarations:
Enabled: false
AlignConsecutiveMacros:
Enabled: true
AlignEscapedNewlines: Left
AlignOperands: AlignAfterOperator
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: False
AllowShortEnumsOnASingleLine: False
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: False
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: False
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: False
BinPackParameters: False
BinPackArguments: false
BinPackParameters: false
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: True
AfterClass: True
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: True
AfterFunction: True
AfterNamespace: True
AfterStruct: True
AfterUnion: True
AfterExternBlock: True
BeforeCatch: True
BeforeElse: True
BeforeLambdaBody: True
BeforeWhile: True
IndentBraces: False
SplitEmptyFunction: False
SplitEmptyRecord: False
SplitEmptyNamespace: False
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: true
BeforeWhile: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakAfterAttributes: Never
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: True
BreakBeforeConceptDeclarations: Always
BreakBeforeInlineASMColon: Never
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
BreakStringLiterals: False
BreakStringLiterals: false
ColumnLimit: 0
CompactNamespaces: False
Cpp11BracedListStyle: False
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
FixNamespaceComments: False
FixNamespaceComments: false
IncludeBlocks: Preserve
IndentAccessModifiers: False
IndentCaseBlocks: True
IndentCaseLabels: True
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentGotoLabels: False
IndentGotoLabels: false
IndentPPDirectives: AfterHash
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: True
KeepEmptyLinesAtTheStartOfBlocks: False
IndentWrappedFunctionNames: true
InsertBraces: false
InsertNewlineAtEOF: true
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
Language: Cpp
LineEnding: CRLF
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
PPIndentWidth: 1
PackConstructorInitializers: NextLine
PPIndentWidth: 4
PackConstructorInitializers: Never
PointerAlignment: Left
QualifierAlignment: Custom
QualifierOrder: ['inline', 'static', 'const', 'type']
ReferenceAlignment: Left
ReflowComments: False
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: false
RemoveBracesLLVM: false
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Always
SortIncludes: CaseInsensitive
SpaceAfterCStyleCast: False
SpaceAfterLogicalNot: False
SpaceAfterTemplateKeyword: False
SpaceBeforeAssignmentOperators: True
SpaceBeforeCaseColon: False
SpaceBeforeCpp11BracedList: False
SpaceBeforeCtorInitializerColon: True
SpaceBeforeInheritanceColon: True
SortIncludes: CaseSensitive
SortUsingDeclarations: Lexicographic
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: True
SpaceBeforeSquareBrackets: False
SpaceInEmptyBlock: False
SpaceInEmptyParentheses: False
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 2
SpaceInEmptyParentheses: false
SpacesInAngles: Never
SpacesInCStyleCastParentheses: False
SpacesInConditionalStatement: False
SpacesInContainerLiterals: True
SpacesInParentheses: False
SpacesInSquareBrackets: False
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Latest
TabWidth: 4
UseCRLF: True
UseTab: AlignWithSpaces
15 changes: 0 additions & 15 deletions .editorconfig

This file was deleted.

2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
paths:
- "src/**"
workflow_dispatch:

jobs:
run-build:
runs-on: windows-latest
steps:
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest

- name: Checkout
uses: actions/checkout@v4

- name: Setup Dependencies
run: |
git submodule update --init --recursive;
- name: Build
run: |
Remove-Item build -Recurse -Force -ErrorAction:SilentlyContinue -Confirm:$False | Out-Null;
xmake build -y
37 changes: 14 additions & 23 deletions .github/workflows/maintenance.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
name: Scripted maintenance
name: Maintenance

on: [ push, pull_request_target ]
on: [push]

jobs:
maintenance:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: DoozyX/[email protected]
with:
ref: ${{ github.head_ref }}
source: '.'
exclude: './docs'
extensions: 'c,cc,cpp,cppm,cxx,h,hpp,hxx,inl,inc,ixx,mxx'
clangFormatVersion: 16
inplace: True

- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v2
- uses: EndBug/add-and-commit@v9
with:
path: ${{ runner.temp }}/llvm
key: llvm-14

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "14"
directory: ${{ runner.temp }}/llvm
cached: ${{ steps.cache-llvm.outputs.cache-hit }}

- name: Run clang-format
run: find -type f \( -name *.h -o -name *.cpp \) | xargs clang-format -style=file -i

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: maintenance
committer_name: clang-format
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
message: 'chore: style formatting'
14 changes: 11 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# dot folders
.cache
.vs/
.vscode/
.xmake/

# folders
build/
build-ae/
build-se/
CMakeUserPresets.json
vs*/

# files
*.zip
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
[submodule "extern/BethesdaCMakeModules"]
path = extern/BethesdaCMakeModules
url = https://github.com/shad0wshayd3/BethesdaCMakeModules.git
[submodule "extern/CommonLibSSE"]
path = extern/CommonLibSSE
url = https://github.com/shad0wshayd3/CommonLibSSE.git
Loading

0 comments on commit 3db433b

Please sign in to comment.