-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-windows
- Loading branch information
Showing
49 changed files
with
2,122 additions
and
350 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,159 @@ | ||
# Copyright (C) 2022 Roberto Rossini <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
--- | ||
Language: Cpp | ||
# BasedOnStyle: Google | ||
AccessModifierOffset: -1 | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveMacros: AcrossEmptyLinesAndComments | ||
AlignConsecutiveAssignments: false | ||
AlignConsecutiveDeclarations: false | ||
AlignEscapedNewlines: Left | ||
AlignOperands: true | ||
AlignTrailingComments: true | ||
AllowAllArgumentsOnNextLine: true | ||
AllowAllConstructorInitializersOnNextLine: true | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: All | ||
AllowShortLambdasOnASingleLine: All | ||
AllowShortIfStatementsOnASingleLine: WithoutElse | ||
AllowShortLoopsOnASingleLine: true | ||
AlwaysBreakAfterDefinitionReturnType: None | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: true | ||
AlwaysBreakTemplateDeclarations: Yes | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BraceWrapping: | ||
AfterCaseLabel: false | ||
AfterClass: false | ||
AfterControlStatement: false | ||
AfterEnum: false | ||
AfterFunction: false | ||
AfterNamespace: false | ||
AfterObjCDeclaration: false | ||
AfterStruct: false | ||
AfterUnion: false | ||
AfterExternBlock: false | ||
BeforeCatch: false | ||
BeforeElse: false | ||
IndentBraces: false | ||
SplitEmptyFunction: true | ||
SplitEmptyRecord: true | ||
SplitEmptyNamespace: true | ||
BreakBeforeBinaryOperators: None | ||
BreakBeforeBraces: Attach | ||
BreakBeforeInheritanceComma: false | ||
BreakInheritanceList: BeforeColon | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializersBeforeComma: false | ||
BreakConstructorInitializers: BeforeColon | ||
BreakAfterJavaFieldAnnotations: false | ||
BreakStringLiterals: true | ||
ColumnLimit: 100 | ||
CommentPragmas: '^ IWYU pragma:| NOLINT' | ||
CompactNamespaces: false | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
ConstructorInitializerIndentWidth: 4 | ||
ContinuationIndentWidth: 4 | ||
Cpp11BracedListStyle: true | ||
DerivePointerAlignment: true | ||
DisableFormat: false | ||
ExperimentalAutoDetectBinPacking: false | ||
FixNamespaceComments: true | ||
ForEachMacros: | ||
- foreach | ||
- Q_FOREACH | ||
- BOOST_FOREACH | ||
IncludeBlocks: Regroup | ||
IncludeCategories: | ||
- Regex: '^<ext/.*\.h>' | ||
Priority: 2 | ||
- Regex: '^<.*\.h>' | ||
Priority: 1 | ||
- Regex: '^<.*' | ||
Priority: 2 | ||
- Regex: '.*' | ||
Priority: 3 | ||
IncludeIsMainRegex: '([-_](test|unittest))?$' | ||
IndentCaseLabels: true | ||
IndentPPDirectives: None | ||
IndentWidth: 2 | ||
IndentWrappedFunctionNames: false | ||
JavaScriptQuotes: Leave | ||
JavaScriptWrapImports: true | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
MacroBlockBegin: '' | ||
MacroBlockEnd: '' | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: None | ||
ObjCBinPackProtocolList: Never | ||
ObjCBlockIndentWidth: 2 | ||
ObjCSpaceAfterProperty: false | ||
ObjCSpaceBeforeProtocolList: true | ||
PenaltyBreakAssignment: 2 | ||
PenaltyBreakBeforeFirstCallParameter: 1 | ||
PenaltyBreakComment: 300 | ||
PenaltyBreakFirstLessLess: 120 | ||
PenaltyBreakString: 1000 | ||
PenaltyBreakTemplateDeclaration: 10 | ||
PenaltyExcessCharacter: 1000000 | ||
PenaltyReturnTypeOnItsOwnLine: 200 | ||
PointerAlignment: Left | ||
RawStringFormats: | ||
- Language: Cpp | ||
Delimiters: | ||
- cc | ||
- CC | ||
- cpp | ||
- Cpp | ||
- CPP | ||
- 'c++' | ||
- 'C++' | ||
CanonicalDelimiter: '' | ||
BasedOnStyle: google | ||
- Language: TextProto | ||
Delimiters: | ||
- pb | ||
- PB | ||
- proto | ||
- PROTO | ||
EnclosingFunctions: | ||
- EqualsProto | ||
- EquivToProto | ||
- PARSE_PARTIAL_TEXT_PROTO | ||
- PARSE_TEST_PROTO | ||
- PARSE_TEXT_PROTO | ||
- ParseTextOrDie | ||
- ParseTextProtoOrDie | ||
CanonicalDelimiter: '' | ||
BasedOnStyle: google | ||
ReflowComments: true | ||
SortIncludes: true | ||
SortUsingDeclarations: true | ||
SpaceAfterCStyleCast: false | ||
SpaceAfterLogicalNot: false | ||
SpaceAfterTemplateKeyword: true | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeCpp11BracedList: false | ||
SpaceBeforeCtorInitializerColon: true | ||
SpaceBeforeInheritanceColon: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceBeforeRangeBasedForLoopColon: true | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 2 | ||
SpacesInAngles: false | ||
SpacesInContainerLiterals: true | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
Standard: Auto | ||
StatementMacros: | ||
- Q_UNUSED | ||
- QT_REQUIRE_VERSION | ||
TabWidth: 8 | ||
UseTab: Never | ||
... |
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
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,131 @@ | ||
# Copyright (C) 2023 Roberto Rossini ([email protected]) | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Wheels | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- ".github/workflows/wheels.yml" | ||
- "cmake/**" | ||
- "src/**" | ||
- "test/**" | ||
- "CMakeLists.txt" | ||
- "conanfile.txt" | ||
- "pyproject.toml" | ||
- "setup.cfg" | ||
- "setup.py" | ||
tags: | ||
- 'v*.*.*' | ||
|
||
pull_request: | ||
paths: | ||
- ".github/workflows/wheels.yml" | ||
- "cmake/**" | ||
- "src/**" | ||
- "test/**" | ||
- "CMakeLists.txt" | ||
- "conanfile.txt" | ||
- "pyproject.toml" | ||
- "setup.cfg" | ||
- "setup.py" | ||
|
||
release: | ||
types: | ||
- published | ||
|
||
# https://stackoverflow.com/a/72408109 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
CONAN_HOME: "${{ github.workspace }}/conan/" | ||
CCACHE_DIR: "${{ github.workspace }}/ccache/" | ||
|
||
jobs: | ||
build_sdist: | ||
name: Build SDist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build SDist | ||
run: pipx run build --sdist | ||
|
||
- name: Check metadata | ||
run: pipx run twine check dist/* | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/*.tar.gz | ||
|
||
|
||
build_wheels: | ||
name: Wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
if: runner.os == 'Linux' | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: all | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
if: ${{ github.event_name != 'pull_request' }} | ||
env: | ||
CIBW_ARCHS_LINUX: x86_64 | ||
CIBW_ARCHS_MACOS: x86_64 arm64 | ||
CIBW_ARCHS_WINDOWS: AMD64 | ||
|
||
- name: Build wheels (PR) | ||
uses: pypa/[email protected] | ||
if: ${{ github.event_name == 'pull_request' }} | ||
env: | ||
CIBW_ARCHS_LINUX: x86_64 | ||
CIBW_ARCHS_MACOS: x86_64 arm64 | ||
CIBW_ARCHS_WINDOWS: AMD64 | ||
CIBW_BUILD: "cp311-*" | ||
|
||
- name: Verify clean directory | ||
run: git diff --exit-code | ||
|
||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: wheelhouse/*.whl | ||
|
||
|
||
upload_all: | ||
name: Upload if release | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
|
||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.pypi_password }} |
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
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,7 @@ | ||
# Copyright (C) 2023 Roberto Rossini ([email protected]) | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
include conanfile.txt README.md LICENSE | ||
graft cmake/ src/ | ||
global-include CMakeLists.txt |
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
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,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright (C) 2023 Roberto Rossini ([email protected]) | ||
# SPDX-License-Identifier: MIT | ||
|
||
set -e | ||
set -u | ||
|
||
# readlink -f is not available on macos... | ||
function readlink_py { | ||
set -eu | ||
python3 -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$1" | ||
} | ||
|
||
install_prefix="$(readlink_py "${1-/usr/local}")" | ||
|
||
conan install conanfile.txt \ | ||
-s build_type=Release \ | ||
-s compiler.cppstd=17 \ | ||
--output-folder "$install_prefix/share/cmake/" \ | ||
-o '*/*:shared=True' \ | ||
--build="missing" |
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,28 @@ | ||
# Copyright (C) 2023 Roberto Rossini <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
[requires] | ||
fast_float/5.2.0 | ||
fmt/10.0.0 | ||
hdf5/1.14.0 | ||
highfive/2.7.1 | ||
libdeflate/1.18 | ||
parallel-hashmap/1.3.11 | ||
pybind11/2.10.4 | ||
spdlog/1.12.0 | ||
|
||
[generators] | ||
CMakeDeps | ||
|
||
[options] | ||
fmt*:header_only=True | ||
hdf5*:enable_cxx=False | ||
hdf5*:hl=False | ||
hdf5*:threadsafe=False | ||
hdf5*:parallel=False | ||
highfive*:with_boost=False | ||
highfive*:with_eigen=False | ||
highfive*:with_opencv=False | ||
highfive*:with_xtensor=False | ||
spdlog*:header_only=True |
Oops, something went wrong.