forked from Tulip-Dev/tulip
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
thirdparty: Upgrade OGDF to v2023.09 (Elderberry)
- Loading branch information
Showing
1,086 changed files
with
92,009 additions
and
75,915 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,212 @@ | ||
# Based on clang-format version 15.0.7 | ||
--- | ||
Language: Cpp | ||
DisableFormat: false | ||
BasedOnStyle: WebKit # for all options not explicitly set | ||
|
||
## comments | ||
CommentPragmas: '' # comments with special meaning that should not be changed | ||
ReflowComments: false # do not touch comments due to commented out code | ||
FixNamespaceComments: false | ||
|
||
## macros that receive special treatment | ||
AttributeMacros: [] | ||
ForEachMacros: | ||
- foreach | ||
- forall_cluster_adj | ||
- forall_cluster_rev_adj | ||
- forall_cluster_adj_edges | ||
- forall_clusters | ||
- forall_postOrderClusters | ||
- forall_adj_elements | ||
- forall_hypernodes | ||
- forall_rev_hypernodes | ||
- forall_hyperedges | ||
- forall_rev_hyperedges | ||
IfMacros: [] | ||
MacroBlockBegin: '' | ||
MacroBlockEnd: '' | ||
NamespaceMacros: [] | ||
StatementMacros: # macros that do not need an additional ";" | ||
- OGDF_MM | ||
- OGDF_NEW_DELETE | ||
- OGDF_MALLOC_NEW_DELETE | ||
- OGDF_STD_COMPARER | ||
- OGDF_AUGMENT_COMPARER | ||
- OGDF_AUGMENT_STATICCOMPARER | ||
- OGDF_DECLARE_COMPARER | ||
- OGDF_OCM_REF_ATTR | ||
- OGDF_OCM_REF_ATTR_DEF | ||
- OGDF_OCM_PARAM_ATTR | ||
- OGDF_OCM_PARAM_ATTR_DEF | ||
- READ_FILENAME | ||
- WRITE_FILENAME | ||
- READ_STREAM | ||
StatementAttributeLikeMacros: [] | ||
TypenameMacros: [] | ||
WhitespaceSensitiveMacros: [] | ||
|
||
## single line statements | ||
AllowShortBlocksOnASingleLine: Never | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortEnumsOnASingleLine: true | ||
AllowShortFunctionsOnASingleLine: All | ||
AllowShortIfStatementsOnASingleLine: Never | ||
AllowShortLambdasOnASingleLine: All | ||
AllowShortLoopsOnASingleLine: false | ||
|
||
## breaking lines | ||
AllowAllArgumentsOnNextLine: true | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: false | ||
AlwaysBreakTemplateDeclarations: Yes | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BreakBeforeBinaryOperators: NonAssignment | ||
BreakBeforeBraces: Attach | ||
BreakBeforeConceptDeclarations: Always | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializers: BeforeComma | ||
BreakInheritanceList: BeforeColon | ||
BreakStringLiterals: false | ||
CompactNamespaces: false | ||
PackConstructorInitializers: NextLine | ||
RequiresClausePosition: OwnLine | ||
|
||
## penalties: when to break line if it becomes too long | ||
ColumnLimit: 100 | ||
PenaltyBreakFirstLessLess: 0 | ||
PenaltyBreakTemplateDeclaration: 0 | ||
PenaltyIndentedWhitespace: 0 | ||
PenaltyBreakAssignment: 1 | ||
PenaltyBreakOpenParenthesis: 1 | ||
PenaltyExcessCharacter: 10 | ||
PenaltyBreakBeforeFirstCallParameter: 50 | ||
PenaltyReturnTypeOnItsOwnLine: 100 | ||
PenaltyBreakString: 200 | ||
PenaltyBreakComment: 500 # avoid line breaks in commented out code | ||
|
||
## sorting includes and "using"s | ||
# note: <testing.h> must come after other <...>-includes! | ||
SortIncludes: true | ||
SortUsingDeclarations: true | ||
IncludeBlocks: Regroup | ||
IncludeCategories: | ||
- Regex: '^<ogdf/lib/.*\.h>' | ||
Priority: 2 | ||
SortPriority: 0 | ||
- Regex: '^<ogdf/basic/.*\.h>' | ||
Priority: 1 | ||
SortPriority: 0 | ||
- Regex: '^<ogdf/.*\.h>' | ||
Priority: 1 | ||
SortPriority: 1 | ||
- Regex: '^<coin/.*\.hpp>' | ||
Priority: 2 | ||
SortPriority: 1 | ||
- Regex: '^<.*\.h>' | ||
Priority: 4 | ||
SortPriority: 0 | ||
- Regex: '^<.*>' | ||
Priority: 3 | ||
SortPriority: 0 | ||
- Regex: '.*' | ||
Priority: 5 | ||
SortPriority: 0 | ||
IncludeIsMainRegex: '$' | ||
IncludeIsMainSourceRegex: '' | ||
|
||
## line endings | ||
DeriveLineEnding: false | ||
UseCRLF: false | ||
|
||
## empty lines | ||
EmptyLineAfterAccessModifier: Never | ||
EmptyLineBeforeAccessModifier: LogicalBlock | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
MaxEmptyLinesToKeep: 2 | ||
SeparateDefinitionBlocks: Always | ||
|
||
## (tab) indentation | ||
UseTab: ForContinuationAndIndentation | ||
TabWidth: 4 | ||
AccessModifierOffset: -4 # in/outdent public private etc. | ||
NamespaceIndentation: None | ||
ConstructorInitializerIndentWidth: 4 | ||
ContinuationIndentWidth: 8 # to separate function content from params | ||
IndentAccessModifiers: false | ||
IndentCaseBlocks: false | ||
IndentCaseLabels: false | ||
IndentExternBlock: AfterExternBlock | ||
IndentRequiresClause: true | ||
IndentGotoLabels: false | ||
IndentPPDirectives: AfterHash | ||
IndentWidth: 4 | ||
IndentWrappedFunctionNames: false | ||
LambdaBodyIndentation: Signature | ||
PPIndentWidth: -1 # use IndentWidth | ||
|
||
## (no) alignment | ||
AlignAfterOpenBracket: false | ||
AlignArrayOfStructures: None | ||
AlignConsecutiveAssignments: false | ||
AlignConsecutiveBitFields: false | ||
AlignConsecutiveDeclarations: false | ||
AlignConsecutiveMacros: false | ||
AlignEscapedNewlines: Left | ||
AlignOperands: false | ||
AlignTrailingComments: false | ||
|
||
## spaces | ||
BitFieldColonSpacing: Both | ||
SpacesBeforeTrailingComments: 1 | ||
SpaceAfterCStyleCast: false | ||
SpaceAfterLogicalNot: false | ||
SpaceAfterTemplateKeyword: false | ||
SpaceAroundPointerQualifiers: Default | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeCaseColon: false | ||
SpaceBeforeCpp11BracedList: true | ||
SpaceBeforeCtorInitializerColon: true | ||
SpaceBeforeInheritanceColon: true | ||
SpaceBeforeParens: ControlStatementsExceptControlMacros | ||
SpaceBeforeRangeBasedForLoopColon: true | ||
SpaceBeforeSquareBrackets: false | ||
SpaceInEmptyBlock: true | ||
SpaceInEmptyParentheses: false | ||
SpacesInAngles: false | ||
SpacesInConditionalStatement: false | ||
SpacesInContainerLiterals: true | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInLineCommentPrefix: | ||
Minimum: 1 | ||
Maximum: -1 | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
Cpp11BracedListStyle: true | ||
|
||
## pointer/qualifier/reference alignment | ||
DerivePointerAlignment: false | ||
PointerAlignment: Left | ||
QualifierAlignment: Left | ||
ReferenceAlignment: Pointer | ||
|
||
## inserting braces for single-line control statements | ||
InsertBraces: true | ||
|
||
# for strings containing code | ||
# RawStringFormats: | ||
# - Language: Cpp | ||
# Delimiters: | ||
# - cc | ||
# - CC | ||
# - cpp | ||
# - Cpp | ||
# - CPP | ||
# - 'c++' | ||
# - 'C++' | ||
# CanonicalDelimiter: '' | ||
# BasedOnStyle: WebKit | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
name: Check, Build and Test | ||
on: [push] | ||
|
||
# # Debug setup: | ||
# env: | ||
# OGDF_UTILS_PREQUEL: "set -x" | ||
# CCACHE_DEBUG: 1 | ||
# CCACHE_DEBUGDIR: ${{ github.workspace }}/ccache-debug | ||
|
||
jobs: | ||
style: | ||
runs-on: ubuntu-latest | ||
container: docker.io/ogdf/clang:15 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: "Add workspace as a safe directory in containers" | ||
run: git config --system --add safe.directory $GITHUB_WORKSPACE | ||
- run: util/test_clang_format.sh | ||
- run: util/test_eols.sh | ||
- run: util/test_number_newlines.sh | ||
- run: util/test_line_length.sh | ||
- run: util/test_tabs.sh | ||
- run: util/test_macros.sh | ||
- run: util/test_license.sh | ||
- run: util/test_no_typedefs.sh | ||
- run: util/test_no_enums.sh | ||
|
||
dirs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Test directory structure | ||
run: util/test_directory_structure.sh | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
container: docker.io/ogdf/clang:15 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: "Add workspace as a safe directory in containers" | ||
run: git config --system --add safe.directory $GITHUB_WORKSPACE | ||
- name: Test doxygen build | ||
run: util/test_doxygen.sh | ||
|
||
self-sufficiency: | ||
runs-on: ubuntu-latest | ||
env: | ||
CCACHE_COMPILERCHECK: "%compiler% -v" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set-up ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ github.job }} | ||
- name: Test self-sufficiency | ||
run: | | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
util/test_self-sufficiency.sh | ||
- uses: actions/upload-artifact@v3 | ||
name: Upload ccache debug info | ||
if: ${{ env.CCACHE_DEBUG == 1 }} | ||
with: | ||
name: ${{ github.job }} | ||
path: ${{ github.workspace }}/ccache-debug | ||
|
||
build-linux: | ||
strategy: | ||
matrix: | ||
mode: [debug, release] | ||
compiler: ['gcc:7', 'gcc:10', 'clang:15'] | ||
runs-on: ubuntu-latest | ||
env: | ||
CCACHE_COMPILERCHECK: "%compiler% -v" | ||
container: docker.io/ogdf/${{ matrix.compiler }} | ||
needs: [style, dirs, docs, self-sufficiency] | ||
steps: | ||
- name: Set compiler name | ||
run: | | ||
GH_COMPILER_NAME="${{ matrix.compiler }}" | ||
GH_COMPILER_NAME="${GH_COMPILER_NAME//:}" | ||
echo "GH_COMPILER_NAME=${GH_COMPILER_NAME}" >> "$GITHUB_ENV" | ||
shell: bash | ||
- uses: actions/checkout@v3 | ||
- name: "Add workspace as a safe directory in containers" | ||
run: git config --system --add safe.directory $GITHUB_WORKSPACE | ||
- name: Set-up ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ github.job }}-${{ matrix.compiler }}-${{ matrix.mode }} | ||
- name: Check ccache version | ||
run: ccache --version | ||
- name: Test ${{ matrix.mode }} build with ${{ matrix.compiler }} and run | ||
run: | | ||
util/test_build_and_run.sh \ | ||
${{ matrix.compiler == 'gcc:7' && 'dynamic' || 'static' }} \ | ||
${{ matrix.mode }} \ | ||
${{ startsWith(matrix.compiler, 'gcc') && 'gcc' || 'clang' }} \ | ||
default_s \ | ||
-DOGDF_INCLUDE_CGAL=ON \ | ||
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
- uses: actions/upload-artifact@v3 | ||
name: Upload ccache debug info | ||
if: ${{ env.CCACHE_DEBUG == 1 }} | ||
with: | ||
name: ${{ github.job }}-${{ env.GH_COMPILER_NAME }}-${{ matrix.mode }} | ||
path: ${{ github.workspace }}/ccache-debug | ||
|
||
build-macos: | ||
strategy: | ||
matrix: | ||
mode: [debug, release] | ||
runs-on: macos-latest | ||
needs: [style, dirs, docs, self-sufficiency] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: brew install coreutils findutils | ||
- name: Set-up ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ github.job }}-${{ matrix.mode }} | ||
- name: Test ${{ matrix.mode }} build and run | ||
run: | | ||
util/test_build_and_run.sh \ | ||
static \ | ||
${{ matrix.mode }} \ | ||
default_c \ | ||
default_s \ | ||
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
- uses: actions/upload-artifact@v3 | ||
name: Upload ccache debug info | ||
if: ${{ env.CCACHE_DEBUG == 1 }} | ||
with: | ||
name: ${{ github.job }}-${{ matrix.mode }} | ||
path: ${{ github.workspace }}/ccache-debug | ||
|
||
build-windows: | ||
strategy: | ||
matrix: | ||
mode: [debug, release] | ||
runs-on: windows-latest | ||
needs: [style, dirs, docs, self-sufficiency] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: microsoft/[email protected] | ||
- name: Test ${{ matrix.mode }} build and run | ||
run: powershell util\test_build_and_run.ps1 ${{ matrix.mode == 'debug' && '-debug' }} |
Oops, something went wrong.