Skip to content

Commit 6cf0a97

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Github Actions] C/C++ for windows.
1 parent a9e8ae6 commit 6cf0a97

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/c-windows.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,19 @@ jobs:
5959
vcpkg --x-wait-for-lock integrate install
6060
vcpkg --x-wait-for-lock install
6161
62+
- name: Pre Build
63+
run: >
64+
cmake.exe
65+
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
66+
-DCMAKE_BUILD_TYPE=Debug
67+
-DCMAKE_C_COMPILER=cl
68+
-DCMAKE_CXX_COMPILER=cl
69+
-S${{ github.workspace }} -B${{ github.workspace }}/build/default -G "Unix Makefiles"
70+
6271
- name: Build
6372
run: |
64-
cmake --preset windows -B build
65-
cmake --build build --verbose
73+
cmake --build build/default
6674
6775
- name: Test
6876
run: |
69-
make test
77+
ctest --test-dir C:/Users/gonza/devel/gon/algorithm-exercises-c/build/default

CMakePresets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"CMAKE_C_COMPILER": "cl",
2020
"CMAKE_CXX_COMPILER": "cl"
2121
},
22-
"generator": "Ninja",
22+
"generator": "MinGW Makefiles",
2323
"binaryDir": "${sourceDir}/build/default"
2424
}
2525
]

0 commit comments

Comments
 (0)