Skip to content

Commit a448a8e

Browse files
committed
CI 增加 Windows 环境 MSVC 编译器的测试
1 parent f758dc9 commit a448a8e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/build_and_test.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
run: sudo apt upgrade && sudo apt install build-essential cmake xmake && xmake update
1717

1818
- name: CMake config
19-
run: mkdir build && cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DEMDEVIF_TEST_FRAMEWORK_ENABLE_TEST=ON -DEMDEVIF_TEST_FRAMEWORK_TEST_NAME="integration_test" --debug-output
19+
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DEMDEVIF_TEST_FRAMEWORK_ENABLE_TEST=ON -DEMDEVIF_TEST_FRAMEWORK_TEST_NAME="integration_test" --debug-output
2020
- name: CMake build
2121
run: cmake --build build --verbose
2222
- name: ctest
@@ -31,3 +31,18 @@ jobs:
3131
run: xmake --build --verbose emdevif_test_framework_test
3232
- name: XMake run test
3333
run: xmake run emdevif_test_framework_test
34+
35+
on-windows:
36+
runs-on: windows-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Add MSVC to PATH
41+
uses: ilammy/msvc-dev-cmd@v1
42+
43+
- name: CMake config
44+
run: cmake -G "Visual Studio 17 2022" -A x64 -S . -B build -DCMAKE_BUILD_TYPE=Release -DEMDEVIF_TEST_FRAMEWORK_ENABLE_TEST=ON -DEMDEVIF_TEST_FRAMEWORK_TEST_NAME="integration_test" --debug-output
45+
- name: CMake build
46+
run: cmake --build build --verbose --config Release
47+
- name: ctest
48+
run: cd build && ctest . --verbose

0 commit comments

Comments
 (0)