Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #175 from SysRay/features
Browse files Browse the repository at this point in the history
Features -> main
  • Loading branch information
SysRay authored Jun 1, 2024
2 parents c7713f5 + bbd2cf9 commit 156bb3a
Show file tree
Hide file tree
Showing 725 changed files with 14,178 additions and 129,343 deletions.
69 changes: 16 additions & 53 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ AlignConsecutiveAssignments: Consecutive
AlignConsecutiveBitFields: Consecutive
AlignConsecutiveDeclarations: Consecutive
AlignEscapedNewlines: Right
AlignOperands: Align
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
PackConstructorInitializers: NextLine
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
Expand Down Expand Up @@ -57,14 +57,12 @@ BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 160
CommentPragmas: '^ IWYU pragma:'
ColumnLimit: 160
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
SeparateDefinitionBlocks: Always
Expand All @@ -73,40 +71,17 @@ ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
- FOR
- FOR_HASH
StatementAttributeLikeMacros:
- Q_EMIT
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"(Kyty)/'
Priority: 1
SortPriority: 0
CaseSensitive: false
- Regex: '^"(Emulator)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^"(gtest)/'
Priority: 4
SortPriority: 0
CaseSensitive: false
- Regex: '^<Q'
Priority: 5
SortPriority: 0
CaseSensitive: false
- Regex: '"ui_'
Priority: 6
SortPriority: 0
CaseSensitive: false
- Regex: '^<'
Priority: 7
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 3
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '$'
Expand All @@ -117,21 +92,16 @@ IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
IndentWidth: 2
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
Expand All @@ -142,8 +112,8 @@ PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
ReflowComments: true
SortIncludes: true
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
Expand All @@ -158,28 +128,21 @@ SpaceBeforeParens: ControlStatements
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesInParensOptions:
InEmptyParentheses: false
InCStyleCasts: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
UseCRLF: true
UseTab: Never
Standard: Latest
LineEnding: LF
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
...

3 changes: 1 addition & 2 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
**/third_party/**
**/vk_mem_alloc.h
**/wepoll.*
58 changes: 40 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,43 @@ on:

jobs:
formatting-check:
permissions:
contents: write
name: Formatting check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DoozyX/clang-format-lint-action@v0.17
- name: Checkout
uses: actions/checkout@v4

- name: Test formatting
uses: DoozyX/clang-format-lint-action@v0.17
with:
source: ./
extensions: h,hpp,cpp,c,cc
clangFormatVersion: 17
inplace: true

- name: Generate patch file
run: |
git diff > formatting.patch
find *.patch -type f -size 0 -delete
- name: Upload patch
uses: actions/upload-artifact@v4
with:
name: code-format
path: formatting.patch

- name: Error if fixed
run: |
if rm formatting.patch; then
echo "# Looks like you messed something up!" >> $GITHUB_STEP_SUMMARY
echo "1. Download the \`code-format\` artifact above" >> $GITHUB_STEP_SUMMARY
echo "2. Unpack the patch file" >> $GITHUB_STEP_SUMMARY
echo "3. Use \`git apply formatting.patch\` command to apply it to your repo" >> $GITHUB_STEP_SUMMARY
echo "4. Push the applied changes to your Pull Request" >> $GITHUB_STEP_SUMMARY
exit 1
fi
build:
needs: formatting-check
Expand All @@ -52,19 +80,6 @@ jobs:
with:
fetch-depth: 0

- name: Restore cached deps
uses: actions/cache@v4
id: cache-thirdparty
with:
path: third_party
key: ${{ runner.os }}-submodules

- name: Update submodules
if: steps.cache-thirdparty.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
submodules: recursive

