Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
237 changes: 237 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignArrayOfStructures: Left
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
AlignCompound: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
AlignCompound: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
AlignCompound: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveShortCaseStatements:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCaseColons: false
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterExternBlock: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: true
IndentBraces: true
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakAfterAttributes: Never
BreakAfterJavaFieldAnnotations: false
BreakArrays: true
BreakBeforeBinaryOperators: All
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Linux
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
ForEachMacros:
- foreach
- BOOST_FOREACH
- CDL_FOREACH
- CDL_FOREACH2
- DL_FOREACH
- DL_FOREACH2
- DL_FOREACH_SAFE
- DL_FOREACH_SAFE2
- LL_FOREACH
- LL_FOREACH2
- LL_FOREACH_SAFE
- LL_FOREACH_SAFE2
- Q_FOREACH
- SLIST_FOREACH
IfMacros:
- IF_NO_DECLTYPE
- KJ_IF_MAYBE
- PEV_ABORT_IF
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertBraces: true
InsertNewlineAtEOF: true
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
BinaryMinDigits: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
KeepEmptyLinesAtEOF: true
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
PPIndentWidth: -1
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
RemoveParentheses: Leave
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: LexicographicNumeric
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: true
SpaceAfterTemplateKeyword: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeJsonColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: true
AfterFunctionDeclarationName: true
AfterIfMacros: true
AfterOverloadedOperator: true
AfterRequiresInClause: true
AfterRequiresInExpression: true
BeforeNonEmptyParentheses: true
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: true
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParens: Never
SpacesInParensOptions:
InCStyleCasts: false
InConditionalStatements: false
InEmptyParentheses: false
Other: false
SpacesInSquareBrackets: false
Standard: Latest
TabWidth: 4
UseTab: Never
VerilogBreakBetweenInstancePorts: true
WhitespaceSensitiveMacros:

74 changes: 40 additions & 34 deletions .github/workflows/multi-os-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,62 +9,68 @@ on:

jobs:
build-linux:

runs-on: ubuntu-latest

strategy:
matrix:
shared: [true, false]
steps:

- name: Install packages
uses: delgurth/get-package@v6
with:
# Space-separated list of packages to install using apt-get. Will only run if on ubuntu.
apt-get: libssl-dev

apt-get: libssl-dev cmake binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686
- name: Checkout with submodules
uses: actions/checkout@v3
with:
submodules: 'true'

uses: actions/checkout@v4
- name: config shared=${{ matrix.shared }}
run: >-
cmake
-Bbuild
-DBUILD_SHARED_LIBS=${{ matrix.shared }}
- name: Compile
run: make


build-osx:
run: cmake --build build
- name: test
run: ctest --test-dir build -V

build-osx:
runs-on: macos-latest

steps:

- name: Checkout with submodules
uses: actions/checkout@v3
with:
submodules: 'true'

uses: actions/checkout@v4
- name: config
run: >-
cmake
-Bbuild
-DENABLE_TESTS=Off
- name: Compile
run: CFLAGS="-I$(brew --prefix openssl@1.1)/include/" LDFLAGS="-L$(brew --prefix openssl@1.1)/lib/" make
run: cmake --build build
# - name: Compile
# run: CFLAGS="-I$(brew --prefix openssl@1.1)/include/" LDFLAGS="-L$(brew --prefix openssl@1.1)/lib/" make

build-win64:

runs-on: windows-latest

steps:

- name: Install Cygwin
# You may pin to the exact commit or the version.
# uses: egor-tensin/setup-cygwin@4f96f9fecb8c952fa32ff791b0a77d93d5191bb4
uses: egor-tensin/setup-cygwin@v3
uses: egor-tensin/setup-cygwin@v4
with:
platform: x64 # optional, default is x64
install-dir: c:\tools\cygwin # optional, default is C:\tools\cygwin
packages: gcc-core binutils make zip libssl-devel # optional

packages: gcc-core gcc-g++ binutils make ninja zip libssl-devel cmake # optional
- name: Checkout with submodules
uses: actions/checkout@v3
with:
submodules: 'true'

uses: actions/checkout@v4
- name: Config
run: >-
cmake
-Bbuild
-DENABLE_TESTS=Off
-GNinja
- name: Compile
run: make

- name: Compile Windows-only tools and create a ZIP package
run: make zip
run: cmake --build build
- name: Pack
run: cd build && cpack -G CygwinBinary
# - name: Compile
# run: make
# - name: Compile Windows-only tools and create a ZIP package
# run: make zip

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

on:
push:
branches: [ build ]

jobs:
build-win64:

runs-on: windows-latest

steps:

- name: Install Cygwin
# You may pin to the exact commit or the version.
# uses: egor-tensin/setup-cygwin@4f96f9fecb8c952fa32ff791b0a77d93d5191bb4
uses: egor-tensin/setup-cygwin@v3
with:
platform: x64 # optional, default is x64
install-dir: c:\tools\cygwin # optional, default is C:\tools\cygwin
packages: gcc-core binutils make zip libssl-devel # optional

- name: Checkout with submodules
uses: actions/checkout@v3
with:
submodules: 'true'

- name: Compile
run: make

- name: Compile Windows-only tools and create a ZIP package
run: make zip

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: win-build
path: ./*.zip
retention-days: 1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Debug
.cproject
.project
*.swp
*.plist
*~
*.so*
*.dylib
Expand All @@ -15,6 +16,7 @@ Debug
*.dSYM
*.log
.settings
build/**
src/ofs2rva
src/output
src/pedis
Expand Down
Loading
Loading