20
20
type : boolean
21
21
default : true
22
22
23
+ concurrency :
24
+ group : ${{ github.workflow }}-${{ github.ref || github.run_id }}
25
+ cancel-in-progress : true
26
+
23
27
env :
24
28
GTEST_FILTER : ${{ github.event.inputs.gtest_filter || '*' }}
25
29
75
79
(github.event_name == 'pull_request' &&
76
80
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) ||
77
81
(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 }}
78
90
steps :
79
91
- name : Prepare Git for Checkout on Windows
80
92
run : |
@@ -90,24 +102,25 @@ jobs:
90
102
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
91
103
- name : Setup msbuild on windows
92
104
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 }}
103
122
run : ctest --output-on-failure --test-dir build -C Release
104
123
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
111
124
env :
112
125
VCPKG_ROOT : " C:/vcpkg"
113
126
VCPKG_BINARY_SOURCES : " clear;x-gha,readwrite"
0 commit comments