Skip to content
Merged
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
34 changes: 32 additions & 2 deletions .github/workflows/analyzers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ jobs:
with:
cache: true

- name: get conan
uses: turtlebrowser/get-conan@main

- name: cache conan
uses: actions/cache@v2
with:
path: |
~/.conan2
/Users/runner/.conan2/
key: ${{ runner.os }}-conan-2

- name: run conan
run: |
conan profile detect --force

- name: Install tools
id: setup
continue-on-error: true
Expand All @@ -48,7 +63,7 @@ jobs:
sudo wget -O /etc/apt/sources.list.d/viva64.list \
https://files.pvs-studio.com/etc/viva64.list
sudo apt update
sudo apt install pvs-studio libsfml-dev
sudo apt install pvs-studio
pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }}

- name: Run CMake
Expand Down Expand Up @@ -90,7 +105,7 @@ jobs:
ref: ${{ github.event.workflow_run.head_branch }}

- name: Install llvm
run: sudo apt-get update -q && sudo apt-get install llvm libsfml-dev -q -y
run: sudo apt-get update -q && sudo apt-get install llvm -q -y

# Work around https://github.com/actions/runner-images/issues/8659
- name: "Remove GCC 13 from runner image (workaround)"
Expand All @@ -104,6 +119,21 @@ jobs:
with:
cache: true

- name: get conan
uses: turtlebrowser/get-conan@main

- name: cache conan
uses: actions/cache@v2
with:
path: |
~/.conan2
/Users/runner/.conan2/
key: ${{ runner.os }}-conan-2

- name: run conan
run: |
conan profile detect --force

- name: Install sonar-scanner and build-wrapper
uses: sonarsource/sonarcloud-github-c-cpp@v2

Expand Down
49 changes: 47 additions & 2 deletions .github/workflows/ci v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ jobs:
with:
cache: true

- name: get conan
uses: turtlebrowser/get-conan@main

- name: cache conan
uses: actions/cache@v2
with:
path: |
~/.conan2
/Users/runner/.conan2/
key: ${{ runner.os }}-conan-2

- name: run conan
run: |
conan profile detect --force

# Work around https://github.com/actions/runner-images/issues/8659
- name: "Remove GCC 13 from runner image (workaround)"
shell: bash
Expand Down Expand Up @@ -86,9 +101,9 @@ jobs:
- name: Install deps
if: matrix.config.os == 'ubuntu-latest'
run: |
sudo apt-get update -q && sudo apt-get install clang-tidy cppcheck libsfml-dev -y -q
sudo apt-get update -q && sudo apt-get install clang-tidy cppcheck -y -q
pip install pyyaml

- name: Cmake version
run: cmake --version

Expand All @@ -97,6 +112,21 @@ jobs:
with:
cache: true

- name: get conan
uses: turtlebrowser/get-conan@main

- name: cache conan
uses: actions/cache@v2
with:
path: |
~/.conan2
/Users/runner/.conan2/
key: ${{ runner.os }}-conan-2

- name: run conan
run: |
conan profile detect --force

- name: Run CMake
uses: lukka/run-cmake@v10
with:
Expand Down Expand Up @@ -158,6 +188,21 @@ jobs:
with:
cache: true

- name: get conan
uses: turtlebrowser/get-conan@main

- name: cache conan
uses: actions/cache@v2
with:
path: |
~/.conan2
/Users/runner/.conan2/
key: ${{ runner.os }}-conan-2

- name: run conan
run: |
conan profile detect --force

