From 9afe7507c740c94349af3db681d3681305444df4 Mon Sep 17 00:00:00 2001 From: yhirose Date: Fri, 15 Nov 2024 23:59:01 -0500 Subject: [PATCH] Update test.yaml Support CMake build on Windows --- .github/workflows/test.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index cf2104f..5a84b28 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -35,9 +35,18 @@ jobs: uses: actions/checkout@v4 - name: setup msbuild on windows uses: microsoft/setup-msbuild@v2 - - name: make-windows + - name: build and run tests run: | cd test msbuild.exe test.sln /verbosity:minimal /t:Build "/p:Configuration=Release;Platform=x64" - x64\Release\test.exe - + x64\Release\test.exe + - name: Install libraries + run: | + vcpkg install gtest curl zlib brotli + choco openssl + - name: Configure CMake for Release + 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 + - name: Build with CMake + run: cmake --build build --config Release + - name: Run tests with CTest + run: ctest --output-on-failure --test-dir build -C Release