@@ -4,38 +4,79 @@ on: [push, pull_request]
4
4
5
5
jobs :
6
6
test-webrtc-thread-leak :
7
- runs-on : ubuntu-24.04
7
+ runs-on : ubuntu-22.04
8
+ container : ubuntu:24.04
8
9
9
10
steps :
10
- - uses : actions/checkout@v4
11
+ - name : Checkout
12
+ uses : actions/checkout@v4
11
13
12
- - name : Install apt dependencies
14
+ - name : Install build dependencies
13
15
run : |
14
- sudo apt update
16
+ apt update
15
17
apt install -y --no-install-recommends \
16
- libgstreamer1.0-0 \
17
- libgstreamer-plugins-base1.0-0 \
18
- libgstreamer-plugins-bad1.0-0 \
19
- libgstrtspserver-1.0-0 \
18
+ libunwind-dev \
19
+ libclang-dev \
20
+ libssl-dev \
21
+ pkg-config \
22
+ build-essential \
23
+ curl \
24
+ wget \
25
+ gnupg \
26
+ ca-certificates \
27
+ git \
28
+ rustup \
29
+ libmount-dev \
30
+ libsepol-dev \
31
+ libselinux1-dev \
32
+ libglib2.0-dev \
33
+ libgudev-1.0-dev \
34
+ libgstreamer1.0-dev \
35
+ libgstreamer-plugins-base1.0-dev \
36
+ libgstreamer-plugins-bad1.0-dev \
37
+ libgstrtspserver-1.0-dev
38
+
39
+ - name : Install build dependencies - Node and Yarn
40
+ run : |
41
+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
42
+ | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg
43
+ echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" \
44
+ | tee /etc/apt/sources.list.d/nodesource.list
45
+ curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg \
46
+ | gpg --dearmor -o /usr/share/keyrings/yarnkey.gpg
47
+ echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" \
48
+ | tee /etc/apt/sources.list.d/yarn.list
49
+ apt update -y
50
+ apt install -y --no-install-recommends \
51
+ nodejs \
52
+ yarn
53
+
54
+ - name : Get stable Rust
55
+ run : rustup default stable
56
+
57
+ - name : Build
58
+ run : cargo build
59
+
60
+ - name : Install runtime dependencies
61
+ run : |
62
+ apt update
63
+ apt install -y --no-install-recommends \
64
+ gstreamer1.0-tools \
20
65
gstreamer1.0-x \
21
66
gstreamer1.0-nice \
22
67
gstreamer1.0-libav \
23
- gstreamer1.0-plugins-ugly \
24
- wget \
25
- ca-certificates \
26
- gnupg \
27
- htop
28
-
29
- - name : Install openssl.so.1.1
68
+ gstreamer1.0-plugins-ugly
69
+
70
+ - name : Get libssl.so.1.1
30
71
# Note: if the link breaks, find it here: https://packages.ubuntu.com/focal/amd64/libssl1.1/download
31
72
run : |
32
73
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb -O /tmp/openssl.deb
33
- sudo dpkg -i /tmp/openssl.deb
74
+ dpkg -i /tmp/openssl.deb
34
75
35
- - name : Install google chrome and chromedriver from Google
76
+ - name : Install Google Chrome and Chromedriver
36
77
# Get the json API from https://github.com/GoogleChromeLabs/chrome-for-testing?tab=readme-ov-file#json-api-endpoints
37
78
run : |
38
- sudo apt install -y --no-install-recommends jq unzip
79
+ apt install -y --no-install-recommends jq unzip
39
80
wget --no-check-certificate https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json -O /tmp/downloads.json
40
81
chrome_url=$(jq -r '."channels"."Stable"."downloads"."chrome"[] | select(."platform" == "linux64") | ."url"' /tmp/downloads.json)
41
82
wget --no-check-certificate $chrome_url -O /tmp/chrome.zip
51
92
52
93
- name : Run test
53
94
run : |
54
- cargo build
55
95
RUST_BACKTRACE=1 timeout 300 cargo run --verbose -- \
56
96
--mavlink udpin:0.0.0.0:6666 --verbose --default-settings WebRTCTest --enable-webrtc-task-test 6666 || echo "Test failed" && exit 1
0 commit comments