- name: Install project and build
env:
CC: gcc-10
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"recommendations": [
"llvm-vs-code-extensions.vscode-clangd",
"ms-vscode.cmake-tools",
"cschlosser.doxdocgen"
"cschlosser.doxdocgen",
"ms-vscode.cpptools"
]
}
23 changes: 11 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ project(

include(cmake/project-is-top-level.cmake)

# ---- Developer mode ----

if(RPP_DEVELOPER_MODE)
if(NOT PROJECT_IS_TOP_LEVEL)
message(AUTHOR_WARNING "RPP_DEVELOPER_MODE is intended for developers of ReactivePlusPlus")
endif()

include(cmake/dev-mode.cmake)
endif()


if (RPP_BUILD_TESTS OR RPP_BUILD_BENCHMARKS)
enable_testing()
set(RPP_TEST_RESULTS_DIR ${CMAKE_BINARY_DIR}/test_results)
Expand All @@ -59,15 +70,3 @@ add_subdirectory(src)
if(NOT CMAKE_SKIP_INSTALL_RULES)
include(cmake/install-rules.cmake)
endif()

# ---- Developer mode ----

if(NOT RPP_DEVELOPER_MODE)
return()
endif()

if(NOT PROJECT_IS_TOP_LEVEL)
message(AUTHOR_WARNING "RPP_DEVELOPER_MODE is intended for developers of ReactivePlusPlus")
endif()

include(cmake/dev-mode.cmake)
99 changes: 47 additions & 52 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@




{
"name": "cppcheck",
"hidden": true,
Expand Down Expand Up @@ -104,160 +103,156 @@
}
},
{
"name" : "ci-build-tests",
"name" : "build-tests",
"hidden": true,
"cacheVariables": {
"RPP_BUILD_TESTS" : "ON",
"RPP_BUILD_QT_CODE" : "ON"
"RPP_BUILD_TESTS" : "ON"
}
},
{
"name" : "ci-build-examples",
"name" : "build-examples",
"hidden": true,
"cacheVariables": {
"RPP_BUILD_EXAMPLES" : "ON",
"RPP_BUILD_QT_CODE" : "ON"
"RPP_BUILD_EXAMPLES" : "ON"
}
},
{
"name" : "ci-build-benchmarks",
"name" : "build-benchmarks",
"hidden": true,
"cacheVariables": {
"RPP_BUILD_RXCPP" : "ON",
"RPP_BUILD_BENCHMARKS" : "ON"
}
},
{
"name" : "ci-build-sfml",
"name" : "build-sfml",
"hidden": true,
"cacheVariables": {
"RPP_BUILD_SFML_CODE" : "ON"
}
},
{
"name": "coverage-unix-gcc",
"inherits": ["ci-unix", "ci-gcc"],
"name" : "build-qt",
"hidden": true,
"cacheVariables": {
"RPP_ENABLE_COVERAGE": "ON",
"CMAKE_BUILD_TYPE": "Coverage",
"CMAKE_CXX_FLAGS_COVERAGE": "-O0 -g --coverage -fkeep-inline-functions -fkeep-static-functions -fprofile-arcs -ftest-coverage -fno-inline -fno-omit-frame-pointer -fno-optimize-sibling-calls",
"CMAKE_EXE_LINKER_FLAGS_COVERAGE": "--coverage",
"CMAKE_SHARED_LINKER_FLAGS_COVERAGE": "--coverage"
"RPP_BUILD_QT_CODE" : "ON"
}
},
{
"name": "coverage-unix-clang",
"inherits": ["ci-unix", "ci-clang"],
"name" : "use-conan",
"hidden": true,
"cacheVariables": {
"RPP_ENABLE_COVERAGE": "ON",
"CMAKE_BUILD_TYPE": "Coverage",
"CMAKE_CXX_FLAGS_COVERAGE": "-fprofile-instr-generate -fcoverage-mapping",
"CMAKE_EXE_LINKER_FLAGS_COVERAGE": "-fprofile-instr-generate -fcoverage-mapping",
"RPP_USE_LLVM_COV" : "ON"
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "cmake/conan_provider.cmake",
"CONAN_ARGS": "",
"CONAN_INSTALL_ARGS": "--build=missing;-s=compiler.cppstd=20;-c=tools.system.package_manager:mode=install;-c=tools.system.package_manager:sudo=True"
}
},
{
"name": "build-dir",
"binaryDir": "${sourceDir}/build"
},



