diff --git a/.github/workflows/unittest_linux.yml b/.github/workflows/unittest_linux.yml new file mode 100644 index 00000000..40b9a8a2 --- /dev/null +++ b/.github/workflows/unittest_linux.yml @@ -0,0 +1,13 @@ +name: linux +on: + push: + paths-ignore: + - 'docs/**' + +jobs: + linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: make test_make + run: make test_make diff --git a/.github/workflows/unittest_mac_tsan_mbedtls.yml b/.github/workflows/unittest_mac_tsan_mbedtls.yml new file mode 100644 index 00000000..794672ee --- /dev/null +++ b/.github/workflows/unittest_mac_tsan_mbedtls.yml @@ -0,0 +1,15 @@ +name: mac_tsan_mbedtls +on: + push: + paths-ignore: + - 'docs/**' + +jobs: + mac_tsan_mbedtls: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v1 + - name: install mbedtls + run: brew install mbedtls + - name: make test + run: make test_tsan_mbedtls diff --git a/.github/workflows/unittest_mac_tsan_openssl.yml b/.github/workflows/unittest_mac_tsan_openssl.yml new file mode 100644 index 00000000..9926ec29 --- /dev/null +++ b/.github/workflows/unittest_mac_tsan_openssl.yml @@ -0,0 +1,15 @@ +name: mac_tsan_openssl +on: + push: + paths-ignore: + - 'docs/**' + +jobs: + mac_tsan_openssl: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v1 + - name: install openssl + run: brew install openssl@1.1 + - name: make test + run: make test_tsan_openssl diff --git a/.github/workflows/unittest_mac_tsan_sectransport.yml b/.github/workflows/unittest_mac_tsan_sectransport.yml new file mode 100644 index 00000000..79c6dd81 --- /dev/null +++ b/.github/workflows/unittest_mac_tsan_sectransport.yml @@ -0,0 +1,13 @@ +name: mac_tsan_sectransport +on: + push: + paths-ignore: + - 'docs/**' + +jobs: + mac_tsan_sectransport: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v1 + - name: make test_tsan + run: make test_tsan diff --git a/.github/workflows/ccpp.yml b/.github/workflows/unittest_uwp.yml similarity index 50% rename from .github/workflows/ccpp.yml rename to .github/workflows/unittest_uwp.yml index 2e82d4a4..e5d594ff 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/unittest_uwp.yml @@ -1,57 +1,10 @@ -name: unittest +name: uwp on: push: paths-ignore: - 'docs/**' jobs: - linux: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: make test_make - run: make test_make - - mac_tsan_sectransport: - runs-on: macOS-latest - steps: - - uses: actions/checkout@v1 - - name: make test_tsan - run: make test_tsan - - mac_tsan_openssl: - runs-on: macOS-latest - steps: - - uses: actions/checkout@v1 - - name: install openssl - run: brew install openssl@1.1 - - name: make test - run: make test_tsan_openssl - - mac_tsan_mbedtls: - runs-on: macOS-latest - steps: - - uses: actions/checkout@v1 - - name: install mbedtls - run: brew install mbedtls - - name: make test - run: make test_tsan_mbedtls - - windows: - runs-on: windows-latest - steps: - - uses: actions/checkout@v1 - - uses: seanmiddleditch/gha-setup-vsdevenv@master - - run: | - mkdir build - cd build - cmake -DCMAKE_CXX_COMPILER=cl.exe -DUSE_WS=1 -DUSE_TEST=1 .. - - run: cmake --build build - - # Running the unittest does not work, the binary cannot be found - #- run: ../build/test/ixwebsocket_unittest.exe - # working-directory: test - uwp: runs-on: windows-latest steps: @@ -83,4 +36,3 @@ jobs: # # Running the unittest does not work, the binary cannot be found # #- run: ../build/test/ixwebsocket_unittest.exe # # working-directory: test - diff --git a/.github/workflows/unittest_windows.yml b/.github/workflows/unittest_windows.yml new file mode 100644 index 00000000..4f3173be --- /dev/null +++ b/.github/workflows/unittest_windows.yml @@ -0,0 +1,17 @@ +name: windows +on: + push: + paths-ignore: + - 'docs/**' + +jobs: + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v1 + - uses: seanmiddleditch/gha-setup-vsdevenv@master + - run: | + mkdir build + cd build + cmake -DCMAKE_CXX_COMPILER=cl.exe -DUSE_WS=1 -DUSE_TEST=1 .. + - run: cmake --build build diff --git a/README.md b/README.md index cf935c52..497ae724 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ ## Hello world -![Build status](https://github.com/machinezone/IXWebSocket/workflows/unittest/badge.svg) - IXWebSocket is a C++ library for WebSocket client and server development. It has minimal dependencies (no boost), is very simple to use and support everything you'll likely need for websocket dev (SSL, deflate compression, compiles on most platforms, etc...). HTTP client and server code is also available, but it hasn't received as much testing. It is been used on big mobile video game titles sending and receiving tons of messages since 2017 (iOS and Android). It was tested on macOS, iOS, Linux, Android, Windows and FreeBSD. Two important design goals are simplicity and correctness. @@ -49,3 +47,23 @@ If your company or project is using this library, feel free to open an issue or - [libDiscordBot](https://github.com/tostc/libDiscordBot/tree/master), a work in progress discord library - [gwebsocket](https://github.com/norrbotten/gwebsocket), a websocket (lua) module for Garry's Mod - [DisCPP](https://github.com/DisCPP/DisCPP), a simple but feature rich Discord API wrapper + +## Continuous Integration + +| OS | TLS | Sanitizer | Status | +|-------------------|-------------------|-------------------|-------------------| +| Linux | OpenSSL | None | [![Build2][1]][7] | +| macOS | Secure Transport | Thread Sanitizer | [![Build2][2]][7] | +| macOS | OpenSSL | Thread Sanitizer | [![Build2][3]][7] | +| macOS | MbedTLS | Thread Sanitizer | [![Build2][4]][7] | +| Windows | Disabled | None | [![Build2][5]][7] | +| UWP | Disabled | None | [![Build2][6]][7] | + +[1]: https://github.com/machinezone/IXWebSocket/workflows/linux/badge.svg +[2]: https://github.com/machinezone/IXWebSocket/workflows/mac_tsan_sectransport/badge.svg +[3]: https://github.com/machinezone/IXWebSocket/workflows/mac_tsan_openssl/badge.svg +[4]: https://github.com/machinezone/IXWebSocket/workflows/mac_tsan_mbedtls/badge.svg +[5]: https://github.com/machinezone/IXWebSocket/workflows/windows/badge.svg +[6]: https://github.com/machinezone/IXWebSocket/workflows/uwp/badge.svg +[7]: https://github.com/machinezone/IXWebSocket + diff --git a/docs/index.md b/docs/index.md index 8439d04b..0f1f5a01 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,5 +1,3 @@ -![Build status](https://github.com/machinezone/IXWebSocket/workflows/unittest/badge.svg) - ## Introduction [*WebSocket*](https://en.wikipedia.org/wiki/WebSocket) is a computer communications protocol, providing full-duplex and bi-directionnal communication channels over a single TCP connection. *IXWebSocket* is a C++ library for client and server Websocket communication, and for client and server HTTP communication. *TLS* aka *SSL* is supported. The code is derived from [easywsclient](https://github.com/dhbaird/easywsclient) and from the [Satori C SDK](https://github.com/satori-com/satori-rtm-sdk-c). It has been tested on the following platforms.