Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration tests #422

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
3653361
src: lib: video: switch from async fn trait to return future+send
joaoantoniocardoso Dec 12, 2024
8a184b6
src: lib: video: local: Add v4l2loopback device source local type
joaoantoniocardoso Jun 29, 2024
7e6b279
src: lib: stream: Expose stream id via method
joaoantoniocardoso Jul 1, 2024
671d0aa
cargo: Add statrs crate as dev-dependency
joaoantoniocardoso Dec 14, 2024
5151ddc
cargo: Remove openssl from build dependencies (reqwest default feature)
joaoantoniocardoso Dec 14, 2024
bdd0127
cargo: Update lock file
joaoantoniocardoso Dec 14, 2024
d16c888
tests: Add udp h264 latency and jitter test
joaoantoniocardoso Jul 1, 2024
cf1c9c8
.github: Run only the bin/lib tests, not the integration tests
joaoantoniocardoso Jul 2, 2024
f2e3d5e
src: lib: stream: Invalidate only after logging
joaoantoniocardoso Jul 12, 2024
0a6ab8c
src: lib: stream: pipeline: Add colorimetry to raw pipeline
joaoantoniocardoso Jul 12, 2024
defe329
src: lib: stream: pipeline: do-timestamp in udpsrc
joaoantoniocardoso Jul 18, 2024
8b09315
src: lib: stream: pipeline: Remove unneeded caps for fake pipeline
joaoantoniocardoso Jul 22, 2024
6d2c5bd
src: lib: stream: pipeline: Fix JPEG RTP payload number: RFC 2435
joaoantoniocardoso Oct 1, 2024
c847490
src: lib: stream: pipeline: Be more specific with the video and RTP c…
joaoantoniocardoso Oct 1, 2024
f37622d
src: lib: stream: rtsp: Fix max-buffer-size for RTSP server
joaoantoniocardoso Oct 1, 2024
b5a9b8f
build.rs: Update comment
joaoantoniocardoso Dec 14, 2024
3b39c89
.github: workflows: Fix deploy for linux
joaoantoniocardoso Dec 14, 2024
b594ae1
.github: Add latency and jitter v4l2loopback CI tests
joaoantoniocardoso Oct 1, 2024
4a8a6b8
src: lib: stream: set H264 config-interval to every IDR frame
joaoantoniocardoso Oct 1, 2024
c5ad783
src: lib: stream: sink: rtsp_sink: Better deal with socket file
joaoantoniocardoso Dec 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ jobs:
with:
bun-version: latest

- name: Building for ${{ matrix.os }} ${{ matrix.target }} (${{ matrix.SUFFIX }})
if: ${{ contains(matrix.TARGET, 'linux') }}
run: |
cd src/lib/stream/webrtc/frontend && bun install && bun run build && cd -
SKIP_BUN=1 cross build --release --locked --target ${{matrix.target}} --verbose

- name: Install gstreamer
if: ${{ !contains(matrix.TARGET, 'linux') }}
uses: blinemedical/setup-gstreamer@v1
Expand All @@ -79,7 +73,6 @@ jobs:
Move-Item -LiteralPath "${Env:TEMP}\wpd\WpdPack\Lib" -Destination lib

- name: Building for ${{ matrix.os }} ${{ matrix.target }} (${{ matrix.SUFFIX }})
if: ${{ !contains(matrix.TARGET, 'linux') }}
run: cargo build --release --locked --target ${{matrix.target}} --verbose

- name: Prepare files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ jobs:
gstreamer1.0-plugins-ugly

- name: Run tests
run: cargo test --verbose --locked
run: cargo test --lib --bins --verbose --locked
108 changes: 108 additions & 0 deletions .github/workflows/test_with_v4l2loopback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Test with v4l2loopback

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
TARGET: aarch64-unknown-linux-gnu
SUFFIX: aarch64

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set directory to safe for git
if: ${{ !contains(matrix.TARGET, 'windows') }}
# Note: Required by vergen (https://crates.io/crates/vergen)
run: git config --global --add safe.directory $GITHUB_WORKSPACE

- name: Use cached dependencies
uses: Swatinem/rust-cache@v2
with:
key: "${{ matrix.os }}-${{ matrix.TARGET }}-${{ hashFiles('**/Cargo.lock') }}"
shared-key: "shared"

- name: Install build dependencies - Rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable --profile minimal --target ${{ matrix.TARGET }} -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Install build dependencies - Cross
if: ${{ contains(matrix.TARGET, 'linux') }}
run: cargo install cross

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Building for ${{ matrix.os }} ${{ matrix.target }} (${{ matrix.SUFFIX }})
run: |
cd src/lib/stream/webrtc/frontend && bun install && bun run build && cd -
SKIP_BUN=1 cross test --no-run --release --locked --target ${{matrix.target}}

- name: Prepare files
run: |
mkdir -p upload
TARGET_FILE="$(find target/${{ matrix.TARGET }}/release/deps -type f -executable -iname 'v4l2_latency_and_jitter-*')"
cp "$TARGET_FILE" upload/v4l2_latency_and_jitter-${{ matrix.SUFFIX }}

- uses: actions/upload-artifact@v4
with:
name: v4l2_latency_and_jitter-${{ matrix.SUFFIX }}
path: upload/*
retention-days: 1

test:
needs: build
runs-on: PI5-ARM64-with-v4l2loopback

steps:
- name: Check if /dev/video42 exists
run: |
if [ ! -e /dev/video42 ]; then
echo "::error::Error: /dev/video42 does not exist."
exit 1
fi

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: v4l2_latency_and_jitter-aarch64

- name: Install runtime dependencies
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: |
gstreamer1.0-libav \
gstreamer1.0-nice \
gstreamer1.0-plugins-ugly \
gstreamer1.0-tools \
gstreamer1.0-x \
libgstreamer-plugins-bad1.0-0 \
libgstreamer-plugins-base1.0-0 \
libgstreamer-plugins-good1.0-0 \
libgstreamer1.0-0 \
libgstrtspserver-1.0-0

- name: Install runtime dependencies - qrtimestamp
run: |
wget -q https://github.com/patrickelectric/qrtimestamp-gst/releases/download/0.1.0/libgstqrtimestamp-aarch64.so.tar -O - | tar -x

- name: Run tests
run: |
chmod +x ./v4l2_latency_and_jitter-aarch64
export GST_PLUGIN_PATH="$PWD:$GST_PLUGIN_PATH"
timeout 300 ./v4l2_latency_and_jitter-aarch64

- name: Delete artifacts
uses: geekyeggo/delete-artifact@v5
with:
name: v4l2_latency_and_jitter-aarch64
Loading
Loading