Fix connection state transition bug in example_chat #7
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: Ubuntu | |
| on: [push, pull_request] | |
| jobs: | |
| build-and-test-ubuntu: | |
| name: ${{ matrix.row }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - row: clang-openssl-baseline | |
| compiler: clang | |
| sanitizer: none | |
| use_webrtc: false | |
| crypto: default | |
| crypto25519: default | |
| targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto" | |
| - row: gcc-openssl-crypto | |
| compiler: gcc | |
| sanitizer: none | |
| use_webrtc: false | |
| crypto: default | |
| crypto25519: default | |
| targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto" | |
| - row: clang-libsodium | |
| compiler: clang | |
| sanitizer: none | |
| use_webrtc: false | |
| crypto: libsodium | |
| crypto25519: libsodium | |
| targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto" | |
| - row: clang-reference-25519 | |
| compiler: clang | |
| sanitizer: none | |
| use_webrtc: false | |
| crypto: default | |
| crypto25519: Reference | |
| targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto" | |
| - row: clang-openssl-webrtc | |
| compiler: clang | |
| sanitizer: none | |
| use_webrtc: true | |
| crypto: default | |
| crypto25519: default | |
| targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto" | |
| env: | |
| CI_BUILD: 1 | |
| IMAGE: ubuntu | |
| IMAGE_TAG: noble | |
| steps: | |
| - uses: actions/checkout@main | |
| # Note only alpine needs "preinstall" step | |
| - name: Update packages | |
| run: sudo -E bash .github/update-packages.sh | |
| - name: Install dependencies | |
| run: | | |
| sudo -E bash .github/install.sh | |
| sudo -E bash .github/install-post.sh | |
| - name: Setup mock IPs | |
| run: sudo python3 tests/test_p2p.py --setup-mock-ips | |
| - name: Build (RelWithDebInfo) | |
| run: | | |
| set -euo pipefail | |
| args=( | |
| --compiler "${{ matrix.compiler }}" | |
| --build-dir build | |
| --sanitizer "${{ matrix.sanitizer }}" | |
| ) | |
| if [[ "${{ matrix.use_webrtc }}" == "true" ]]; then | |
| args+=(--use-webrtc) | |
| fi | |
| if [[ "${{ matrix.crypto }}" != "default" ]]; then | |
| args+=(--crypto "${{ matrix.crypto }}") | |
| fi | |
| if [[ "${{ matrix.crypto25519 }}" != "default" ]]; then | |
| args+=(--crypto25519 "${{ matrix.crypto25519 }}") | |
| fi | |
| if [[ -n "${{ matrix.targets }}" ]]; then | |
| read -r -a target_args <<< "${{ matrix.targets }}" | |
| args+=(--targets "${target_args[@]}") | |
| fi | |
| python3 .github/run-single-config.py "${args[@]}" | |
| - name: Test crypto (RelWithDebInfo) | |
| run: | | |
| set -euo pipefail | |
| python3 .github/run-single-config.py \ | |
| --compiler "${{ matrix.compiler }}" \ | |
| --build-dir build \ | |
| --sanitizer "${{ matrix.sanitizer }}" \ | |
| --phase test \ | |
| --run-tests \ | |
| --tests test_crypto | |
| - name: Test connection (RelWithDebInfo) | |
| run: | | |
| set -euo pipefail | |
| python3 .github/run-single-config.py \ | |
| --compiler "${{ matrix.compiler }}" \ | |
| --build-dir build \ | |
| --sanitizer "${{ matrix.sanitizer }}" \ | |
| --phase test \ | |
| --run-tests \ | |
| --tests test_connection:suite-quick | |
| - name: Test p2p (RelWithDebInfo) | |
| run: | | |
| set -euo pipefail | |
| python3 .github/run-single-config.py \ | |
| --compiler "${{ matrix.compiler }}" \ | |
| --build-dir build \ | |
| --sanitizer "${{ matrix.sanitizer }}" \ | |
| --phase test \ | |
| --run-tests \ | |
| --tests "test_p2p.py:--spewlevel=debug:--loglevel-p2prendezvous=debug" | |
| - name: Build (ASAN RelWithDebInfo) | |
| if: matrix.row == 'clang-openssl-webrtc' | |
| run: | | |
| set -euo pipefail | |
| python3 .github/run-single-config.py \ | |
| --compiler "${{ matrix.compiler }}" \ | |
| --build-dir build-asan \ | |
| --sanitizer asan \ | |
| --use-webrtc \ | |
| --targets test_connection test_p2p trivial_signaling_server publish_test_script | |
| - name: Test connection (ASAN RelWithDebInfo) | |
| if: matrix.row == 'clang-openssl-webrtc' | |
| run: | | |
| set -euo pipefail | |
| python3 .github/run-single-config.py \ | |
| --compiler "${{ matrix.compiler }}" \ | |
| --build-dir build-asan \ | |
| --sanitizer asan \ | |
| --phase test \ | |
| --run-tests \ | |
| --tests test_connection:suite-quick | |
| - name: Test p2p (ASAN RelWithDebInfo) | |
| if: matrix.row == 'clang-openssl-webrtc' | |
| run: | | |
| set -euo pipefail | |
| python3 .github/run-single-config.py \ | |
| --compiler "${{ matrix.compiler }}" \ | |
| --build-dir build-asan \ | |
| --sanitizer asan \ | |
| --phase test \ | |
| --run-tests \ | |
| --tests "test_p2p.py:--spewlevel=debug:--loglevel-p2prendezvous=debug" | |
| - name: Build (Debug) | |
| run: | | |
| set -euo pipefail | |
| args=( | |
| --compiler "${{ matrix.compiler }}" | |
| --build-dir build-debug | |
| --build-type Debug | |
| --sanitizer none | |
| ) | |
| if [[ "${{ matrix.use_webrtc }}" == "true" ]]; then | |
| args+=(--use-webrtc) | |
| fi | |
| if [[ "${{ matrix.crypto }}" != "default" ]]; then | |
| args+=(--crypto "${{ matrix.crypto }}") | |
| fi | |
| if [[ "${{ matrix.crypto25519 }}" != "default" ]]; then | |
| args+=(--crypto25519 "${{ matrix.crypto25519 }}") | |
| fi | |
| python3 .github/run-single-config.py "${args[@]}" | |
| - name: Build (Release) | |
| run: | | |
| set -euo pipefail | |
| args=( | |
| --compiler "${{ matrix.compiler }}" | |
| --build-dir build-release | |
| --build-type Release | |
| --sanitizer none | |
| ) | |
| if [[ "${{ matrix.use_webrtc }}" == "true" ]]; then | |
| args+=(--use-webrtc) | |
| fi | |
| if [[ "${{ matrix.crypto }}" != "default" ]]; then | |
| args+=(--crypto "${{ matrix.crypto }}") | |
| fi | |
| if [[ "${{ matrix.crypto25519 }}" != "default" ]]; then | |
| args+=(--crypto25519 "${{ matrix.crypto25519 }}") | |
| fi | |
| python3 .github/run-single-config.py "${args[@]}" |