Skip to content

Commit

Permalink
Source control files updated
Browse files Browse the repository at this point in the history
  • Loading branch information
AKuHAK committed Aug 31, 2021
1 parent 74675a0 commit c7a073a
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 73 deletions.
97 changes: 67 additions & 30 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,79 +1,116 @@
---
Language: Cpp
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignConsecutiveMacros: AcrossComments
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
BeforeCatch: false
BeforeElse: false
IndentBraces: false
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeConceptDeclarations: true
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 0
CommentPragmas: '^ (IWYU pragma:|NOLINT)'
BreakConstructorInitializers: BeforeComma
BreakStringLiterals: true
ColumnLimit: 0
CommentPragmas: "^ (IWYU pragma:|NOLINT)"
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ForEachMacros: []
DisableFormat: false
EmptyLineBeforeAccessModifier: LogicalBlock
FixNamespaceComments: true
ForEachMacros: []
IncludeBlocks: Preserve
IndentExternBlock: NoIndent
IndentCaseBlocks: false
IndentCaseLabels: true
IndentWidth: 4
IndentGotoLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MacroBlockBegin: ""
MacroBlockEnd: ""
MaxEmptyLinesToKeep: 3
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 80
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 80
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 80
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: false
# uncomment below when clang >=13 will be out
# IndentPPDirectives: AfterHash
# PPIndentWidth: 1
ReflowComments: true
SortIncludes: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: ForIndentation
Standard: Cpp11
TabWidth: 4
UseTab: Never
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# EditorConfig: http://EditorConfig.org

# Top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# 4 space indentation
[*.{c,h,js,css,html}]
indent_style = space
indent_size = 4

# 2 space indentation
[*.{json,xml,yaml,yml}]
indent_style = space
indent_size = 2

# Tab indentation
[Makefile*, .make, linkfile]
indent_style = tab
17 changes: 17 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
29 changes: 17 additions & 12 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,26 @@ name: CI-format-check

on:
push:
paths:
- "**.h"
- "**.c"
- ".github/workflows/check-format.yml"
- ".clang-format"
pull_request:
paths:
- "**.h"
- "**.c"
- ".github/workflows/check-format.yml"
- ".clang-format"

jobs:
check-format:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:latest
steps:
- name: Install dependencies
run: |
apk add git make clang
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow

- name: Check format -> make format-check
run: |
make format-check
steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.12
with:
source: "."
clangFormatVersion: 12
inplace: false
55 changes: 28 additions & 27 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,35 @@ jobs:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:latest
steps:
- name: Install dependencies
run: |
apk add build-base git zip
- name: Install dependencies
run: |
apk add build-base git zip
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- name: Compile wLaunchELF
run: |
make
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- name: Compile wLaunchELF
run: |
make
git ls-files -i --exclude-standard -c
- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: wLaunchELF-${{ steps.slug.outputs.sha8 }}
path: BOOT.ELF
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- name: Create release
if: github.ref == 'refs/heads/master'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
title: "Latest development build"
files: BOOT.ELF
- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: wLaunchELF-${{ steps.slug.outputs.sha8 }}
path: BOOT.ELF

- name: Create release
if: github.ref == 'refs/heads/master'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
title: "Latest development build"
files: BOOT.ELF
34 changes: 30 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
#
# NOTE! Please use 'git ls-files -i --exclude-standard -c'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# Normal rules
#
.*
*.a
*.diff
*.elf
*.ELF
*.erl
*.exe
*.o
*.swp
*.tmp
*.irx
*.map
*.o
*.patch
*.rej
*.s
githash.h
*.zip
*.ZIP
*.a

#
# files that we don't want to ignore
#
!.gitignore
!.gitattributes
!.github
!.editorconfig
!.clang-format

#
# Generated source files
#
githash.h

0 comments on commit c7a073a

Please sign in to comment.