Improve webrtc test #68
Workflow file for this run
This file contains 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: Test webrtc thread leak | |
on: [push, pull_request] | |
jobs: | |
test-webrtc-thread-leak: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install apt dependencies | |
run: | | |
sudo apt update | |
apt install -y --no-install-recommends \ | |
libgstreamer1.0-0 \ | |
libgstreamer-plugins-base1.0-0 \ | |
libgstreamer-plugins-bad1.0-0 \ | |
libgstrtspserver-1.0-0 \ | |
gstreamer1.0-x \ | |
gstreamer1.0-nice \ | |
gstreamer1.0-libav \ | |
gstreamer1.0-plugins-ugly \ | |
wget \ | |
ca-certificates \ | |
gnupg \ | |
htop | |
- name: Install openssl.so.1.1 | |
# Note: if the link breaks, find it here: https://packages.ubuntu.com/focal/amd64/libssl1.1/download | |
run: | | |
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb -O /tmp/openssl.deb | |
sudo dpkg -i /tmp/openssl.deb | |
- name: Install google chrome and chromedriver from Google | |
# Get the json API from https://github.com/GoogleChromeLabs/chrome-for-testing?tab=readme-ov-file#json-api-endpoints | |
run: | | |
sudo apt install -y --no-install-recommends jq unzip | |
wget --no-check-certificate https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json -O /tmp/downloads.json | |
chrome_url=$(jq -r '."channels"."Stable"."downloads"."chrome"[] | select(."platform" == "linux64") | ."url"' /tmp/downloads.json) | |
wget --no-check-certificate $chrome_url -O /tmp/chrome.zip | |
unzip /tmp/chrome.zip -d /tmp/ | |
mkdir -p /opt/google | |
mv -f /tmp/chrome-linux64 /opt/google/chrome | |
ln -s /opt/google/chrome/chrome /usr/bin/chrome | |
chromedriver_url=$(jq -r '."channels"."Stable"."downloads"."chromedriver"[] | select(."platform" == "linux64") | ."url"' /tmp/downloads.json) | |
wget --no-check-certificate $chromedriver_url -O /tmp/chromedriver.zip | |
unzip /tmp/chromedriver.zip -d /tmp/ | |
mv -f /tmp/chromedriver-linux64 /opt/google/chromedriver | |
ln -s /opt/google/chromedriver/chromedriver /usr/bin/chromedriver | |
- name: Run test | |
run: | | |
cargo build | |
RUST_BACKTRACE=1 timeout 300 cargo run --verbose -- \ | |
--mavlink udpin:0.0.0.0:6666 --verbose --default-settings WebRTCTest --enable-webrtc-task-test 6666 || echo "Test failed" && exit 1 |