Skip to content

Added a fix for default number of streams in nonplaybin pipelines (#121) #310

Added a fix for default number of streams in nonplaybin pipelines (#121)

Added a fix for default number of streams in nonplaybin pipelines (#121) #310

Workflow file for this run

# Copyright (C) 2023 Sky UK
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation;
# version 2.1 of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# This workflow builds and runs the rialto-gstreamer unittests with valgrind to check for memory leaks.
# The workflow shall fail if leaks are detected and the results are summarized in github.
# Logs are uploaded on failure.
name: valgrind_ut
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master", "rdkcentral:master" ]
pull_request:
branches: [ "master", "rdkcentral:master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This job sets up the repo with the dependancies then runs the tests with valgrind
valgrind-test:
name: Build and test build_ut with valgrind
# Runs on ubuntu
runs-on: ubuntu-22.04
strategy:
matrix:
os: [ ubuntu-22.04 ]
# Timeout after
timeout-minutes: 60
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout repo
uses: actions/checkout@v4
# Apt update
- name: Apt update
run: |
sudo apt-get update
# Setup github for python 3.8
- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.8
# Add misc package dependencies
- name: install dependencies
run: sudo apt-get install libc6-dbg
# Setup gstreamer 1.0
- name: Build gstreamer library
run: |
sudo apt-get install libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
- name: Install valgrind library
run: |
sudo apt-get install valgrind
# Check, from which rialto branch should we download headers
- name: Check if rialto branch with the same name exists
id: check-branch
shell: sh +e {0}
run: |
branch=master
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
git ls-remote --exit-code --heads "https://github.com/rdkcentral/rialto.git" ${{ github.event.pull_request.head.ref }} > /dev/null
if [ $? -eq 0 ]; then
branch="${{ github.event.pull_request.head.ref }}"
fi
fi
echo "branch=$branch" >> "$GITHUB_OUTPUT"
# Run the build script with valgrind
- name: Run unittests with valgrind
run: |
python build_ut.py -c -xml -f -val -b ${{ steps.check-branch.outputs.branch }}
# Process the valgrind results and create a csv
- name: Process valgrind results
id: create-valgrind-csv
if: success() || failure()
run: python scripts/valgrind/process_valgrind_results.py
# Read the valgrind results csv file
- name: Read the valgrind results csv
uses: juliangruber/read-file-action@v1
id: csv-memory
if: success() || failure()
with:
path: ./valgrind_report.csv
# Create results table for valgrind results
- name: Create results table
uses: petems/csv-to-md-table-action@master
id: results-table-output
if: success() || failure()
with:
csvinput: ${{ steps.csv-memory.outputs.content }}
# Add table to the summary
- name: Create results table
if: failure()
run: |
echo "Summary of the valgrind failures" >> $GITHUB_STEP_SUMMARY
echo "${{steps.results-table-output.outputs.markdown-table}}" >> $GITHUB_STEP_SUMMARY
# Upload logs on failure
- name: Upload logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: logs
path: |
gtest_result.log
build/*valgrind_report.xml