{
"name": "ci-build",
"binaryDir": "${sourceDir}/build"
"inherits" : ["build-dir", "use-conan"]
},
{
"name": "ci-coverage-gcc",
"inherits": ["ci-build", "ci-build-tests", "coverage-unix-gcc"],
"inherits": ["ci-build", "build-tests", "build-qt", "ci-unix", "ci-gcc"],
"cacheVariables": {
"RPP_ENABLE_COVERAGE": "ON",
"CMAKE_CXX_FLAGS": "-O0 -g --coverage -fkeep-inline-functions -fkeep-static-functions -fprofile-arcs -ftest-coverage -fno-inline -fno-omit-frame-pointer -fno-optimize-sibling-calls",
"CMAKE_EXE_LINKER_FLAGS": "--coverage",
"CMAKE_SHARED_LINKER_FLAGS": "--coverage",
"RPP_BUILD_TESTS_TOGETHER" : true
}
},
{
"name": "ci-coverage-clang",
"inherits": ["ci-build", "ci-build-tests", "coverage-unix-clang"],
"inherits": ["ci-build", "build-tests", "build-qt", "ci-unix", "ci-clang"],
"cacheVariables": {
"RPP_BUILD_TESTS_TOGETHER" : true
"RPP_ENABLE_COVERAGE": "ON",
"CMAKE_CXX_FLAGS": "-fprofile-instr-generate -fcoverage-mapping",
"CMAKE_EXE_LINKER_FLAGS": "-fprofile-instr-generate -fcoverage-mapping",
"RPP_BUILD_TESTS_TOGETHER" : true,
"RPP_USE_LLVM_COV" : "ON"
}
},
{
"name": "ci-sanitize-tsan",
"inherits": ["ci-build", "ci-build-tests", "ci-build-benchmarks", "ci-unix", "ci-clang"],
"inherits": ["ci-build", "build-tests", "build-benchmarks", "build-qt", "ci-unix", "ci-clang"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Sanitize",
"CMAKE_CXX_FLAGS_SANITIZE": "-fsanitize=thread -g -O1"
"CMAKE_CXX_FLAGS": "-fsanitize=thread -g -O1"
}
},
{
"name": "ci-sanitize-asan",
"inherits": ["ci-build", "ci-build-tests", "ci-build-benchmarks", "ci-unix", "ci-clang"],
"inherits": ["ci-build", "build-tests", "build-benchmarks", "build-qt", "ci-unix", "ci-clang"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Sanitize",
"CMAKE_CXX_FLAGS_SANITIZE": "-fsanitize=address -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1"
"CMAKE_CXX_FLAGS": "-fsanitize=address -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1"
}
},
{
"name": "ci-sanitize-lsan",
"inherits": ["ci-build", "ci-build-tests", "ci-build-benchmarks", "ci-unix", "ci-clang"],
"inherits": ["ci-build", "build-tests", "build-benchmarks", "build-qt", "ci-unix", "ci-clang"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Sanitize",
"CMAKE_CXX_FLAGS_SANITIZE": "-fsanitize=leak -fno-omit-frame-pointer -g -O1"
"CMAKE_CXX_FLAGS": "-fsanitize=leak -fno-omit-frame-pointer -g -O1"
}
},
{
"name": "ci-sanitize-msan",
"inherits": ["ci-build", "ci-build-tests", "ci-build-benchmarks", "ci-unix", "ci-clang"],
"inherits": ["ci-build", "build-tests", "build-benchmarks", "build-qt", "ci-unix", "ci-clang"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Sanitize",
"CMAKE_CXX_FLAGS_SANITIZE": "-fsanitize=memory -fno-optimize-sibling-calls -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O2"
"CMAKE_CXX_FLAGS": "-fsanitize=memory -fno-optimize-sibling-calls -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer -g -O2"
}
},
{
"name": "ci-sanitize-ubsan",
"inherits": ["ci-build", "ci-build-tests", "ci-build-benchmarks", "ci-unix", "ci-clang"],
"inherits": ["ci-build", "build-tests", "build-benchmarks", "build-qt", "ci-unix", "ci-clang"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Sanitize",
"CMAKE_CXX_FLAGS_SANITIZE": "-fsanitize=undefined"
"CMAKE_CXX_FLAGS": "-fsanitize=undefined"
}
},
{
"name": "ci-macos-tests",
"inherits": ["ci-build", "ci-build-tests", "ci-build-examples", "ci-unix"]
"inherits": ["ci-build", "build-tests", "build-examples", "build-qt", "build-sfml", "ci-unix"]
},
{
"name": "ci-ubuntu-clang-tests",
"inherits": ["ci-build", "ci-build-tests", "ci-build-examples", "ci-build-sfml", "ci-unix", "ci-clang", "cppcheck", "clang-tidy"]
"inherits": ["ci-build", "build-tests", "build-examples", "build-qt", "build-sfml", "ci-unix", "ci-clang", "cppcheck", "clang-tidy"]
},
{
"name": "ci-ubuntu-gcc-tests",
"inherits": ["ci-build", "ci-build-tests", "ci-build-examples", "ci-build-sfml", "ci-unix", "ci-gcc", "cppcheck", "clang-tidy"]
"inherits": ["ci-build", "build-tests", "build-examples", "build-qt", "build-sfml", "ci-unix", "ci-gcc", "cppcheck", "clang-tidy"]
},
{
"name": "ci-windows-tests",
"inherits": ["ci-build", "ci-build-tests", "ci-build-examples", "ci-win64"]
"inherits": ["ci-build", "build-tests", "build-examples", "build-qt", "build-sfml", "ci-win64"]
},
{
"name": "ci-ubuntu-clang-tests-no-checks",
"inherits": ["ci-build", "ci-build-tests", "ci-build-examples", "ci-build-sfml", "ci-unix", "ci-clang" ]
"inherits": ["ci-build", "build-tests", "build-examples", "build-qt", "build-sfml", "ci-unix", "ci-clang" ]
},




{
"name": "ci-macos-benchmarks",
"inherits": ["ci-build", "ci-build-benchmarks", "ci-unix"]
"inherits": ["ci-build", "build-benchmarks", "ci-unix"]
},
{
"name": "ci-ubuntu-clang-benchmarks",
"inherits": ["ci-build", "ci-build-benchmarks", "ci-unix", "ci-clang", "cppcheck", "clang-tidy"]
"inherits": ["ci-build", "build-benchmarks", "ci-unix", "ci-clang", "cppcheck", "clang-tidy"]
},
{
"name": "ci-ubuntu-gcc-benchmarks",
"inherits": ["ci-build", "ci-build-benchmarks", "ci-unix", "ci-gcc", "cppcheck", "clang-tidy"]
"inherits": ["ci-build", "build-benchmarks", "ci-unix", "ci-gcc", "cppcheck", "clang-tidy"]
},
{
"name": "ci-windows-benchmarks",
"inherits": ["ci-build", "ci-build-benchmarks", "ci-win64"]
"inherits": ["ci-build", "build-benchmarks", "ci-win64"]
}
],
"buildPresets" :[
Expand Down
Loading