11
11
- name : install libraries
12
12
run : sudo apt-get update && sudo apt-get install -y libbrotli-dev libcurl4-openssl-dev
13
13
- name : build and run tests
14
- run : cd test && make -j4
14
+ run : cd test && make
15
15
- name : run fuzz test target
16
16
run : cd test && make fuzz_test
17
17
@@ -21,23 +21,45 @@ jobs:
21
21
- name : checkout
22
22
uses : actions/checkout@v4
23
23
- name : build and run tests
24
- run : |
25
- cd test && make -j2
24
+ run : cd test && make
25
+ - name : run fuzz test target
26
+ run : cd test && make fuzz_test
26
27
27
28
windows :
28
29
runs-on : windows-latest
29
30
steps :
30
- - name : prepare git for checkout on windows
31
+ - name : Prepare Git for Checkout on Windows
31
32
run : |
32
33
git config --global core.autocrlf false
33
34
git config --global core.eol lf
34
- - name : checkout
35
+ - name : Checkout
35
36
uses : actions/checkout@v4
36
- - name : setup msbuild on windows
37
+ - name : Export GitHub Actions cache environment variables
38
+ uses : actions/github-script@v7
39
+ with :
40
+ script : |
41
+ core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
42
+ core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
43
+ - name : Setup msbuild on windows
37
44
uses : microsoft/setup-msbuild@v2
38
- - name : make-windows
45
+ - name : Install libraries
39
46
run : |
40
- cd test
41
- msbuild.exe test.sln /verbosity:minimal /t:Build "/p:Configuration=Release;Platform=x64"
42
- x64\Release\test.exe
47
+ vcpkg install gtest curl zlib brotli
48
+ choco install openssl
49
+
50
+ - name : Configure CMake with SSL
51
+ 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
52
+ - name : Build with with SSL
53
+ run : cmake --build build --config Release
54
+ - name : Run tests with SSL
55
+ run : ctest --output-on-failure --test-dir build -C Release
43
56
57
+ - name : Configure CMake without SSL
58
+ 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=ON -DHTTPLIB_REQUIRE_ZLIB=ON -DHTTPLIB_REQUIRE_BROTLI=ON
59
+ - name : Build without SSL
60
+ run : cmake --build build-no-ssl --config Release
61
+ - name : Run tests without SSL
62
+ run : ctest --output-on-failure --test-dir build-no-ssl -C Release
63
+ env :
64
+ VCPKG_ROOT : " C:/vcpkg"
65
+ VCPKG_BINARY_SOURCES : " clear;x-gha,readwrite"
0 commit comments