Skip to content

Commit

Permalink
Merge pull request #1 from AKuHAK/clean
Browse files Browse the repository at this point in the history
Clean
  • Loading branch information
AKuHAK authored Feb 10, 2022
2 parents ba7fa5b + c637ec3 commit 4af38bd
Show file tree
Hide file tree
Showing 48 changed files with 1,287 additions and 815 deletions.
116 changes: 116 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
---
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: AcrossComments
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing : Both
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: 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
BreakBeforeConceptDeclarations: true
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: BeforeComma
BreakStringLiterals: true
ColumnLimit: 0
CommentPragmas: '^ (IWYU pragma:|NOLINT)'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineBeforeAccessModifier: LogicalBlock
FixNamespaceComments: true
ForEachMacros: []
IncludeBlocks: Preserve
IndentExternBlock: NoIndent
IndentCaseBlocks: false
IndentCaseLabels: true
IndentGotoLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
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
# 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: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
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*]
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
106 changes: 106 additions & 0 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: CI-compile

on:
push:
pull_request:

jobs:
build:
name: Payload compilation
runs-on: ubuntu-latest
container: ps2dev/ps2dev:v1.0
# instead of "ps2dev/ps2dev:latest" you can use different tags, for example for old projects you can use "ps2dev/ps2dev:v1.0"
steps:
- name: Install dependencies
run: |
apk add build-base git zip grep cdrkit bash
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- name: Get short SHA and repository name
id: slug
run: |
echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
echo "::set-output name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")"
- name: Compile payload >=3.03
shell: bash
run: |
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
cd "PAYLOADS/3.03-3.11"
ls -l
./build.sh
ls -l
md5sum *.bin
- name: Upload artifacts >=3.03
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: PAYLOADS_303-311_${{ steps.slug.outputs.sha8 }}
path: |
PAYLOADS/3.03-3.11
- name: Compile payload <2.13
run: |
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
cd "PAYLOADS/1.00-2.13"
make -B -f hardware.mk
ls -l
md5sum *.bin
- name: Upload artifacts <2.13
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: PAYLOADS_110-213_${{ steps.slug.outputs.sha8 }}
path: |
PAYLOADS/1.00-2.13
- name: Compile payload <2.13 (PCSX2 version)
run: |
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
cd "PAYLOADS/1.00-2.13"
make -B -f emulator.mk
ls -l
md5sum *.bin
- name: Upload artifacts <2.13 (PCSX2 version)
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: PAYLOADS_110-213_PCSX2_${{ steps.slug.outputs.sha8 }}
path: |
PAYLOADS/1.00-2.13
!PAYLOADS/1.00-2.13/dvd.iso.bin
- run: |
mv PAYLOADS/3.03-3.11/exploit.iso FreeDVDBoot_3.03-3.11_${{ steps.slug.outputs.sha8 }}.iso
zip FreeDVDBoot_3.03-3.11_${{ steps.slug.outputs.sha8 }}.zip FreeDVDBoot_3.03-3.11_${{ steps.slug.outputs.sha8 }}.iso
mv PAYLOADS/1.00-2.13/dvd.iso FreeDVDBoot_1.00-2.13_${{ steps.slug.outputs.sha8 }}.iso
zip FreeDVDBoot_1.00-2.13_${{ steps.slug.outputs.sha8 }}.zip FreeDVDBoot_1.00-2.13_${{ steps.slug.outputs.sha8 }}.iso
mv PAYLOADS/1.00-2.13/dvd_pcsx2.iso FreeDVDBoot_1.00-2.13_PCSX2_${{ steps.slug.outputs.sha8 }}.iso
zip FreeDVDBoot_1.00-2.13_PCSX2_${{ steps.slug.outputs.sha8 }}.zip FreeDVDBoot_1.00-2.13_PCSX2_${{ steps.slug.outputs.sha8 }}.iso
- name: Create pre-release
if: github.ref == 'refs/heads/master'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
automatic_release_tag: "latest"
title: "Development build"
files: |
*.zip
- name: Create Tagged Release Draft
if: startsWith(github.ref, 'refs/tags/v')
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
draft: true
files: |
*.zip
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# 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
*.irx
*.map
*.o
*.patch
*.rej
*.zip
*.ZIP
*.a

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

!BOOT.ELF

#
# Generated source files
#
*.bin
dvd.iso
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 4af38bd

Please sign in to comment.