Skip to content

Commit a2c9878

Browse files
authored
fix failing artifact upload + build in release mode + run CI on PR (#7)
1 parent bf53b99 commit a2c9878

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

.github/workflows/build-ubuntu.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build (Ubuntu)
22
on:
33
push:
4+
pull_request:
45
jobs:
56
build-project:
67
name: Build Project
@@ -11,9 +12,14 @@ jobs:
1112

1213
- name: Build Project
1314
uses: threeal/[email protected]
15+
with:
16+
options: |
17+
CMAKE_BUILD_TYPE=Release
18+
build-args: |
19+
--config Release
1420
1521
- name: Deploy Project
1622
uses: actions/upload-artifact@v4
1723
with:
18-
name: run-cppcheck
24+
name: run-cppcheck-linux-x86_64
1925
path: build/run-cppcheck

.github/workflows/build-windows.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build (Windows)
22
on:
33
push:
4+
pull_request:
45
jobs:
56
build-project:
67
name: Build Project
@@ -11,9 +12,14 @@ jobs:
1112

1213
- name: Build Project
1314
uses: threeal/[email protected]
15+
with:
16+
options: |
17+
CMAKE_BUILD_TYPE=Release
18+
build-args: |
19+
--config Release
1420
1521
- name: Deploy Project
1622
uses: actions/upload-artifact@v4
1723
with:
1824
name: run-cppcheck-windows
19-
path: build/run-cppcheck.exe
25+
path: build\Release\run-cppcheck.exe

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
cmake_minimum_required(VERSION 3.2)
1+
cmake_minimum_required(VERSION 3.15)
22

33
project(run-cppcheck)
44

55
set(CMAKE_CXX_STANDARD 17)
66

7+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
8+
79
if (UNIX)
810
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static -static-libgcc -static-libstdc++")
9-
endif (UNIX)
11+
endif ()
1012

1113
set(SOURCE_FILES main.cpp config.cpp)
1214

0 commit comments

Comments
 (0)