From 917ea86baad640967f62c4a92290e5211bb7966c Mon Sep 17 00:00:00 2001 From: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com> Date: Sun, 25 Sep 2022 16:47:18 +0200 Subject: [PATCH] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 15 +++++++++++++++ examples/hammer_test.c | 5 ++++- examples/hammer_test_unix.c | 3 ++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index d662517..176f75a 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -7,6 +7,21 @@ on: branches: [ master ] jobs: + + test_windows_libuv: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: ilammy/msvc-dev-cmd@v1 + - name: Build hammer_test + run: | + vcpkg install libuv:x64-windows + cl /I C:\vcpkg\installed\x64-windows\include /MT /W3 /D WIN32_LEAN_AND_MEAN /D LIBUS_USE_LIBUV /D LIBUS_NO_SSL /std:c11 /I src examples/hammer_test.c src/*.c src/eventing/*.c src/crypto/*.c /EHsc /Ox C:\vcpkg\installed\x64-windows\lib\uv.lib advapi32.lib + cl /I C:\vcpkg\installed\x64-windows\include /MT /W3 /D WIN32_LEAN_AND_MEAN /D LIBUS_USE_LIBUV /D LIBUS_NO_SSL /std:c11 /I src examples/hammer_test_unix.c src/*.c src/eventing/*.c src/crypto/*.c /EHsc /Ox C:\vcpkg\installed\x64-windows\lib\uv.lib advapi32.lib + cp C:\vcpkg\installed\x64-windows\bin\uv.dll uv.dll + dir + ./hammer_test.exe + ./hammer_test_unix.exe test_macos_libuv: diff --git a/examples/hammer_test.c b/examples/hammer_test.c index edbb927..7afd528 100644 --- a/examples/hammer_test.c +++ b/examples/hammer_test.c @@ -389,6 +389,8 @@ struct us_socket_t *on_http_socket_timeout(struct us_socket_t *s) { } int main() { + fprintf(stderr, "Hello hammer test\n"); + printf("Helloui\n"); srand(time(0)); long_buffer = calloc(long_length, 1); @@ -402,7 +404,8 @@ int main() { // these are ignored for non-SSL - struct us_socket_context_options_t options = {}; + struct us_socket_context_options_t options; + memset(&options, 0, sizeof(struct us_socket_context_options_t)); options.key_file_name = "/home/alexhultman/uWebSockets.js/misc/key.pem"; options.cert_file_name = "/home/alexhultman/uWebSockets.js/misc/cert.pem"; options.passphrase = "1234"; diff --git a/examples/hammer_test_unix.c b/examples/hammer_test_unix.c index 120b0a7..7178148 100644 --- a/examples/hammer_test_unix.c +++ b/examples/hammer_test_unix.c @@ -402,7 +402,8 @@ int main() { // these are ignored for non-SSL - struct us_socket_context_options_t options = {}; + struct us_socket_context_options_t options; + memset(&options, 0, sizeof(struct us_socket_context_options_t)); options.key_file_name = "/home/alexhultman/uWebSockets.js/misc/key.pem"; options.cert_file_name = "/home/alexhultman/uWebSockets.js/misc/cert.pem"; options.passphrase = "1234";