Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaraslaut committed Jan 17, 2024
0 parents commit d5919ef
Show file tree
Hide file tree
Showing 29 changed files with 3,220 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
BasedOnStyle: Microsoft
AccessModifierOffset: '-2'
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: 'true'
AlignConsecutiveDeclarations: 'false'
AlignEscapedNewlines: Left
AlignOperands: 'true'
AlignTrailingComments: 'true'
AllowAllArgumentsOnNextLine: 'true'
AllowAllConstructorInitializersOnNextLine: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'true'
AllowShortBlocksOnASingleLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'true'
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: 'false'
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: 'false'
AlwaysBreakTemplateDeclarations: 'Yes'
BinPackArguments: 'false'
BinPackParameters: 'false'
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: 'true'
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
BreakStringLiterals: 'true'
ColumnLimit: '110'
CompactNamespaces: 'false'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
ConstructorInitializerIndentWidth: '4'
ContinuationIndentWidth: '4'
Cpp11BracedListStyle: 'false'
DerivePointerAlignment: 'false'
FixNamespaceComments: 'true'
IncludeBlocks: Regroup
IndentCaseLabels: true
IndentPPDirectives: BeforeHash
IndentWidth: '4'
IndentWrappedFunctionNames: 'false'
Language: Cpp
MaxEmptyLinesToKeep: '1'
NamespaceIndentation: Inner
PenaltyBreakAssignment: '0'
PointerAlignment: Left
ReflowComments: 'true'
SortIncludes: 'true'
SortUsingDeclarations: 'true'
SpaceAfterCStyleCast: 'true'
SpaceAfterLogicalNot: 'false'
SpaceAfterTemplateKeyword: 'true'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeCpp11BracedList: 'true'
SpaceBeforeCtorInitializerColon: 'false'
SpaceBeforeInheritanceColon: 'false'
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: 'false'
SpaceInEmptyParentheses: 'false'
SpacesInAngles: 'false'
SpacesInCStyleCastParentheses: 'false'
SpacesInContainerLiterals: 'false'
SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
Standard: Cpp11
TabWidth: '4'
UseTab: Never
---
Language: Json
DisableFormat: true
41 changes: 41 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
root = true

[*.sh]
indent_style = space
indent_size = 4
insert_final_newline = true
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true

[*.h]
indent_style = space
indent_size = 4
insert_final_newline = true
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true

[*.cpp]
indent_style = space
indent_size = 4
insert_final_newline = true
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true

[*.md]
indent_style = space
indent_size = 2
insert_final_newline = true
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true

[.github/**/*.yml]
indent_style = space
indent_size = 2
insert_final_newline = true
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
150 changes: 150 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
name : Build

on:
push:
paths-ignore:
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/*.yml'
- 'LICENSE.txt'
- '*.md'
- '*.sh'
branches:
- master

- edge
pull_request:
branches:
- master
- edge

jobs:
ubuntu_2204_cc_matrix_no_cuda:
strategy:
fail-fast: false
matrix:
cxx: [17, 20]
build_type: ["RelWithDebInfo"]
compiler:
[
"g++-11",
"g++-10",
"clang++-11",
"clang++-12",
"clang++-13",
"clang++-14"
]
name: "Ubuntu 22.04 (${{ matrix.compiler }}, C++${{ matrix.cxx }}, ${{matrix.build_type}})"
runs-on: ubuntu-22.04
outputs:
id: "${{ matrix.compiler }} (C++${{ matrix.cxx }}, ${{ matrix.build_type }})"
steps:
- uses: actions/checkout@v3
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: "ccache-ubuntu2204_no_cuda-${{ matrix.compiler }}-${{ matrix.cxx }}-${{ matrix.build_type }}"
max-size: 256M
- name: "update APT database"
run: sudo apt -q update

- name: Install GCC 11
if: ${{ startsWith(matrix.compiler, 'g++-11') }}
run: sudo apt install -y g++-11
- name: Install GCC 10
if: ${{ startsWith(matrix.compiler, 'g++-10') }}
run: sudo apt install -y g++-10
- name: Install Clang 11
if: ${{ startsWith(matrix.compiler, 'clang++-11') }}
run: sudo apt install -y clang-11
- name: Install Clang 12
if: ${{ startsWith(matrix.compiler, 'clang++-12') }}
run: sudo apt install -y clang-12
- name: Install Clang 13
if: ${{ startsWith(matrix.compiler, 'clang++-13') }}
run: sudo apt install -y clang-13
- name: Install Clang 14
if: ${{ startsWith(matrix.compiler, 'clang++-14') }}
run: sudo apt install -y clang-14

- name: "Download dependencies"
run: sudo apt install cmake ninja-build
- name: "Cmake configure"
run: cmake --preset=prop-actions -S . -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
- name: "build "
run: cmake --build build/ --target "pyprop;prop_test" -- -j3

ubuntu_2004_cc_matrix_no_cuda:
strategy:
fail-fast: false
matrix:
cxx: [17]
build_type: ["RelWithDebInfo"]
compiler:
[
"g++",
"clang++"
]
name: "Ubuntu 20.04 (${{ matrix.compiler }}, C++${{ matrix.cxx }}, ${{matrix.build_type}})"
runs-on: ubuntu-20.04
outputs:
id: "${{ matrix.compiler }} (C++${{ matrix.cxx }}, ${{ matrix.build_type }})"
steps:
- uses: actions/checkout@v3
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: "ccache-ubuntu2004_no_cuda-${{ matrix.compiler }}-${{ matrix.cxx }}-${{ matrix.build_type }}"
max-size: 256M
- name: "update APT database"
run: sudo apt -q update
- name: Install GCC
if: ${{ startsWith(matrix.compiler, 'g++') }}
run: sudo apt install -y g++
- name: Install Clang
if: ${{ startsWith(matrix.compiler, 'clang++') }}
run: sudo apt install -y clang
- name: "Download dependencies"
run: sudo apt install cmake ninja-build
- name: "Cmake configure"
run: cmake --preset=prop-actions -S . -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
- name: "build "
run: cmake --build build/ --target "pyprop;prop_test" -- -j3


ubuntu_2204_cc_matrix_cuda:
strategy:
fail-fast: false
matrix:
cxx: [17, 20]
build_type: ["Debug", "RelWithDebInfo"]
compiler:
[
"g++-11"
]
name: "Ubuntu 22.04 CUDA (${{ matrix.compiler }}, C++${{ matrix.cxx }}, ${{matrix.build_type}})"
runs-on: ubuntu-22.04
outputs:
id: "${{ matrix.compiler }} (C++${{ matrix.cxx }}, ${{ matrix.build_type }})"
steps:
- uses: actions/checkout@v3
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: "ccache-ubuntu2204_cuda-${{ matrix.compiler }}-${{ matrix.cxx }}-${{ matrix.build_type }}"
max-size: 256M
- uses: Jimver/cuda-toolkit@v0.2.10
id: cuda-toolkit
with:
cuda: '12.1.0'
- name: "update APT database"
run: sudo apt -q update
- name: Install GCC 11
if: ${{ startsWith(matrix.compiler, 'g++-11') }}
run: sudo apt install -y g++-11
- name: "Download dependencies"
run: sudo apt install cmake ninja-build
- name: "Cmake configure"
run: cmake --preset=prop-cuda-actions -S . -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
- name: "build "
run: cmake --build build/ --target "pyprop" -- -j3
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build/
CMakeLists.txt.user
CMakeUserPresets.json
compile_commands.json
/.cache/
Loading

0 comments on commit d5919ef

Please sign in to comment.