From b06ebade1269e0ec49e362bbe07102dbc8862160 Mon Sep 17 00:00:00 2001 From: pascal Date: Sun, 29 Sep 2024 20:01:52 +0200 Subject: [PATCH] debug --- .github/workflows/cmake-multi-platform.yml | 86 +++++++++++++++------- src/CMakeLists.txt | 2 +- 2 files changed, 61 insertions(+), 27 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 501b085..dac3cca 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -19,33 +19,17 @@ jobs: # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. fail-fast: false - # Set up a matrix to run the following 3 configurations: - # 1. - # 2. - # 3. - # - # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. matrix: os: [ubuntu-latest, windows-latest] + compiler: [gcc, clang, msvc] build_type: [Release] - c_compiler: [gcc, clang, cl] - include: - - os: windows-latest - c_compiler: cl - cpp_compiler: cl - - os: ubuntu-latest - c_compiler: gcc - cpp_compiler: g++ - - os: ubuntu-latest - c_compiler: clang - cpp_compiler: clang++ exclude: - os: windows-latest - c_compiler: gcc + compiler: gcc - os: windows-latest - c_compiler: clang + compiler: clang - os: ubuntu-latest - c_compiler: cl + compiler: msvc steps: - uses: actions/checkout@v4 @@ -56,14 +40,14 @@ jobs: shell: bash run: | echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - + - name: Install Conan id: conan uses: turtlebrowser/get-conan@main - name: Conan version run: echo "${{ steps.conan.outputs.version }}" - + - name: Cache Conan Dependencies id: cache-conan uses: actions/cache@v4 @@ -71,10 +55,60 @@ jobs: path: ${{ env.CONAN_HOME }} key: conan-cache-${{ runner.os }}-${{ hashFiles('conanfile.py') }} restore-keys: conan-cache-${{ runner.os }}- - - - if: ${{steps.cache-conan.outputs.cache-hit != 'true'}} - name: Create default Conan profile - run: conan profile detect + + - uses: DamianReeves/write-file-action@master + if: ${{ matrix.compiler == 'clang' }} + with: + path: ${{ env.CONAN_HOME }}/profiles/default + contents: | + [settings] + arch=x86_64 + build_type=Release + compiler=clang + compiler.cppstd=gnu20 + compiler.libcxx=libc++ + compiler.version=14 + os=Linux + [conf] + tools.system.package_manager:mode=install + tools.system.package_manager:sudo=True + write-mode: overwrite + + - uses: DamianReeves/write-file-action@master + if: ${{ matrix.compiler == 'gcc' }} + with: + path: ${{ env.CONAN_HOME }}/profiles/default + contents: | + [settings] + arch=x86_64 + build_type=Release + compiler=gcc + compiler.cppstd=gnu20 + compiler.libcxx=libstdc++11 + compiler.version=11 + os=Linux + [conf] + tools.system.package_manager:mode=install + tools.system.package_manager:sudo=True + write-mode: overwrite + + - uses: DamianReeves/write-file-action@master + if: ${{ matrix.compiler == 'msvc' }} + with: + path: ${{ env.CONAN_HOME }}/profiles/default + contents: | + [settings] + arch=x86_64 + build_type=Release + compiler=msvc + compiler.cppstd=20 + compiler.runtime=dynamic + compiler.version=194 + os=Windows + write-mode: overwrite + + - name: PrintProfile + run: cat ${{ env.CONAN_HOME }}/profiles/default - name: Build run: conan create . --build=missing diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3d2e1bb..3952c01 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -45,7 +45,7 @@ qt_add_executable(tire main.cpp timeedit.h ) -target_link_libraries(tire PUBLIC Qt6::Core Qt6::Widgets spdlog::spdlog fmt::fmt) +target_link_libraries(tire PUBLIC Qt6::Core Qt6::Widgets spdlog::spdlog fmt::fmt nlohmann_json::nlohmann_json) target_compile_features(tire PUBLIC cxx_std_20) target_include_directories(tire PUBLIC ${CMAKE_SOURCE_DIR}/src)