-
Notifications
You must be signed in to change notification settings - Fork 341
83 lines (73 loc) · 2.47 KB
/
kvssink.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: kvssink checks
on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master
jobs:
unit-tests:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
id-token: write
contents: read
strategy:
matrix:
include:
- os: Ubuntu 22.04
image: public.ecr.aws/ubuntu/ubuntu:22.04_stable
- os: Ubuntu 20.04
image: public.ecr.aws/ubuntu/ubuntu:20.04_stable
fail-fast: false
name: kvssink unit tests on ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y automake build-essential cmake git \
gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly \
gstreamer1.0-tools \
libcurl4-openssl-dev libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev liblog4cplus-dev \
libssl-dev pkg-config valgrind
- name: Setup build directory
run: |
mkdir -p build
cd build
- name: Build kvssink unit tests
working-directory: ./build
run: |
cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_TEST=ON -DCMAKE_BUILD_TYPE=Debug -DALIGNED_MEMORY_MODEL=ON
make -j$(nproc)
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
aws-region: ${{ secrets.AWS_REGION }}
role-duration-seconds: 10800
- name: Run the unit tests
working-directory: ./build
run: |
export GST_PLUGIN_PATH=`pwd`
GST_DEBUG=4 ./tst/gstkvsplugintest
- name: Run the unit tests with valgrind
working-directory: ./build
run: |
export GST_PLUGIN_PATH=`pwd`
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes \
--verbose --log-file=valgrind-out.txt ./tst/gstkvsplugintest
if grep -q "All heap blocks were freed -- no leaks are possible" valgrind-out.txt; then
echo "No memory leaks detected"
else
echo "Memory leaks detected. Review the valgrind output:"
cat valgrind-out.txt
exit 1
fi