Gst initialisation moved to a separate thread #1988
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
# | |
# If not stated otherwise in this file or this component's LICENSE file the | |
# following copyright and licenses apply: | |
# | |
# Copyright 2022 Sky UK | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
# This workflow builds and runs the rialto unittests. The workflow shall fail if any test fails | |
# and the results of the tests are checked and displayed in github. Logs are uploaded on failure. | |
name: build_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 servermain tests | |
run-servermain: | |
name: Build and test servermain unittests | |
# Runs on ubuntu | |
runs-on: ubuntu-22.04 | |
# Timeout after | |
timeout-minutes: 10 | |
# 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 | |
# Initialises the host ready to run unittests | |
- name: Initialise host | |
uses: ./.github/workflows/actions/init_ut | |
# Run the build script for servermain | |
- name: build_ut.py script servermain | |
run: | | |
python build_ut.py -c -xml -f -cov -s servermain | |
# Processes the results of the unittests and the lcov output | |
- name: Process output | |
uses: ./.github/workflows/actions/process_results_ut | |
if: success() || failure() | |
with: | |
suite: 'servermain' | |
# Cache lcov output | |
- name: Cache servermain coverage | |
id: cache-servermain-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-servermain.info | |
key: ${{ runner.os }}-servermain-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# This job sets up the repo with the dependancies then runs the servergstplayer tests | |
run-servergstplayer: | |
name: Build and test servergstplayer unittests | |
# Runs on ubuntu | |
runs-on: ubuntu-22.04 | |
# Timeout after | |
timeout-minutes: 20 | |
# 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 | |
# Initialises the host ready to run unittests | |
- name: Initialise host | |
uses: ./.github/workflows/actions/init_ut | |
# Run the build script for servergstplayer | |
- name: build_ut.py script servergstplayer | |
run: | | |
python build_ut.py -c -xml -f -cov -s servergstplayer | |
# Processes the results of the unittests and the lcov output | |
- name: Process output | |
uses: ./.github/workflows/actions/process_results_ut | |
if: success() || failure() | |
with: | |
suite: 'servergstplayer' | |
# Cache lcov output | |
- name: Cache servergstplayer coverage | |
id: cache-servergstplayer-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-servergstplayer.info | |
key: ${{ runner.os }}-servergstplayer-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# This job sets up the repo with the dependancies then runs the serveripc tests | |
run-serveripc: | |
name: Build and test serveripc unittests | |
# Runs on ubuntu | |
runs-on: ubuntu-22.04 | |
# Timeout after | |
timeout-minutes: 10 | |
# 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 | |
# Initialises the host ready to run unittests | |
- name: Initialise host | |
uses: ./.github/workflows/actions/init_ut | |
# Run the build script for serveripc | |
- name: build_ut.py script serveripc | |
run: | | |
python build_ut.py -c -xml -f -cov -s serveripc | |
# Processes the results of the unittests and the lcov output | |
- name: Process output | |
uses: ./.github/workflows/actions/process_results_ut | |
if: success() || failure() | |
with: | |
suite: 'serveripc' | |
# Cache lcov output | |
- name: Cache serveripc coverage | |
id: cache-serveripc-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-serveripc.info | |
key: ${{ runner.os }}-serveripc-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# This job sets up the repo with the dependancies then runs the serverservice tests | |
run-serverservice: | |
name: Build and test serverservice unittests | |
# Runs on ubuntu | |
runs-on: ubuntu-22.04 | |
# Timeout after | |
timeout-minutes: 10 | |
# 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 | |
# Initialises the host ready to run unittests | |
- name: Initialise host | |
uses: ./.github/workflows/actions/init_ut | |
# Run the build script for serverservice | |
- name: build_ut.py script serverservice | |
run: | | |
python build_ut.py -c -xml -f -cov -s serverservice | |
# Processes the results of the unittests and the lcov output | |
- name: Process output | |
uses: ./.github/workflows/actions/process_results_ut | |
if: success() || failure() | |
with: | |
suite: 'serverservice' | |
# Cache lcov output | |
- name: Cache serverservice coverage | |
id: cache-serverservice-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-serverservice.info | |
key: ${{ runner.os }}-serverservice-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# This job sets up the repo with the dependancies then runs the client tests | |
run-client: | |
name: Build and test client unittests | |
# Runs on ubuntu | |
runs-on: ubuntu-22.04 | |
# Timeout after | |
timeout-minutes: 10 | |
# 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 | |
# Initialises the host ready to run unittests | |
- name: Initialise host | |
uses: ./.github/workflows/actions/init_ut | |
# Run the build script for client | |
- name: build_ut.py script client | |
run: | | |
python build_ut.py -c -xml -f -cov -s client | |
# Processes the results of the unittests and the lcov output | |
- name: Process output | |
uses: ./.github/workflows/actions/process_results_ut | |
if: success() || failure() | |
with: | |
suite: 'client' | |
# Cache lcov output | |
- name: Cache client coverage | |
id: cache-client-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-client.info | |
key: ${{ runner.os }}-client-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# This job sets up the repo with the dependancies then runs the clientipc tests | |
run-clientipc: | |
name: Build and test clientipc unittests | |
# Runs on ubuntu | |
runs-on: ubuntu-22.04 | |
# Timeout after | |
timeout-minutes: 10 | |
# 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 | |
# Initialises the host ready to run unittests | |
- name: Initialise host | |
uses: ./.github/workflows/actions/init_ut | |
# Run the build script for clientipc | |
- name: build_ut.py script clientipc | |
run: | | |
python build_ut.py -c -xml -f -cov -s clientipc | |
# Processes the results of the unittests and the lcov output | |
- name: Process output | |
uses: ./.github/workflows/actions/process_results_ut | |
if: success() || failure() | |
with: | |
suite: 'clientipc' | |
# Cache lcov output | |
- name: Cache clientipc coverage | |
id: cache-clientipc-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-clientipc.info | |
key: ${{ runner.os }}-clientipc-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# This job sets up the repo with the dependancies then runs the common tests | |
run-playercommon: | |
name: Build and test playercommon unittests | |
# Runs on ubuntu | |
runs-on: ubuntu-22.04 | |
# Timeout after | |
timeout-minutes: 10 | |
# 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 | |
# Initialises the host ready to run unittests | |
- name: Initialise host | |
uses: ./.github/workflows/actions/init_ut | |
# Run the build script for playercommon | |
- name: build_ut.py script playercommon | |
run: | | |
python build_ut.py -c -xml -f -cov -s playercommon | |
# Processes the results of the unittests and the lcov output | |
- name: Process output | |
uses: ./.github/workflows/actions/process_results_ut | |
if: success() || failure() | |
with: | |
suite: 'playercommon' | |
# Cache lcov output | |
- name: Cache playercommon coverage | |
id: cache-playercommon-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-playercommon.info | |
key: ${{ runner.os }}-playercommon-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# This job sets up the repo with the dependancies then runs the common tests | |
run-common: | |
name: Build and test common unittests | |
# Runs on ubuntu | |
runs-on: ubuntu-22.04 | |
# Timeout after | |
timeout-minutes: 10 | |
# 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 | |
# Initialises the host ready to run unittests | |
- name: Initialise host | |
uses: ./.github/workflows/actions/init_ut | |
# Run the build script for common | |
- name: build_ut.py script common | |
run: | | |
python build_ut.py -c -xml -f -cov -s common | |
# Processes the results of the unittests and the lcov output | |
- name: Process output | |
uses: ./.github/workflows/actions/process_results_ut | |
if: success() || failure() | |
with: | |
suite: 'common' | |
# Cache lcov output | |
- name: Cache common coverage | |
id: cache-common-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-common.info | |
key: ${{ runner.os }}-common-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# This job sets up the repo with the dependancies then runs the logging tests | |
run-logging: | |
name: Build and test logging unittests | |
# Runs on ubuntu | |
runs-on: ubuntu-22.04 | |
# Timeout after | |
timeout-minutes: 10 | |
# 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 | |
# Initialises the host ready to run unittests | |
- name: Initialise host | |
uses: ./.github/workflows/actions/init_ut | |
# Run the build script for logging | |
- name: build_ut.py script logging | |
run: | | |
python build_ut.py -c -xml -f -cov -s logging | |
# Processes the results of the unittests and the lcov output | |
- name: Process output | |
uses: ./.github/workflows/actions/process_results_ut | |
if: success() || failure() | |
with: | |
suite: 'logging' | |
# Cache lcov output | |
- name: Cache logging coverage | |
id: cache-logging-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-logging.info | |
key: ${{ runner.os }}-logging-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# This job sets up the repo with the dependancies then runs the manager tests | |
run-manager: | |
name: Build and test manager unittests | |
# Runs on ubuntu | |
runs-on: ubuntu-22.04 | |
# Timeout after | |
timeout-minutes: 10 | |
# 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 | |
# Initialises the host ready to run unittests | |
- name: Initialise host | |
uses: ./.github/workflows/actions/init_ut | |
# Run the build script for manager | |
- name: build_ut.py script manager | |
run: | | |
python build_ut.py -c -xml -f -cov -s manager | |
# Processes the results of the unittests and the lcov output | |
- name: Process output | |
uses: ./.github/workflows/actions/process_results_ut | |
if: success() || failure() | |
with: | |
suite: 'manager' | |
# Cache lcov output | |
- name: Cache manager coverage | |
id: cache-manager-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-manager.info | |
key: ${{ runner.os }}-manager-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# This job sets up the repo with the dependancies then runs the ipc tests | |
run-ipc: | |
name: Build and test ipc unittests | |
# Runs on ubuntu | |
runs-on: ubuntu-22.04 | |
# Timeout after | |
timeout-minutes: 10 | |
# 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 | |
# Initialises the host ready to run unittests | |
- name: Initialise host | |
uses: ./.github/workflows/actions/init_ut | |
# Run the build script for ipc | |
- name: build_ut.py script ipc | |
run: | | |
python build_ut.py -c -xml -f -cov -s ipc | |
# Processes the results of the unittests and the lcov output | |
- name: Process output | |
uses: ./.github/workflows/actions/process_results_ut | |
if: success() || failure() | |
with: | |
suite: 'ipc' | |
# Cache lcov output | |
- name: Cache ipc coverage | |
id: cache-ipc-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-ipc.info | |
key: ${{ runner.os }}-ipc-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# This job runs the coverage report | |
generate-coverage-report: | |
name: Generates Coverage Report | |
# Runs on ubuntu | |
runs-on: ubuntu-22.04 | |
# Timeout after | |
timeout-minutes: 10 | |
needs: [run-servermain, run-servergstplayer, run-serveripc, run-serverservice, run-client, run-clientipc, run-common, run-playercommon, run-logging, run-manager, run-ipc] | |
# 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 | |
# Setup lcov 2.0 | |
- name: Install lcov library | |
run: | | |
sudo apt-get install libjson-perl libperlio-gzip-perl perl libgd-gd2-perl libcapture-tiny-perl libdatetime-perl | |
wget https://github.com/linux-test-project/lcov/releases/download/v2.0/lcov-2.0.tar.gz | |
tar -xf lcov-2.0.tar.gz | |
cd lcov-2.0 | |
sudo make install | |
# Get cached lcov servermain output | |
- name: Get servermain coverage | |
id: cache-servermain-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-servermain.info | |
key: ${{ runner.os }}-servermain-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# Get cached lcov servergstplayer output | |
- name: Get servergstplayer coverage | |
id: cache-servergstplayer-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-servergstplayer.info | |
key: ${{ runner.os }}-servergstplayer-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# Get cached lcov serveripc output | |
- name: Get serveripc coverage | |
id: cache-serveripc-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-serveripc.info | |
key: ${{ runner.os }}-serveripc-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# Get cached lcov serverservice output | |
- name: Get serverservice coverage | |
id: cache-serverservice-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-serverservice.info | |
key: ${{ runner.os }}-serverservice-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# Get cached lcov client output | |
- name: Get client coverage | |
id: cache-client-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-client.info | |
key: ${{ runner.os }}-client-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# Get cached lcov clientipc output | |
- name: Get clientipc coverage | |
id: cache-clientipc-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-clientipc.info | |
key: ${{ runner.os }}-clientipc-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# Get cached lcov common output | |
- name: Get common coverage | |
id: cache-common-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-common.info | |
key: ${{ runner.os }}-common-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# Get cached lcov playercommon output | |
- name: Get playercommon coverage | |
id: cache-playercommon-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-playercommon.info | |
key: ${{ runner.os }}-playercommon-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# Get cached lcov logging output | |
- name: Get logging coverage | |
id: cache-logging-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-logging.info | |
key: ${{ runner.os }}-logging-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# Get cached lcov manager output | |
- name: Get manager coverage | |
id: cache-manager-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-manager.info | |
key: ${{ runner.os }}-manager-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# Get cached lcov ipc output | |
- name: Get ipc coverage | |
id: cache-ipc-coverage | |
uses: actions/cache@v4 | |
if: success() | |
with: | |
path: build/coverage-ipc.info | |
key: ${{ runner.os }}-ipc-coverage-${{ github.run_id }}-${{ github.run_number }} | |
# Generage full rialto coverage report | |
- name: Combine coverage reports | |
run: | | |
cd build | |
lcov -a coverage-servermain.info -a coverage-servergstplayer.info -a coverage-serveripc.info -a coverage-serverservice.info \ | |
-a coverage-client.info -a coverage-clientipc.info -a coverage-common.info -a coverage-playercommon.info -a coverage-logging.info -a coverage-manager.info \ | |
-a coverage-ipc.info -o coverage.info --filter brace,function,trivial | |
- name: Generate html | |
run: | | |
cd build | |
genhtml coverage.info --output-directory gh_pages/coverage_report --filter brace,function,trivial | |
- name: Generate coverage stats | |
run: | | |
cd build | |
lcov --summary coverage.info --filter brace,function,trivial > coverage_statistics.txt | |
# Upload coverage report on success | |
- name: Upload Coverage Report | |
uses: actions/upload-artifact@v4 | |
if: success() | |
with: | |
name: coverage_report | |
path: build/gh_pages/coverage_report | |
# Upload coverage statistics on success | |
- name: Upload Coverage Statistics | |
uses: actions/upload-artifact@v4 | |
if: success() | |
with: | |
name: coverage_report_stats | |
path: build/coverage_statistics.txt | |
checks-the-cov-report: | |
name: Checks the Coverage Report | |
# Runs on ubuntu | |
runs-on: ubuntu-22.04 | |
# Timeout after | |
timeout-minutes: 2 | |
# Define the dependencies on the previous coverage jobs | |
needs: [generate-coverage-report] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
# Download the current coverage statistics | |
- name: Download Current Coverage Statistics | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage_report_stats | |
path: build | |
# Download current master coverage statistics | |
- name: Download Master Coverage Statistics | |
uses: dawidd6/action-download-artifact@v3 | |
if: ${{ success() && github.ref != 'refs/heads/master' }} | |
with: | |
workflow_conclusion: success | |
branch: master | |
name: coverage_report_stats | |
path: master_artifacts | |
# Run the process_coverage_stats script | |
- name: Process Coverage Statistics | |
if: ${{ success() && github.ref != 'refs/heads/master' }} | |
run: python scripts/coverage/process_coverage_stats.py ./master_artifacts/coverage_statistics.txt build/coverage_statistics.txt | |
# Get process_coverage_stats script output | |
- id: get-comment-body | |
if: ${{ (success() || failure()) && github.ref != 'refs/heads/master' }} | |
run: | | |
body="$(cat comparison_output.txt)" | |
body="${body//'%'/'%25'}" | |
body="${body//$'\n'/'%0A'}" | |
body="${body//$'\r'/'%0D'}" | |
echo "::set-output name=body::$body" | |
# Create comment with coverage info | |
- name: Create Coverage Comment | |
if: ${{ (success() || failure()) && github.ref != 'refs/heads/master' }} | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body: ${{ steps.get-comment-body.outputs.body }} |