Skip to content

Commit 9afe750

Browse files
authored
Update test.yaml
Support CMake build on Windows
1 parent 412ba04 commit 9afe750

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/test.yaml

+12-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,18 @@ jobs:
3535
uses: actions/checkout@v4
3636
- name: setup msbuild on windows
3737
uses: microsoft/setup-msbuild@v2
38-
- name: make-windows
38+
- name: build and run tests
3939
run: |
4040
cd test
4141
msbuild.exe test.sln /verbosity:minimal /t:Build "/p:Configuration=Release;Platform=x64"
42-
x64\Release\test.exe
43-
42+
x64\Release\test.exe
43+
- name: Install libraries
44+
run: |
45+
vcpkg install gtest curl zlib brotli
46+
choco openssl
47+
- name: Configure CMake for Release
48+
run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DHTTPLIB_TEST=ON -DHTTPLIB_REQUIRE_OPENSSL -DHTTPLIB_REQUIRE_ZLIB=ON -DHTTPLIB_REQUIRE_BROTLI=ON
49+
- name: Build with CMake
50+
run: cmake --build build --config Release
51+
- name: Run tests with CTest
52+
run: ctest --output-on-failure --test-dir build -C Release

0 commit comments

Comments
 (0)