2020 type : boolean
2121 default : true
2222
23+ concurrency :
24+ group : ${{ github.workflow }}-${{ github.ref || github.run_id }}
25+ cancel-in-progress : true
26+
2327env :
2428 GTEST_FILTER : ${{ github.event.inputs.gtest_filter || '*' }}
2529
7579 (github.event_name == 'pull_request' &&
7680 github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) ||
7781 (github.event_name == 'workflow_dispatch' && github.event.inputs.test_windows == 'true')
82+ strategy :
83+ matrix :
84+ config :
85+ - with_ssl : false
86+ name : without SSL
87+ - with_ssl : true
88+ name : with SSL
89+ name : windows ${{ matrix.config.name }}
7890 steps :
7991 - name : Prepare Git for Checkout on Windows
8092 run : |
@@ -90,24 +102,25 @@ jobs:
90102 core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
91103 - name : Setup msbuild on windows
92104 uses : microsoft/setup-msbuild@v2
93- - name : Install libraries
94- run : |
95- vcpkg install gtest curl zlib brotli
96- choco install openssl
97-
98- - name : Configure CMake with SSL
99- run : cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DHTTPLIB_TEST=ON -DHTTPLIB_REQUIRE_OPENSSL=ON -DHTTPLIB_REQUIRE_ZLIB=ON -DHTTPLIB_REQUIRE_BROTLI=ON
100- - name : Build with with SSL
101- run : cmake --build build --config Release
102- - name : Run tests with SSL
105+ - name : Install vcpkg dependencies
106+ run : vcpkg install gtest curl zlib brotli
107+ - name : Install OpenSSL
108+ if : ${{ matrix.config.with_ssl }}
109+ run : choco install openssl
110+ - name : Configure CMake ${{ matrix.config.name }}
111+ run : >
112+ cmake -B build -S .
113+ -DCMAKE_BUILD_TYPE=Release
114+ -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake
115+ -DHTTPLIB_TEST=ON
116+ -DHTTPLIB_REQUIRE_ZLIB=ON
117+ -DHTTPLIB_REQUIRE_BROTLI=ON
118+ -DHTTPLIB_REQUIRE_OPENSSL=${{ matrix.config.with_ssl && 'ON' || 'OFF' }}
119+ - name : Build ${{ matrix.config.name }}
120+ run : cmake --build build --config Release -- /v:m /clp:ShowCommandLine
121+ - name : Run tests ${{ matrix.config.name }}
103122 run : ctest --output-on-failure --test-dir build -C Release
104123
105- - name : Configure CMake without SSL
106- run : cmake -B build-no-ssl -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DHTTPLIB_TEST=ON -DHTTPLIB_REQUIRE_OPENSSL=OFF -DHTTPLIB_REQUIRE_ZLIB=ON -DHTTPLIB_REQUIRE_BROTLI=ON
107- - name : Build without SSL
108- run : cmake --build build-no-ssl --config Release
109- - name : Run tests without SSL
110- run : ctest --output-on-failure --test-dir build-no-ssl -C Release
111124 env :
112125 VCPKG_ROOT : " C:/vcpkg"
113126 VCPKG_BINARY_SOURCES : " clear;x-gha,readwrite"
0 commit comments