From 47a60af09c55bdec114283faa8dfd800f02e317d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludvig=20Gunne=20Lindstr=C3=B6m?= Date: Wed, 26 Feb 2025 09:57:59 +0100 Subject: [PATCH 1/2] fix failing artifact upload + build in release mode + run CI on PR --- .github/workflows/build-ubuntu.yml | 8 +++++++- .github/workflows/build-windows.yml | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml index 94f51a1..dc127e0 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -1,6 +1,7 @@ name: Build (Ubuntu) on: push: + pull_request: jobs: build-project: name: Build Project @@ -11,9 +12,14 @@ jobs: - name: Build Project uses: threeal/cmake-action@v2.1.0 + with: + options: | + CMAKE_BUILD_TYPE=Release + build-args: | + --config Release - name: Deploy Project uses: actions/upload-artifact@v4 with: - name: run-cppcheck + name: run-cppcheck-linux-x86_64 path: build/run-cppcheck diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 0eac242..3467b1e 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -1,6 +1,7 @@ name: Build (Windows) on: push: + pull_request: jobs: build-project: name: Build Project @@ -11,9 +12,14 @@ jobs: - name: Build Project uses: threeal/cmake-action@v2.1.0 + with: + options: | + CMAKE_BUILD_TYPE=Release + build-args: | + --config Release - name: Deploy Project uses: actions/upload-artifact@v4 with: name: run-cppcheck-windows - path: build/run-cppcheck.exe + path: build\Release\run-cppcheck.exe From f7c6f048da94b15b0f92bd18995cc26726ac6e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludvig=20Gunne=20Lindstr=C3=B6m?= Date: Wed, 26 Feb 2025 14:01:06 +0100 Subject: [PATCH 2/2] static msvc runtime --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 27bd739..5438ba5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,14 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.15) project(run-cppcheck) set(CMAKE_CXX_STANDARD 17) +set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded") + if (UNIX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static -static-libgcc -static-libstdc++") -endif (UNIX) +endif () set(SOURCE_FILES main.cpp config.cpp)