File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,12 +14,13 @@ jobs:
1414 steps :
1515 - uses : actions/checkout@v4
1616 - run : |
17- g++ -Wall -Wextra -o test source.cpp > compilation.log 2>&1
17+ cmake -S . -B build
18+ cmake --build build > compilation.log 2>&1
1819 - uses : actions/upload-artifact@v4
1920 with :
2021 name : compilation_log
2122 path : compilation.log
22- - run : ./test
23+ - run : ./build/hello_world
2324
2425 run-notifier :
2526 needs :
Original file line number Diff line number Diff line change 11node_modules
22
33dist /*
4+
5+ build /*
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.28 )
2+
3+ project (HelloWorld)
4+
5+ set (WARNING_OPTIONS
6+ $<$<CXX_COMPILER_ID :MSVC >:/W4
7+ /WX >
8+ $<$<CXX_COMPILER_ID :GNU ,Clang ,AppleClang >:-Wall
9+ -Wextra
10+ -pedantic >
11+ )
12+
13+ add_executable (hello_world source .cpp )
14+ target_compile_options (hello_world PRIVATE ${WARNING_OPTIONS} )
You can’t perform that action at this time.
0 commit comments