|
| 1 | +name: Ubuntu |
| 2 | +on: [push, pull_request] |
| 3 | + |
| 4 | +jobs: |
| 5 | + |
| 6 | + build-and-test-ubuntu: |
| 7 | + name: ${{ matrix.row }} |
| 8 | + runs-on: ubuntu-latest |
| 9 | + strategy: |
| 10 | + fail-fast: false |
| 11 | + matrix: |
| 12 | + include: |
| 13 | + - row: clang-openssl-baseline |
| 14 | + compiler: clang |
| 15 | + build_dir: build-ci-quick-clang |
| 16 | + sanitizer: none |
| 17 | + use_webrtc: false |
| 18 | + crypto: default |
| 19 | + crypto25519: default |
| 20 | + targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto" |
| 21 | + - row: gcc-openssl-crypto |
| 22 | + compiler: gcc |
| 23 | + build_dir: build-ci-quick-gcc |
| 24 | + sanitizer: none |
| 25 | + use_webrtc: false |
| 26 | + crypto: default |
| 27 | + crypto25519: default |
| 28 | + targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto" |
| 29 | + - row: clang-libsodium |
| 30 | + compiler: clang |
| 31 | + build_dir: build-ci-quick-sodium |
| 32 | + sanitizer: none |
| 33 | + use_webrtc: false |
| 34 | + crypto: libsodium |
| 35 | + crypto25519: libsodium |
| 36 | + targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto" |
| 37 | + - row: clang-reference-25519 |
| 38 | + compiler: clang |
| 39 | + build_dir: build-ci-quick-ref25519 |
| 40 | + sanitizer: none |
| 41 | + use_webrtc: false |
| 42 | + crypto: default |
| 43 | + crypto25519: Reference |
| 44 | + targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto" |
| 45 | + - row: clang-openssl-webrtc |
| 46 | + compiler: clang |
| 47 | + build_dir: build-ci-quick-webrtc |
| 48 | + sanitizer: none |
| 49 | + use_webrtc: true |
| 50 | + crypto: default |
| 51 | + crypto25519: default |
| 52 | + targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto" |
| 53 | + env: |
| 54 | + CI_BUILD: 1 |
| 55 | + IMAGE: ubuntu |
| 56 | + IMAGE_TAG: noble |
| 57 | + steps: |
| 58 | + - uses: actions/checkout@main |
| 59 | + # Note only alpine needs "preinstall" step |
| 60 | + - name: Update packages |
| 61 | + run: sudo -E bash .github/update-packages.sh |
| 62 | + - name: Install dependencies |
| 63 | + run: | |
| 64 | + sudo -E bash .github/install.sh |
| 65 | + sudo -E bash .github/install-post.sh |
| 66 | + - name: Setup mock IPs |
| 67 | + run: sudo python3 tests/test_p2p.py --setup-mock-ips |
| 68 | + - name: Build (RelWithDebInfo) |
| 69 | + run: | |
| 70 | + set -euo pipefail |
| 71 | +
|
| 72 | + args=( |
| 73 | + --compiler "${{ matrix.compiler }}" |
| 74 | + --build-dir "${{ matrix.build_dir }}" |
| 75 | + --sanitizer "${{ matrix.sanitizer }}" |
| 76 | + ) |
| 77 | +
|
| 78 | + if [[ "${{ matrix.use_webrtc }}" == "true" ]]; then |
| 79 | + args+=(--use-webrtc) |
| 80 | + fi |
| 81 | +
|
| 82 | + if [[ "${{ matrix.crypto }}" != "default" ]]; then |
| 83 | + args+=(--crypto "${{ matrix.crypto }}") |
| 84 | + fi |
| 85 | +
|
| 86 | + if [[ "${{ matrix.crypto25519 }}" != "default" ]]; then |
| 87 | + args+=(--crypto25519 "${{ matrix.crypto25519 }}") |
| 88 | + fi |
| 89 | +
|
| 90 | + if [[ -n "${{ matrix.targets }}" ]]; then |
| 91 | + read -r -a target_args <<< "${{ matrix.targets }}" |
| 92 | + args+=(--targets "${target_args[@]}") |
| 93 | + fi |
| 94 | +
|
| 95 | + python3 .github/run-single-config.py "${args[@]}" |
| 96 | +
|
| 97 | + - name: Test crypto (RelWithDebInfo) |
| 98 | + run: | |
| 99 | + set -euo pipefail |
| 100 | + python3 .github/run-single-config.py \ |
| 101 | + --compiler "${{ matrix.compiler }}" \ |
| 102 | + --build-dir "${{ matrix.build_dir }}" \ |
| 103 | + --sanitizer "${{ matrix.sanitizer }}" \ |
| 104 | + --phase test \ |
| 105 | + --run-tests \ |
| 106 | + --tests test_crypto |
| 107 | +
|
| 108 | + - name: Test connection (RelWithDebInfo) |
| 109 | + run: | |
| 110 | + set -euo pipefail |
| 111 | + python3 .github/run-single-config.py \ |
| 112 | + --compiler "${{ matrix.compiler }}" \ |
| 113 | + --build-dir "${{ matrix.build_dir }}" \ |
| 114 | + --sanitizer "${{ matrix.sanitizer }}" \ |
| 115 | + --phase test \ |
| 116 | + --run-tests \ |
| 117 | + --tests test_connection:suite-quick |
| 118 | +
|
| 119 | + - name: Test p2p (RelWithDebInfo) |
| 120 | + run: | |
| 121 | + set -euo pipefail |
| 122 | + python3 .github/run-single-config.py \ |
| 123 | + --compiler "${{ matrix.compiler }}" \ |
| 124 | + --build-dir "${{ matrix.build_dir }}" \ |
| 125 | + --sanitizer "${{ matrix.sanitizer }}" \ |
| 126 | + --phase test \ |
| 127 | + --run-tests \ |
| 128 | + --tests "test_p2p.py:--spewlevel=debug:--loglevel-p2prendezvous=debug" |
| 129 | +
|
| 130 | + - name: Build (Debug) |
| 131 | + run: | |
| 132 | + set -euo pipefail |
| 133 | +
|
| 134 | + args=( |
| 135 | + --compiler "${{ matrix.compiler }}" |
| 136 | + --build-dir "build-debug" |
| 137 | + --build-type Debug |
| 138 | + --sanitizer none |
| 139 | + ) |
| 140 | +
|
| 141 | + if [[ "${{ matrix.use_webrtc }}" == "true" ]]; then |
| 142 | + args+=(--use-webrtc) |
| 143 | + fi |
| 144 | +
|
| 145 | + if [[ "${{ matrix.crypto }}" != "default" ]]; then |
| 146 | + args+=(--crypto "${{ matrix.crypto }}") |
| 147 | + fi |
| 148 | +
|
| 149 | + if [[ "${{ matrix.crypto25519 }}" != "default" ]]; then |
| 150 | + args+=(--crypto25519 "${{ matrix.crypto25519 }}") |
| 151 | + fi |
| 152 | +
|
| 153 | + python3 .github/run-single-config.py "${args[@]}" |
| 154 | +
|
| 155 | + - name: Build (Release) |
| 156 | + run: | |
| 157 | + set -euo pipefail |
| 158 | +
|
| 159 | + args=( |
| 160 | + --compiler "${{ matrix.compiler }}" |
| 161 | + --build-dir "build-release" |
| 162 | + --build-type Release |
| 163 | + --sanitizer none |
| 164 | + ) |
| 165 | +
|
| 166 | + if [[ "${{ matrix.use_webrtc }}" == "true" ]]; then |
| 167 | + args+=(--use-webrtc) |
| 168 | + fi |
| 169 | +
|
| 170 | + if [[ "${{ matrix.crypto }}" != "default" ]]; then |
| 171 | + args+=(--crypto "${{ matrix.crypto }}") |
| 172 | + fi |
| 173 | +
|
| 174 | + if [[ "${{ matrix.crypto25519 }}" != "default" ]]; then |
| 175 | + args+=(--crypto25519 "${{ matrix.crypto25519 }}") |
| 176 | + fi |
| 177 | +
|
| 178 | + python3 .github/run-single-config.py "${args[@]}" |
0 commit comments