diff --git a/.github/workflows/cmake_with_conan_workflow.yml b/.github/workflows/cmake_with_conan_workflow.yml index df2f1f0..3d10f4c 100644 --- a/.github/workflows/cmake_with_conan_workflow.yml +++ b/.github/workflows/cmake_with_conan_workflow.yml @@ -24,13 +24,13 @@ jobs: fetch-depth: 0 - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.13 + uses: gittools/actions/gitversion/setup@v0.9.15 with: versionSpec: '5.x' - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.13 + uses: gittools/actions/gitversion/execute@v0.9.15 with: useConfigFile: true diff --git a/.github/workflows/leaf_runtime_workflow.yml b/.github/workflows/leaf_runtime_workflow.yml index 69de6af..60ef22c 100644 --- a/.github/workflows/leaf_runtime_workflow.yml +++ b/.github/workflows/leaf_runtime_workflow.yml @@ -5,14 +5,18 @@ on: branches: [ main ] paths: - "docker/runtime/**" + - "docker/cmake_with_conan/**" - "app/**" - - "*.txt" + - "CMakeLists.txt" + - "conanfile.txt" pull_request: branches: [ main ] paths: - "docker/runtime/**" + - "docker/cmake_with_conan/**" - "app/**" - - "*.txt" + - "CMakeLists.txt" + - "conanfile.txt" workflow_dispatch: jobs: @@ -28,13 +32,13 @@ jobs: fetch-depth: 0 - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.13 + uses: gittools/actions/gitversion/setup@v0.9.15 with: versionSpec: '5.x' - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.13 + uses: gittools/actions/gitversion/execute@v0.9.15 with: useConfigFile: true diff --git a/.github/workflows/leaf_sonar_scan_workflow.yml b/.github/workflows/leaf_sonar_scan_workflow.yml index 9a84b41..51ca2a5 100644 --- a/.github/workflows/leaf_sonar_scan_workflow.yml +++ b/.github/workflows/leaf_sonar_scan_workflow.yml @@ -6,11 +6,15 @@ on: paths: - "app/**" - ".github/workflows/leaf_sonar_scan_workflow.yml" + - "CMakeLists.txt" + - "conanfile.txt" pull_request: branches: [ main ] paths: - "app/**" - ".github/workflows/leaf_sonar_scan_workflow.yml" + - "CMakeLists.txt" + - "conanfile.txt" workflow_dispatch: jobs: @@ -39,7 +43,7 @@ jobs: apt-get install -y dotnet-sdk-6.0 - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.13 + uses: gittools/actions/gitversion/setup@v0.9.15 with: versionSpec: '5.x' @@ -71,7 +75,7 @@ jobs: - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.13 + uses: gittools/actions/gitversion/execute@v0.9.15 with: useConfigFile: true diff --git a/.github/workflows/sonar_cloud_scanner_workflow.yml b/.github/workflows/sonar_cloud_scanner_workflow.yml index c6bb473..fc47606 100644 --- a/.github/workflows/sonar_cloud_scanner_workflow.yml +++ b/.github/workflows/sonar_cloud_scanner_workflow.yml @@ -5,10 +5,12 @@ on: branches: [ main ] paths: - "docker/sonar_cloud_scanner/**" + - "docker/cmake_with_conan/**" pull_request: branches: [ main ] paths: - "docker/sonar_cloud_scanner/**" + - "docker/cmake_with_conan/**" workflow_dispatch: jobs: @@ -24,13 +26,13 @@ jobs: fetch-depth: 0 - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.13 + uses: gittools/actions/gitversion/setup@v0.9.15 with: versionSpec: '5.x' - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.13 + uses: gittools/actions/gitversion/execute@v0.9.15 with: useConfigFile: true diff --git a/CMakeLists.txt b/CMakeLists.txt index 5791e8a..9d4db3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,22 @@ cmake_minimum_required(VERSION 3.17) -project(Leaf LANGUAGES CXX VERSION "0.0.1") + +if (DEFINED ENV{semVer}) + set(GIT_VERSION ENV{semVer}) +else() + string(TIMESTAMP GIT_VERSION "%Y.%m.%d") +endif() + +message(STATUS "Found version ${GIT_VERSION}") + +project(Leaf LANGUAGES CXX VERSION ${GIT_VERSION}) set(CMAKE_CXX_STANDARD 20) add_definitions(-DUSE32bit=false) add_definitions(-DCMAKE_GENERATOR_PLATFORM=x64) +## Set variables for libraries +# as for now std::format is not available +# add_definitions(-DSPDLOG_USE_STD_FORMAT=ON) if (NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt) if (NOT CMAKE_BUILD_TYPE) @@ -70,9 +82,7 @@ if (NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake") endif () -## Set variables for libraries -# as for now std::format is not available -# add_definitions(-DSPDLOG_USE_STD_FORMAT) + include(${CMAKE_BINARY_DIR}/conan.cmake) conan_cmake_run( diff --git a/conanfile.txt b/conanfile.txt index 716a21e..218ad8e 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -1,7 +1,7 @@ [requires] -boost/1.80.0 -gtest/1.12.1 -spdlog/1.10.0 +boost/1.81.0 +gtest/1.13.0 +spdlog/1.11.0 [options] gtest:build_gmock=True diff --git a/docker/cmake_with_conan/Dockerfile b/docker/cmake_with_conan/Dockerfile index 6eb849b..3949ea5 100644 --- a/docker/cmake_with_conan/Dockerfile +++ b/docker/cmake_with_conan/Dockerfile @@ -1,6 +1,6 @@ FROM gcc:12 -ARG CONAN_VERSION=1.53.0 +ARG CONAN_VERSION=1.57.0 LABEL org.opencontainers.image.source="https://github.com/loic-lopez/leaf" LABEL org.opencontainers.image.authors="Loïc LOPEZ" diff --git a/docker/sonar_cloud_scanner/Dockerfile b/docker/sonar_cloud_scanner/Dockerfile index 8b2ffc7..4fa2257 100644 --- a/docker/sonar_cloud_scanner/Dockerfile +++ b/docker/sonar_cloud_scanner/Dockerfile @@ -1,6 +1,6 @@ FROM debian:stable-slim as sonar_cloud_scanner_builder -ARG SONAR_SCANNER_VERSION=4.7.0.2747 +ARG SONAR_SCANNER_VERSION=4.8.0.2856 RUN mkdir /tools/