Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
pasbi committed Sep 29, 2024
1 parent 9bbd024 commit b06ebad
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 27 deletions.
86 changes: 60 additions & 26 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
#
# 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
Expand All @@ -56,25 +40,75 @@ 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
with:
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
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit b06ebad

Please sign in to comment.