Skip to content

Gst initialisation moved to a separate thread #718

Gst initialisation moved to a separate thread

Gst initialisation moved to a separate thread #718

#
# If not stated otherwise in this file or this component's LICENSE file the
# following copyright and licenses apply:
#
# Copyright 2023 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 server component tests. The workflow shall fail if any test fails
# and the results of the tests are checked and displayed in github. Coverage of the api interfaces are also
# checked, the workflow shall fail if these are not 100% covered. Logs are uploaded on failure.
name: server_component_tests
# 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 server component tests
run-server-test:
name: Build and test server component tests
# Runs on ubuntu
runs-on: ubuntu-22.04
# Timeout after
timeout-minutes: 15
# 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 component tests
- name: Initialise host
uses: ./.github/workflows/actions/init_ut
# Run the build script for server
- name: build_ct.py script server
run: |
python build_ct.py -c -xml -f -cov -s server
# Processes the results of the component test and the lcov output
- name: Process output
uses: ./.github/workflows/actions/process_results_ut
if: success() || failure()
with:
suite: 'server'
# Upload logs on failure
- name: Upload logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: logs
path: |
gtest_result.log
build/*gtest_result.xml
# Cache lcov output
- name: Cache server component tests interface stats
id: cache-server-component-coverage-stats
uses: actions/cache@v4
if: success()
with:
path: build/coverage_statistics_public_apis.txt
key: ${{ runner.os }}-server-component-coverage-stats-${{ github.run_id }}-${{ github.run_number }}
# Upload coverage report on success
- name: Upload Coverage Report
uses: actions/upload-artifact@v4
if: success()
with:
name: coverage_report_component
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_component
path: build/coverage_statistics.txt
# This job checks the api coverage
# Will only check stats on pull request
check-interface-api-coverage:
name: Checks the coverage statistics of the api interface
# Runs on ubuntu
runs-on: ubuntu-22.04
# Timeout after
timeout-minutes: 10
needs: [run-server-test]
# 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
if: ${{ github.ref != 'refs/heads/master' }}
uses: actions/checkout@v4
# Get cached lcov server component tests interface api stats
- name: Get server component tests interface api stats
id: cache-server-component-coverage-stats
uses: actions/cache@v4
if: ${{ github.ref != 'refs/heads/master' }}
with:
path: build/coverage_statistics_public_apis.txt
key: ${{ runner.os }}-server-component-coverage-stats-${{ github.run_id }}-${{ github.run_number }}
# Run the check_coverage_stats script
- name: Process Coverage Statistics
if: ${{ success() && github.ref != 'refs/heads/master' }}
run: python scripts/coverage/check_coverage_stats.py build/coverage_statistics_public_apis.txt 8