Skip to content

Commit

Permalink
Update c-cpp.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
uNetworkingAB committed Sep 25, 2022
1 parent 4621cd3 commit 917ea86
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
5 changes: 4 additions & 1 deletion examples/hammer_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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";
Expand Down
3 changes: 2 additions & 1 deletion examples/hammer_test_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 917ea86

Please sign in to comment.