-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (46 loc) · 1.51 KB
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# SPDX-FileCopyrightText: 2024 Denis Danilov
# SPDX-License-Identifier: GPL-3.0-only
name: Coverage
on: [push, pull_request]
permissions:
contents: write
defaults:
run:
shell: bash
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: build dependencies
run: |
sudo apt-get -qq update
sudo apt-get install --assume-yes gcovr
sudo apt-get install --assume-yes gstreamer1.0-plugins-good
sudo apt-get install --assume-yes libgl-dev
sudo apt-get install --assume-yes pulseaudio
sudo apt-get install --assume-yes qt6-base-dev
sudo apt-get install --assume-yes qt6-l10n-tools
sudo apt-get install --assume-yes qt6-multimedia-dev
sudo apt-get install --assume-yes qt6-tools-dev
sudo apt-get install --assume-yes qt6-tools-dev-tools
sudo apt-get install --assume-yes xvfb
- name: configure
run: |
BUILD_DIR=$HOME/build
echo "BUILD_DIR=$BUILD_DIR" >>$GITHUB_ENV
cmake -DWITH_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug -B $BUILD_DIR
- name: build
run: |
cmake --build $BUILD_DIR --target all
- name: test
run: |
systemctl --user start pulseaudio
xvfb-run ctest --output-on-failure --test-dir $BUILD_DIR --repeat until-pass:5
cmake --build $BUILD_DIR --target coveralls
- name: coveralls
uses: coverallsapp/github-action@v2
with:
file: ${{ env.BUILD_DIR }}/coverage.json