Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 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
2 changes: 2 additions & 0 deletions .github/actions/build-cpp/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ function build() {
cp -rf /github/workspace/CMakeLists.txt /pktvisor-src/
cp -rf /github/workspace/conanfile.py /pktvisor-src/
cp -rf /github/workspace/.conanrc /pktvisor-src/
cp -rf /github/workspace/conan/ /pktvisor-src/conan/
cd /pktvisor-src/
conan profile detect -f
conan export /pktvisor-src/conan/corrade/ --name=corrade --version=cci.20260327
cd /pktvisor-src/build/
if [ "$INPUT_ARCH" == "amd64" ]; then
PKG_CONFIG_PATH=/local/lib/pkgconfig cmake .. -DCMAKE_BUILD_TYPE=$INPUT_BUILD_TYPE \
Expand Down
34 changes: 25 additions & 9 deletions .github/workflows/build-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,22 @@ jobs:
uses: actions/cache@v5
with:
path: ${{github.workspace}}/build/p/
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.py', '*/conanfile.py', 'conan/corrade/**') }}
restore-keys: conan-${{ runner.os }}-

- name: Detect Conan Profile
run: conan profile detect -f
run: |
conan profile detect -f
echo "[conf]" >> "$(conan profile path default)"
echo "tools.apple:sdk_path=$(xcrun --sdk macosx --show-sdk-path)" >> "$(conan profile path default)"

- name: Export local Corrade recipe
run: conan export ${{github.workspace}}/conan/corrade/ --name=corrade --version=cci.20260327

- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./cmake/conan_provider.cmake -DCONAN_INSTALL_ARGS="--build=missing;-c=corrade/*:tools.build:cxxflags=['-include','vector']"
run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./cmake/conan_provider.cmake -DCONAN_INSTALL_ARGS="--build=missing"

- name: Build
working-directory: ${{github.workspace}}/build
Expand Down Expand Up @@ -83,9 +89,12 @@ jobs:
uses: actions/cache@v5
with:
path: ${{github.workspace}}/build/p/
key: conan-${{ runner.os }}-amd64-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
key: conan-${{ runner.os }}-amd64-${{ hashFiles('conanfile.py', '*/conanfile.py', 'conan/corrade/**') }}
restore-keys: conan-${{ runner.os }}-amd64-

- name: Export local Corrade recipe
run: conan export ${{github.workspace}}/conan/corrade/ --name=corrade --version=cci.20260327

- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
Expand Down Expand Up @@ -131,9 +140,13 @@ jobs:
uses: actions/cache@v5
with:
path: ${{github.workspace}}/build/p/
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.py', '*/conanfile.py', 'conan/corrade/**') }}
restore-keys: conan-${{ runner.os }}-

- name: Export local Corrade recipe
shell: bash
run: conan export $GITHUB_WORKSPACE/conan/corrade/ --name=corrade --version=cci.20260327

- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}\build
Expand Down Expand Up @@ -238,7 +251,7 @@ jobs:
uses: actions/cache@v5
with:
path: ${{github.workspace}}/build/p/
key: conan-${{ runner.os }}-amd64-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
key: conan-${{ runner.os }}-amd64-${{ hashFiles('conanfile.py', '*/conanfile.py', 'conan/corrade/**') }}
restore-keys: conan-${{ runner.os }}-amd64-

- name: Build pktvisord + push symbol to backtrace.io
Expand Down Expand Up @@ -337,9 +350,12 @@ jobs:
uses: actions/cache@v5
with:
path: ${{github.workspace}}/build/p/
key: conan-${{ runner.os }}-amd64-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
key: conan-${{ runner.os }}-amd64-${{ hashFiles('conanfile.py', '*/conanfile.py', 'conan/corrade/**') }}
restore-keys: conan-${{ runner.os }}-amd64-

- name: Export local Corrade recipe
run: conan export ${{github.workspace}}/conan/corrade/ --name=corrade --version=cci.20260327

- name: Configure CMake to generate VERSION
shell: bash
working-directory: ${{github.workspace}}/build
Expand Down Expand Up @@ -425,7 +441,7 @@ jobs:
uses: actions/cache@v5
with:
path: ${{github.workspace}}/build/p/
key: conan-${{ runner.os }}-arm64-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
key: conan-${{ runner.os }}-arm64-${{ hashFiles('conanfile.py', '*/conanfile.py', 'conan/corrade/**') }}
restore-keys: conan-${{ runner.os }}-arm64-

- name: Build pktvisord + push symbol to backtrace.io
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ jobs:
uses: actions/cache@v5
with:
path: ${{github.workspace}}/build/p/
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.py', '*/conanfile.py', 'conan/corrade/**') }}
restore-keys: conan-${{ runner.os }}-

- name: Export local Corrade recipe
run: conan export ${{github.workspace}}/conan/corrade/ --name=corrade --version=cci.20260327

- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
Expand Down Expand Up @@ -178,9 +181,13 @@ jobs:
uses: actions/cache@v5
with:
path: ${{github.workspace}}/build/p/
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.py', '*/conanfile.py', 'conan/corrade/**') }}
restore-keys: conan-${{ runner.os }}-

- name: Export local Corrade recipe
shell: bash
run: conan export $GITHUB_WORKSPACE/conan/corrade/ --name=corrade --version=cci.20260327

- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}\build
Expand Down Expand Up @@ -288,7 +295,7 @@ jobs:
uses: actions/cache@v5
with:
path: ${{github.workspace}}/build/p/
key: conan-${{ runner.os }}-arm64-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
key: conan-${{ runner.os }}-arm64-${{ hashFiles('conanfile.py', '*/conanfile.py', 'conan/corrade/**') }}
restore-keys: conan-${{ runner.os }}-arm64-

- name: Build pktvisord + push symbol to backtrace.io
Expand Down Expand Up @@ -407,7 +414,7 @@ jobs:
uses: actions/cache@v5
with:
path: ${{github.workspace}}/build/p/
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.py', '*/conanfile.py', 'conan/corrade/**') }}
restore-keys: conan-${{ runner.os }}-

- name: Build pktvisord + push symbol to backtrace.io
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build_cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,12 @@ jobs:
uses: actions/cache@v5
with:
path: ${{github.workspace}}/src/build/p/
key: conan-${{ runner.os }}-${{matrix.arch}}-${{ hashFiles('**/conanfile.py') }}
key: conan-${{ runner.os }}-${{matrix.arch}}-${{ hashFiles('**/conanfile.py', 'src/conan/corrade/**') }}
restore-keys: conan-${{ runner.os }}-${{matrix.arch}}-

- name: Export local Corrade recipe
run: conan export ${{github.workspace}}/src/conan/corrade/ --name=corrade --version=cci.20260327

- name: Install dependencies
working-directory: ${{github.workspace}}/src
run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ jobs:
uses: actions/cache@v5
with:
path: ${{github.workspace}}/build/p/
key: conan-${{ runner.os }}-amd64-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
key: conan-${{ runner.os }}-amd64-${{ hashFiles('conanfile.py', '*/conanfile.py', 'conan/corrade/**') }}
restore-keys: conan-${{ runner.os }}-amd64-

- name: linux package install
run: |
sudo apt-get update
sudo apt-get install --yes --no-install-recommends jq lcov

- name: Export local Corrade recipe
run: conan export ${{github.workspace}}/conan/corrade/ --name=corrade --version=cci.20260327

- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
Expand Down Expand Up @@ -79,7 +82,7 @@ jobs:
uses: actions/cache@v5
with:
path: ${{github.workspace}}/build/p/
key: conan-${{ runner.os }}-amd64-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
key: conan-${{ runner.os }}-amd64-${{ hashFiles('conanfile.py', '*/conanfile.py', 'conan/corrade/**') }}
restore-keys: conan-${{ runner.os }}-amd64-

- name: Build pktvisord + push symbol to backtrace.io
Expand Down
5 changes: 3 additions & 2 deletions cmd/pktvisord/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wattributes"
#endif
#include <Corrade/Containers/StringStl.h>
#include <Corrade/Utility/ConfigurationGroup.h>
#ifdef __GNUC__
#pragma GCC diagnostic pop
Expand Down Expand Up @@ -652,13 +653,13 @@ int main(int argc, char *argv[])
for (auto &p : registry.input_plugin_registry()->pluginList()) {
auto meta = registry.input_plugin_registry()->metadata(p);
if (meta && meta->data().hasValue("type") && meta->data().value("type") == "input") {
logger->info("input: {}", p);
logger->info("input: {}", std::string(p));
}
}
for (auto &p : registry.handler_plugin_registry()->pluginList()) {
auto meta = registry.handler_plugin_registry()->metadata(p);
if (meta && meta->data().hasValue("type") && meta->data().value("type") == "handler") {
logger->info("handler: {}", p);
logger->info("handler: {}", std::string(p));
}
}
exit(EXIT_SUCCESS);
Expand Down
64 changes: 64 additions & 0 deletions conan/corrade/cmake/conan-corrade-vars.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Here we are reproducing the variables and call performed by the FindCorrade.cmake provided by the library

# Read flags from configuration
file(READ "${CMAKE_CURRENT_LIST_DIR}/../../include/Corrade/configure.h" _corradeConfigure)
string(REGEX REPLACE ";" "\\\\;" _corradeConfigure "${_corradeConfigure}")
string(REGEX REPLACE "\n" ";" _corradeConfigure "${_corradeConfigure}")
set(_corradeFlags
MSVC2015_COMPATIBILITY
MSVC2017_COMPATIBILITY
MSVC2019_COMPATIBILITY
BUILD_DEPRECATED
BUILD_STATIC
BUILD_STATIC_UNIQUE_GLOBALS
BUILD_MULTITHREADED
TARGET_UNIX
TARGET_APPLE
TARGET_IOS
TARGET_IOS_SIMULATOR
TARGET_WINDOWS
TARGET_WINDOWS_RT
TARGET_EMSCRIPTEN
TARGET_ANDROID
# TARGET_X86 etc and TARGET_LIBCXX are not exposed to CMake as the meaning
# is unclear on platforms with multi-arch binaries or when mixing different
# STL implementations. TARGET_GCC etc are figured out via UseCorrade.cmake,
# as the compiler can be different when compiling the lib & when using it.
PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT
TESTSUITE_TARGET_XCTEST
UTILITY_USE_ANSI_COLORS)
foreach(_corradeFlag ${_corradeFlags})
list(FIND _corradeConfigure "#define CORRADE_${_corradeFlag}" _corrade_${_corradeFlag})
if(NOT _corrade_${_corradeFlag} EQUAL -1)
set(CORRADE_${_corradeFlag} 1)
endif()
endforeach()


# Corrade::rc, a target with just an executable
if(NOT TARGET Corrade::rc)
if(CMAKE_CROSSCOMPILING)
find_program(CORRADE_RC_PROGRAM
NAMES corrade-rc
PATHS ENV PATH
NO_DEFAULT_PATH)
else()
Comment thread
leoparente marked this conversation as resolved.
find_program(CORRADE_RC_PROGRAM
NAMES corrade-rc
PATHS "${CMAKE_CURRENT_LIST_DIR}/../../bin/"
NO_DEFAULT_PATH)
endif()

if(CORRADE_RC_PROGRAM STREQUAL "CORRADE_RC_PROGRAM-NOTFOUND")
message(FATAL_ERROR "Corrade: corrade-rc not found. Pass -DCORRADE_RC_PROGRAM=/path/to/corrade-rc.")
endif()

get_filename_component(CORRADE_RC_PROGRAM "${CORRADE_RC_PROGRAM}" ABSOLUTE)

add_executable(Corrade::rc IMPORTED)
set_property(TARGET Corrade::rc PROPERTY IMPORTED_LOCATION ${CORRADE_RC_PROGRAM})
endif()

# Include and declare other build modules
include("${CMAKE_CURRENT_LIST_DIR}/UseCorrade.cmake")
set(CORRADE_LIB_SUFFIX_MODULE "${CMAKE_CURRENT_LIST_DIR}/CorradeLibSuffix.cmake")
4 changes: 4 additions & 0 deletions conan/corrade/conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sources:
"cci.20260327":
sha256: d8f30e9a857172003b6b02304783f40e8038c36e4127a0cfec7fe14f41c13fd4
url: https://github.com/mosra/corrade/archive/22e7ffc6fcdeaa0df96e0d8b3d482ad6abe7dc36.tar.gz
Loading
Loading