examples: Add test run for lv2v #1
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: Check Min FPS for livevideo2video pipelines | |
on: | |
pull_request: | |
paths: | |
- "runner/**" | |
- "!runner/.devcontainer/**" | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
paths: | |
- "runner/**" | |
- "!runner/.devcontainer/**" | |
workflow_dispatch: | |
jobs: | |
run-fps-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
model_config: | |
- { id: noop, input_fps: 10, exp_output_fps: 8 } | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23.3' | |
- name: Build Docker images | |
env: | |
MODEL_ID: ${{ matrix.model_config.id }} | |
run: | | |
cd runner | |
docker build -t livepeer/ai-runner:live-base -f docker/Dockerfile.live-base . | |
if [ "${MODEL_ID}" = "noop" ]; then | |
docker build -t livepeer/ai-runner:live-app-noop -f docker/Dockerfile.live-app-noop . | |
else | |
docker build -t livepeer/ai-runner:live-base-${MODEL_ID} -f docker/Dockerfile.live-base-${MODEL_ID} . | |
docker build -t livepeer/ai-runner:live-app-${MODEL_ID} -f docker/Dockerfile.live-app-${MODEL_ID} --build-arg PIPELINE=${MODEL_ID} . | |
fi | |
cd .. | |
- name: Install packages | |
run: | | |
apt-get update && apt-get install -y libzmq3-dev | |
rm -rf /var/lib/apt/lists/* | |
- name: Clean up runner dockers | |
run: | | |
docker ps -aq --filter name=live-video-to-video_${MODEL_ID}* | xargs -r docker rm -f || true | |
- name: Run FPS test | |
env: | |
MODEL_ID: ${{ matrix.model_config.id }} | |
INPUT_FPS: ${{ matrix.model_config.input_fps }} | |
EXP_OUTPUT_FPS: ${{ matrix.model_config.exp_output_fps }} | |
run: | | |
output=$(go run cmd/examples/live-video-to-video/main.go -modelid=${MODEL_ID} -inputfps=${INPUT_FPS} -expoutputfps=${EXP_OUTPUT_FPS}) | |
echo "$output" | |
if echo "$output" | grep -q "TEST PASSED!"; then | |
echo "Test for ${MODEL_ID} pipeline PASSED" | |
elif echo "$output" | grep -q "TEST FAILED!"; then | |
echo "Test for ${MODEL_ID} pipeline FAILED" | |
exit 1 | |
else | |
echo "Test for ${MODEL_ID} pipeline had an unknown result" | |
exit 1 | |
fi |