-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
restructure cmake workflow presets #62
Changes from all commits
7c45940
78dc1c2
fb2500b
fbe7604
80ce062
74161e0
a3fab15
270d10d
fc8d510
37e9818
056d687
b9c8984
2ed4c45
ed03fd7
303cca6
904749c
7815a35
24f66ec
009d01e
a82f7af
be46000
3e4669f
abce05e
64ea7c4
e405584
a1ebfba
0058009
d8fb010
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Checks: | ||
'-*, | ||
boost-*, | ||
bugprone-*, | ||
cert-*, | ||
-cert-dcl58-cpp, | ||
clang-analyzer-*, | ||
concurrency-*, | ||
-cppcoreguidelines-*, | ||
-google-*, | ||
hicpp-*, | ||
misc-*, | ||
-misc-const-correctness, | ||
-misc-include-cleaner, | ||
-misc-non-private-member-variables-in-classes, | ||
-modernize-*, | ||
-modernize-use-nodiscard, | ||
performance-*, | ||
portability-*, | ||
-readability-*, | ||
-readability-identifier-*, | ||
-readability-implicit-bool-conversion, | ||
-readability-magic-numbers, | ||
-*-named-parameter, | ||
-*-uppercase-literal-suffix, | ||
-*-use-equals-default, | ||
-*-braces-around-statements | ||
' | ||
HeaderFilterRegex: '.*/execution26/(include|src|example|tests)/.*\.(hpp)$' | ||
WarningsAsErrors: 'clang*' | ||
FormatStyle: file | ||
|
||
CheckOptions: | ||
- { key: readability-identifier-naming.NamespaceCase, value: CamelCase } | ||
- { key: readability-identifier-naming.ClassCase, value: CamelCase } | ||
- { key: readability-identifier-naming.EnumCase, value: CamelCase } | ||
- { key: readability-identifier-naming.MemberCase, value: camelBack } | ||
- { key: readability-identifier-naming.MemberPrefix, value: m_ } | ||
- { key: readability-identifier-naming.StructCase, value: lower_case } | ||
- { key: readability-identifier-naming.UnionCase, value: lower_case } | ||
- { key: readability-identifier-naming.TypedefCase, value: lower_case } | ||
- { key: readability-identifier-naming.TypedefSuffix, value: _type } | ||
- { key: readability-identifier-naming.FunctionCase, value: camelBack } | ||
- { key: readability-identifier-naming.VariableCase, value: camelBack } | ||
- { key: readability-identifier-naming.ParameterCase, value: camelBack } | ||
- { key: readability-identifier-naming.LocalVariableCase, value: camelBack } | ||
- { key: readability-identifier-naming.ConstexprFunctionCase, value: camelBack } | ||
- { key: readability-identifier-naming.ConstexprMethodCase, value: camelBack } | ||
- { key: readability-identifier-naming.ConstexprVariableCase, value: UPPER_CASE } | ||
- { key: readability-identifier-naming.ClassConstantCase, value: UPPER_CASE } | ||
- { key: readability-identifier-naming.EnumConstantCase, value: UPPER_CASE } | ||
- { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE } | ||
- { key: readability-identifier-naming.GlobalConstantPointerCase, value: UPPER_CASE } | ||
- { key: readability-identifier-naming.LocalConstantPointerCase, value: UPPER_CASE } | ||
- { key: readability-identifier-naming.ScopedEnumConstantCase, value: UPPER_CASE } | ||
- { key: readability-identifier-naming.StaticConstantCase, value: UPPER_CASE } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[codespell] | ||
builtin = clear,rare,en-GB_to_en-US,names,informal,code | ||
check-hidden = | ||
skip = ./.git,./build/*,./stagedir/*,./docs/html/*,./docs/latex/*,*.log,.*.swp,*~,*.bak,Makefile | ||
quiet-level = 2 | ||
# ignore-words = .ignore-words |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,15 +5,15 @@ name: Macos Build | |
|
||
on: | ||
push: | ||
# branches: [ "main" ] | ||
branches: ["main"] | ||
paths: | ||
- "include/**" | ||
- "src/**" | ||
- "test/**" | ||
- "CMakeLists.txt" | ||
- ".github/workflows/macos.yml" | ||
pull_request: | ||
branches: [ "main" ] | ||
branches: ["main"] | ||
paths: | ||
- "include/**" | ||
- "src/**" | ||
|
@@ -29,8 +29,8 @@ jobs: | |
|
||
matrix: | ||
sanitizer: [debug, release] | ||
# TODO: compiler: [g++-14, clang++-19] | ||
compiler: [clang++-18] | ||
# TODO: compiler: [g++, clang++-19] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The TODO mentions |
||
compiler: [g++, clang++-18] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -39,11 +39,20 @@ jobs: | |
# if: startsWith(matrix.compiler, 'clang') | ||
uses: aminya/setup-cpp@v1 | ||
with: | ||
# compiler: llvm-19 | ||
# TODO: compiler: llvm-19 | ||
# clangtidy: true | ||
# cmake: true | ||
ninja: true | ||
|
||
- name: macos ${{ matrix.compiler }} ${{ matrix.sanitizer }} | ||
- name: Install llvm-19 | ||
if: startsWith(matrix.compiler, 'clang') | ||
run: | | ||
brew install llvm@19 || echo ignored | ||
- name: macos clang++-18 ${{ matrix.sanitizer }} | ||
if: startsWith(matrix.compiler, 'clang') | ||
run: CXX=$(brew --prefix llvm@18)/bin/clang++ make ${{ matrix.sanitizer }} | ||
|
||
- name: macos g++ ${{ matrix.sanitizer }} | ||
if: startsWith(matrix.compiler, 'g++') | ||
run: CXX=${{ matrix.compiler }} make ${{ matrix.sanitizer }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,27 @@ | ||
{ | ||
"version": 6, | ||
"configurePresets": [ | ||
{ | ||
"name": "root-config", | ||
"hidden": true, | ||
"generator": "Ninja", | ||
"binaryDir": "${sourceDir}/build/${presetName}", | ||
"installDir": "${sourceDir}/stagedir", | ||
"cacheVariables": { | ||
"CMAKE_PREFIX_PATH": { | ||
"type": "path", | ||
"value": "${sourceDir}/stagedir" | ||
}, | ||
"CMAKE_CXX_EXTENSIONS": false, | ||
"CMAKE_CXX_STANDARD": "23", | ||
"CMAKE_CXX_STANDARD_REQUIRED": true, | ||
"CMAKE_EXPORT_COMPILE_COMMANDS": true | ||
} | ||
}, | ||
{ | ||
"name": "debug-base-unix", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug", | ||
"CMAKE_CXX_FLAGS": "-fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=leak -fsanitize=undefined" | ||
}, | ||
"condition": { | ||
"type": "notEquals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
} | ||
}, | ||
{ | ||
"name": "release-base-unix", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "RelWithDebInfo", | ||
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wpedantic -Wno-shadow -Wconversion -Wsign-conversion -Wcast-align -Wcast-qual -Woverloaded-virtual -Wformat=2 -Wno-error" | ||
}, | ||
"condition": { | ||
"type": "notEquals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
} | ||
}, | ||
{ | ||
"name": "debug", | ||
"displayName": "Debug Build", | ||
"inherits": [ | ||
"root-config", | ||
"debug-base-unix" | ||
] | ||
}, | ||
{ | ||
"name": "release", | ||
"displayName": "Release Build", | ||
"inherits": [ | ||
"root-config", | ||
"release-base-unix" | ||
] | ||
} | ||
"version": 9, | ||
"cmakeMinimumRequired": { | ||
"major": 3, | ||
"minor": 30, | ||
"patch": 0 | ||
}, | ||
Comment on lines
+2
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These recent versions prevent me from building on Debian 12 which installs |
||
"include": [ | ||
"cmake/CMake${hostSystemName}Presets.json" | ||
], | ||
"buildPresets": [ | ||
{ | ||
"name": "debug", | ||
"configurePreset": "debug", | ||
"configuration": "Debug", | ||
"targets": [ | ||
"all", | ||
"install" | ||
] | ||
}, | ||
{ | ||
"name": "release", | ||
"configurePreset": "release", | ||
"configuration": "Release", | ||
"targets": [ | ||
"all", | ||
"all_verify_interface_header_sets", | ||
"install" | ||
] | ||
|
@@ -95,14 +42,28 @@ | |
{ | ||
"name": "debug", | ||
"inherits": "test_base", | ||
"configuration": "Debug", | ||
"configurePreset": "debug" | ||
}, | ||
{ | ||
"name": "release", | ||
"inherits": "test_base", | ||
"configuration": "Release", | ||
"configurePreset": "release" | ||
} | ||
], | ||
"packagePresets": [ | ||
{ | ||
"name": "release", | ||
"configurePreset": "release", | ||
"configurations": [ | ||
"Release" | ||
], | ||
"generators": [ | ||
"TGZ" | ||
] | ||
} | ||
], | ||
"workflowPresets": [ | ||
{ | ||
"name": "debug", | ||
|
@@ -135,6 +96,10 @@ | |
{ | ||
"type": "test", | ||
"name": "release" | ||
}, | ||
{ | ||
"type": "package", | ||
"name": "release" | ||
} | ||
] | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I read that correctly, the readability options are somewhat at odd with C++ standard library naming. However, the previous section seems to have disabled all of these for now.
Having a
clang-tidy
config is good - it will likely require some clean-up, probably discover bugs.