- name: Detect MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
Expand All @@ -79,7 +94,7 @@ jobs:
- name: Configure
run: |
echo "::add-matcher::tools/matchers/cmake.json"
cmake.exe -S. -B_build/_Release -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=_build/_Install -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe
cmake.exe -S. -B_build/_Release -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=_build/_Install -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe -DTEST_BENCH=ON -DISACTION=1
- name: Build
run: |
Expand All @@ -92,8 +107,15 @@ jobs:
echo "::add-matcher::tools/matchers/cmake.json"
cmake.exe --install _build/_Release
- name: Run some tests
shell: bash
run: echo "`node misc/testRunner`" >> $GITHUB_STEP_SUMMARY

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: psOff-libs
path: _build/_Install/*
name: psOff-emu
path: |
_build/_Install/*
!_build/_Install/vulkan-1.dll
!_build/_Install/*_test.exe
20 changes: 20 additions & 0 deletions .github/workflows/release_notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Discord release notify

on:
release:
types: [published]

jobs:
notifier:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v4

- name: Run things
working-directory: misc/discordNotify
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
run: |
npm i
node .
39 changes: 39 additions & 0 deletions .github/workflows/upwiki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: upload wiki

on:
push:
branches: [main]
paths:
- '.github/workflows/upwiki.yml'
- 'docs/wiki/**'

jobs:
update-wiki:
name: Update wiki
runs-on: ubuntu-latest
steps:
- name: Pull main repo
uses: actions/checkout@v4
with:
path: main_repo

- name: Setup git
run: |
git config --global user.name github-actions[bot];
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com;
- name: Pull wiki content
run: |
mkdir wiki_repo;
cd wiki_repo;
git init;
git pull https://${{ secrets.REPO_FULL_TOKEN }}@github.com/${{ github.repository }}.wiki.git
- name: Push wiki content
run: |
rsync -av --delete main_repo/docs/wiki/markdown/ wiki_repo/ --exclude .git;
cd wiki_repo;
git add .;
if git commit -m "Update wiki content"; then
git push -f --set-upstream https://${{ secrets.REPO_FULL_TOKEN }}@github.com/${{ github.repository }}.wiki.git master;
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ _*/
!.vscode
!.github
.vscode/c_cpp_properties.json
core/private
13 changes: 0 additions & 13 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,13 +0,0 @@
[submodule "third_party/optick"]
path = third_party/optick
url = https://github.com/bombomby/optick.git
[submodule "third_party/magic_enum"]
path = third_party/magic_enum
url = https://github.com/Neargye/magic_enum.git
[submodule "third_party/boost"]
path = third_party/boost
url = https://github.com/boostorg/boost.git
[submodule "third_party/SDL2"]
path = third_party/SDL2
url = https://github.com/libsdl-org/SDL.git
branch = SDL2
33 changes: 19 additions & 14 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "${config:psoff.root-path}/emulator.exe",
"args": ["--file", "${config:psoff.game-path}/eboot.bin", "--d"],
"stopAtEntry": false,
"cwd": "${config:psoff.root-path}",
"environment": [],
"console": "integratedTerminal"
}
]
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceRoot}/_build/_Install/psoff.exe",
"args": [
"--d",
"${config:psoff.add-arg}",
"--file=${config:psoff.game-path}/eboot.bin",
],
"stopAtEntry": false,
"cwd": "${workspaceRoot}/_build/_Install",
"environment": [],
"console": "integratedTerminal",
"symbolSearchPath": "${workspaceRoot}/_build/_Install/debug"
}
]
}
12 changes: 5 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"-fexceptions"
],
"ccls.index.threads": 0,

"cmake.parallelJobs": 0,
"cmake.generator": "Ninja",
"cmake.sourceDirectory": "${workspaceFolder}",
"cmake.buildDirectory": "${workspaceFolder}/_build/_Release",
Expand All @@ -24,16 +24,14 @@
"CMAKE_C_COMPILER": "clang-cl.exe",
"CMAKE_CXX_COMPILER": "clang-cl.exe"
},
"C_Cpp.formatting": "clangFormat",
"C_Cpp.clang_format_style": "file:${workspaceRoot}/.clang-format",
"C_Cpp.clang_format_fallbackStyle": "LLVM",
"C_Cpp.clang_format_path": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\Llvm\\x64\\bin\\clang-format.exe",
"C_Cpp.default.compilerPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\Llvm\\bin\\clang-cl.exe",
"C_Cpp.default.intelliSenseMode": "windows-clang-x64",
"C_Cpp.default.cppStandard": "c++20",
"C_Cpp.autoAddFileAssociations": false,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"git.ignoredRepositories": [
"third_party/boost",
"third_party/optick",
"third_party/magic_enum",
"third_part/SDL2"
]
}
Loading

0 comments on commit 156bb3a

Please sign in to comment.