Update README.md #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libssl-dev catch2 | |
| - name: Configure | |
| run: > | |
| cmake -S . -B build | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DWSPP_BUILD_TESTS=ON | |
| -DWSPP_BUILD_EXAMPLES=ON | |
| -DWSPP_BUILD_PLAYGROUND=OFF | |
| -DWSPP_INSTALL=OFF | |
| - name: Build | |
| run: cmake --build build -j | |
| - name: Run unit tests | |
| run: ctest --test-dir build --output-on-failure | |
| # ========================= | |
| # AUTOBahn Server | |
| # ========================= | |
| - name: Start Autobahn echo server | |
| run: | | |
| ./build/tests/autobahn_basic_echosv & | |
| echo $! > server.pid | |
| - name: Wait for server | |
| run: sleep 2 | |
| - name: Run Autobahn Server TestSuite | |
| run: | | |
| docker run --rm \ | |
| -v "$PWD:/workspace" \ | |
| --network host \ | |
| crossbario/autobahn-testsuite \ | |
| wstest -m fuzzingclient \ | |
| -s /workspace/tests/autobahn/fuzzingclient.json | |
| - name: Stop Autobahn server | |
| if: always() | |
| run: | | |
| kill $(cat server.pid) || true | |
| # ========================= | |
| # AUTOBahn CLIENT | |
| # ========================= | |
| - name: Start Autobahn fuzzing server (client tests) | |
| run: | | |
| docker run -d --rm \ | |
| --name autobahn-client \ | |
| --network host \ | |
| -v "$PWD:/workspace" \ | |
| crossbario/autobahn-testsuite \ | |
| wstest -m fuzzingserver \ | |
| -s /workspace/tests/autobahn/fuzzingserver.json | |
| - name: Wait for Autobahn server | |
| run: sleep 2 | |
| - name: Run wspp Autobahn client | |
| run: | | |
| ./build/tests/autobahn_basic_echoclient | |
| - name: Stop Autobahn fuzzing server | |
| if: always() | |
| run: | | |
| docker stop autobahn-client || true | |
| - name: Upload Autobahn reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: autobahn-wspp-reports | |
| path: reports/ | |
| - name: Publish Autobahn reports to GitHub Pages | |
| if: always() | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: reports | |
| destination_dir: autobahn |