diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d731f295..65ed2b3d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,18 +32,18 @@ jobs: - uses: ./.github/actions/enable_python - uses: ./.github/actions/conan_build with: - profile: ${{ vars.LINUX_X64_PROFILE }} + profile: linux-gcc12_x64 - uses: ./.github/actions/tests with: testdir: build/Release - name: ${{ vars.LINUX_X64_PROFILE }} tests + name: linux-gcc12_x64 tests - uses: ./.github/actions/deploy if: inputs.deploy with: builddir: build/Release - artifact: ${{ vars.LINUX_X64_PROFILE }} + artifact: linux-gcc12_x64 attestation: ${{inputs.attestation}} macos-arm-build: @@ -62,18 +62,18 @@ jobs: - uses: ./.github/actions/enable_python_macos - uses: ./.github/actions/conan_build with: - profile: ${{vars.MACOS_ARM_PROFILE}} + profile: macos-clang15_arm - uses: ./.github/actions/tests with: testdir: build/Release - name: ${{vars.MACOS_ARM_PROFILE}} tests + name: macos-clang15_arm tests - uses: ./.github/actions/deploy if: inputs.deploy with: builddir: build/Release - artifact: ${{vars.MACOS_ARM_PROFILE}} + artifact: macos-clang15_arm attestation: ${{inputs.attestation}} macos-x64-build: @@ -92,17 +92,18 @@ jobs: - uses: ./.github/actions/enable_python_macos - uses: ./.github/actions/conan_build with: - profile: ${{vars.MACOS_X64_PROFILE}} + profile: macos-clang15_x64 - uses: ./.github/actions/tests with: testdir: build/Release - name: ${{vars.MACOS_X64_PROFILE}} tests + name: macos-clang15_x64 tests - uses: ./.github/actions/deploy + if: inputs.deploy with: builddir: build/Release - artifact: ${{vars.MACOS_X64_PROFILE}} + artifact: macos-clang15_x64 attestation: ${{inputs.attestation}} win-x64-build: @@ -121,16 +122,16 @@ jobs: - uses: ./.github/actions/enable_python - uses: ./.github/actions/conan_build with: - profile: ${{vars.WIN_X64_PROFILE}} + profile: win-msvc194_x64 - uses: ./.github/actions/tests with: testdir: build - name: ${{vars.WIN_X64_PROFILE}} tests + name: win-msvc194_x64 tests - uses: ./.github/actions/deploy if: inputs.deploy with: builddir: build - artifact: ${{vars.WIN_X64_PROFILE}} + artifact: win-msvc194_x64 attestation: ${{inputs.attestation}} diff --git a/.github/workflows/check_cache.yaml b/.github/workflows/check_cache.yaml index 5a3c145a..f0acbe6f 100644 --- a/.github/workflows/check_cache.yaml +++ b/.github/workflows/check_cache.yaml @@ -21,7 +21,7 @@ jobs: - uses: ./.github/actions/check_cache id: check-cache with: - profile: ${{ vars.LINUX_X64_PROFILE }} + profile: linux-gcc12_x64 macos-arm-check-cache: runs-on: macos-14 @@ -32,7 +32,7 @@ jobs: - uses: ./.github/actions/check_cache id: check-cache with: - profile: ${{ vars.MACOS_ARM_PROFILE }} + profile: macos-clang15_arm macos-x64-check-cache: runs-on: macos-13 @@ -43,7 +43,7 @@ jobs: - uses: ./.github/actions/check_cache id: check-cache with: - profile: ${{ vars.MACOS_X64_PROFILE }} + profile: macos-clang15_x64 win-x64-check-cache: runs-on: windows-2022 @@ -54,4 +54,4 @@ jobs: - uses: ./.github/actions/check_cache id: check-cache with: - profile: ${{ vars.WIN_X64_PROFILE }} + profile: win-msvc194_x64 diff --git a/.github/workflows/make_cache.yaml b/.github/workflows/make_cache.yaml index f9f9697c..831d3241 100644 --- a/.github/workflows/make_cache.yaml +++ b/.github/workflows/make_cache.yaml @@ -16,7 +16,7 @@ jobs: - uses: ./.github/actions/enable_python - uses: ./.github/actions/enable_conan with: - profile: ${{vars.LINUX_X64_PROFILE}} + profile: linux-gcc12_x64 macos-arm-make-cache: runs-on: macos-14 @@ -27,7 +27,7 @@ jobs: - uses: ./.github/actions/enable_python_macos - uses: ./.github/actions/enable_conan with: - profile: ${{vars.MACOS_ARM_PROFILE}} + profile: macos-clang15_arm macos-x64-make-cache: runs-on: macos-13 @@ -38,7 +38,7 @@ jobs: - uses: ./.github/actions/enable_python_macos - uses: ./.github/actions/enable_conan with: - profile: ${{vars.MACOS_X64_PROFILE}} + profile: macos-clang15_x64 win-x64-make-cache: runs-on: windows-2022 @@ -49,4 +49,4 @@ jobs: - uses: ./.github/actions/enable_python - uses: ./.github/actions/enable_conan with: - profile: ${{vars.WIN_X64_PROFILE}} + profile: win-msvc194_x64 diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index c7ccf1fc..d3f657cd 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -6,6 +6,6 @@ jobs: uses: ./.github/workflows/build.yaml with: deploy: true - attestation: true + attestation: false secrets: inherit \ No newline at end of file diff --git a/.github/workflows/sign_build.yaml b/.github/workflows/sign_build.yaml index a816c611..7ea664bb 100644 --- a/.github/workflows/sign_build.yaml +++ b/.github/workflows/sign_build.yaml @@ -32,18 +32,18 @@ jobs: - uses: ./.github/actions/enable_python - uses: ./.github/actions/conan_build with: - profile: ${{vars.WIN_X64_APPONLY_PROFILE}} + profile: win-msvc194_x64_static args: -o daggy/*:apponly=True - uses: ./.github/actions/tests with: testdir: build - name: ${{vars.WIN_X64_APPONLY_PROFILE}} tests + name: win-msvc194_x64_static tests - uses: ./.github/actions/deploy_with_sign with: builddir: build - artifact: ${{vars.WIN_X64_APPONLY_PROFILE}} + artifact: win-msvc194_x64_static sign: ${{inputs.sign}} signeddir: build/signed token: ${{secrets.SIGNPATH_API_TOKEN}} \ No newline at end of file diff --git a/conanfile.py b/conanfile.py index 18b3e365..4575c534 100644 --- a/conanfile.py +++ b/conanfile.py @@ -110,7 +110,6 @@ def generate(self): copy(self, "*.dylib", dep.cpp_info.libdirs[0], libdir) tc = CMakeToolchain(self) - tc.cache_variables["CMAKE_INSTALL_LIBDIR"] = self.cpp.libdirs[0] tc.cache_variables["SSH2_SUPPORT"] = True tc.cache_variables["YAML_SUPPORT"] = True tc.cache_variables["CONSOLE"] = True @@ -134,7 +133,3 @@ def package(self): cmake = CMake(self) cmake.configure() cmake.install() - - def package_info(self): - self.cpp_info.libs = ["DaggyCore"] - self.cpp_info.libdirs = [self._libdir()] diff --git a/docs/README.md b/docs/README.md index f9c15683..663384a6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -5,8 +5,9 @@ description: Common information about Daggy and Getting Started # About Daggy -![Daggy Workflow](https://github.com/synacker/daggy/actions/workflows/push.yaml/badge.svg) +[![Develop build](https://github.com/synacker/daggy/actions/workflows/push.yaml/badge.svg)](https://github.com/synacker/daggy/actions/workflows/push.yaml) [![GitBook](https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=3F89A1)](https://daggy.gitbook.io/docs) +[![Conan Center](https://img.shields.io/conan/v/daggy)](https://conan.io/center/recipes/daggy) ![Daggy](daggy_logo.svg) diff --git a/src/Daggy/CMakeLists.txt b/src/Daggy/CMakeLists.txt index cf3cee37..efa9d086 100644 --- a/src/Daggy/CMakeLists.txt +++ b/src/Daggy/CMakeLists.txt @@ -2,7 +2,7 @@ set(TARGET daggy) option(PCAPNG_SUPPORT "pcap to pcapng convertor" OFF) -find_package(Qt6 COMPONENTS Core REQUIRED) +find_package(Qt6 COMPONENTS Core Network CONFIG REQUIRED) add_executable(${TARGET}) include(rpath_bin) @@ -15,7 +15,7 @@ target_sources(${TARGET} CConsoleDaggy.cpp ) -target_link_libraries(${TARGET} PRIVATE DaggyCore) +target_link_libraries(${TARGET} PRIVATE DaggyCore Qt6::Core Qt6::Network) if (PCAPNG_SUPPORT) add_compile_definitions(PCAPNG_SUPPORT) diff --git a/src/DaggyCore/CMakeLists.txt b/src/DaggyCore/CMakeLists.txt index c0aeb664..72eb3d2b 100644 --- a/src/DaggyCore/CMakeLists.txt +++ b/src/DaggyCore/CMakeLists.txt @@ -50,7 +50,6 @@ target_sources(${TARGET} target_link_libraries(${TARGET} PUBLIC Qt6::Core Qt6::Network) - if (SSH2_SUPPORT) if(CONAN_BUILD) find_package(Libssh2 REQUIRED) @@ -82,10 +81,9 @@ endif() if(YAML_SUPPORT) find_package(yaml-cpp REQUIRED) - target_link_libraries(${TARGET} PUBLIC yaml-cpp) + target_link_libraries(${TARGET} PUBLIC yaml-cpp::yaml-cpp) endif() - string(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER) configure_file(version.h.in ${CMAKE_CURRENT_LIST_DIR}/version.h @ONLY) @@ -108,7 +106,7 @@ if (BUILD_TESTING) endif() if (NOT APPONLY_BUILD) - if(UNIX) + if (NOT PORTABLE_BUILD) install(TARGETS ${TARGET} EXPORT ${TARGET}Targets PUBLIC_HEADER FILE_SET HEADERS @@ -124,14 +122,10 @@ if (NOT APPONLY_BUILD) INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${TARGET}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}Config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${TARGET}) - else() install(TARGETS ${TARGET} PUBLIC_HEADER FILE_SET HEADERS - ARCHIVE - RUNTIME) + LIBRARY) endif() include(package_deps) endif() - - diff --git a/src/DaggyCore/Config.cmake.in b/src/DaggyCore/Config.cmake.in index 2eb4293c..9deec213 100644 --- a/src/DaggyCore/Config.cmake.in +++ b/src/DaggyCore/Config.cmake.in @@ -2,5 +2,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/@TARGET@Targets.cmake") -check_requred_compinents(@TARGET@) +check_required_components(@TARGET@) include(CMakeFindDependencyMacro) diff --git a/src/DaggyCore/Sources.cpp b/src/DaggyCore/Sources.cpp index b4f72dc2..1825ba00 100644 --- a/src/DaggyCore/Sources.cpp +++ b/src/DaggyCore/Sources.cpp @@ -408,7 +408,7 @@ catch (const std::exception& exception) { } #else -std::optional daggy::sources::convertors::yaml(const QString& data, QString& error) +std::optional daggy::sources::convertors::yaml(const QString& data, QString& error) noexcept { error = "yaml not supported"; return {}; diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt index 8e0329a7..80589f5f 100644 --- a/test_package/CMakeLists.txt +++ b/test_package/CMakeLists.txt @@ -1,9 +1,9 @@ +cmake_minimum_required(VERSION 3.31) project(DaggyPackageTest) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -find_package(daggy REQUIRED) +find_package(Qt6 COMPONENTS Core Network REQUIRED) +find_package(yaml-cpp REQUIRED) +find_package(DaggyCore REQUIRED) add_subdirectory(testcpp) add_subdirectory(testc) diff --git a/test_package/conanfile.py b/test_package/conanfile.py deleted file mode 100644 index f03da131..00000000 --- a/test_package/conanfile.py +++ /dev/null @@ -1,26 +0,0 @@ -import os - -from conans import ConanFile, CMake, tools - - -class DaggyTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_paths", "cmake_find_package" - - def build(self): - cmake = CMake(self) - # Current dir is "test_package/build/" and CMakeLists.txt is - # in "test_package" - cmake.configure() - cmake.build() - - def imports(self): - self.copy("*.dll", dst="bin", src="bin") - self.copy("*.dylib*", dst="bin", src="lib") - self.copy('*.so*', dst='bin', src='lib') - - def test(self): - if not tools.cross_building(self): - os.chdir("bin") - self.run(".%stestcpp" % os.sep) - self.run(".%stestc" % os.sep) \ No newline at end of file diff --git a/test_package/testc/CMakeLists.txt b/test_package/testc/CMakeLists.txt index 8bb66d21..3714985f 100644 --- a/test_package/testc/CMakeLists.txt +++ b/test_package/testc/CMakeLists.txt @@ -4,4 +4,4 @@ set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) add_executable(testc ../../src/DaggyCore/tests/interface/testc/test.c) -target_link_libraries(testc daggy::daggy) \ No newline at end of file +target_link_libraries(testc daggy::DaggyCore) diff --git a/test_package/testcpp/CMakeLists.txt b/test_package/testcpp/CMakeLists.txt index ecada37f..d1d4bdde 100644 --- a/test_package/testcpp/CMakeLists.txt +++ b/test_package/testcpp/CMakeLists.txt @@ -1,7 +1,7 @@ project(testcpp LANGUAGES CXX) -set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) add_executable(testcpp ../../src/DaggyCore/tests/interface/testcpp/test.cpp) -target_link_libraries(testcpp daggy::daggy) \ No newline at end of file +target_link_libraries(testcpp daggy::DaggyCore)