Skip to content

Commit a96a744

Browse files
committed
Add windows debug dump dir check
1 parent 940ad87 commit a96a744

File tree

3 files changed

+88
-25
lines changed

3 files changed

+88
-25
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
role-duration-seconds: 10800
4141
- name: Run tests
4242
run: |
43-
cd build
43+
cd build
4444
./tst/producerTest
4545
4646
mac-os-build-gcc:
@@ -73,10 +73,10 @@ jobs:
7373
aws-region: ${{ secrets.AWS_REGION }}
7474
role-duration-seconds: 10800
7575
- name: Run tests
76-
run: |
76+
run: |
7777
cd build
7878
./tst/producerTest
79-
79+
8080
linux-gcc-code-coverage:
8181
runs-on: ubuntu-20.04
8282
env:
@@ -88,7 +88,7 @@ jobs:
8888
- name: Clone repository
8989
uses: actions/checkout@v3
9090
- name: Install dependencies
91-
run: |
91+
run: |
9292
sudo apt clean && sudo apt update
9393
sudo apt install -y libunwind-dev
9494
sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools
@@ -115,7 +115,7 @@ jobs:
115115
cd build
116116
for test_file in $(find CMakeFiles/KinesisVideoProducer.dir gstkvssink.dir KinesisVideoProducerJNI.dir -name '*.gcno'); do gcov $test_file; done
117117
bash <(curl -s https://codecov.io/bash)
118-
118+
119119
address-sanitizer:
120120
runs-on: ubuntu-20.04
121121
permissions:
@@ -189,7 +189,7 @@ jobs:
189189
timeout --signal=SIGABRT 60m ./tst/producerTest
190190
191191
# memory-sanitizer:
192-
# runs-on: ubuntu-20.04
192+
# runs-on: ubuntu-20.04
193193
# permissions:
194194
# id-token: write
195195
# contents: read
@@ -237,9 +237,9 @@ jobs:
237237
# mkdir build && cd build
238238
# cmake .. -DBUILD_TEST=TRUE -DTHREAD_SANITIZER=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE
239239
# make
240-
# ulimit -c unlimited -S
240+
# ulimit -c unlimited -S
241241
# timeout --signal=SIGABRT 20m ./tst/producerTest
242-
242+
243243
ubuntu-gcc:
244244
runs-on: ubuntu-20.04
245245
env:
@@ -312,7 +312,7 @@ jobs:
312312
- name: Run tests
313313
run: |
314314
$env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\producer\open-source\local\lib;D:\producer\open-source\local\bin'
315-
& "D:\producer\build\tst\producerTest.exe"
315+
& "D:\producer\build\tst\producerTest.exe"
316316
317317
arm64-cross-compilation:
318318
runs-on: ubuntu-20.04

.github/workflows/kvssink.yml

Lines changed: 75 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,82 @@ jobs:
6565
working-directory: ./build
6666
run: |
6767
export GST_PLUGIN_PATH=`pwd`
68-
GST_DEBUG=4 ./tst/gstkvsplugintest
68+
GST_DEBUG=4 ./tst/gstkvsplugintest
6969
70-
- name: Run the unit tests with valgrind
71-
working-directory: ./build
70+
# - name: Run the unit tests with valgrind
71+
# working-directory: ./build
72+
# run: |
73+
# export GST_PLUGIN_PATH=`pwd`
74+
# valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes \
75+
# --verbose --log-file=valgrind-out.txt ./tst/gstkvsplugintest
76+
#
77+
# if grep -q "All heap blocks were freed -- no leaks are possible" valgrind-out.txt; then
78+
# echo "No memory leaks detected"
79+
# else
80+
# echo "Memory leaks detected. Review the valgrind output:"
81+
# cat valgrind-out.txt
82+
# exit 1
83+
# fi
84+
85+
windows-debug-dump-dir:
86+
runs-on: windows-2022
87+
env:
88+
AWS_KVS_LOG_LEVEL: 1
89+
permissions:
90+
id-token: write
91+
contents: read
92+
steps:
93+
- name: Clone repository
94+
uses: actions/checkout@v4
95+
- name: Move repository
7296
run: |
73-
export GST_PLUGIN_PATH=`pwd`
74-
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes \
75-
--verbose --log-file=valgrind-out.txt ./tst/gstkvsplugintest
97+
mkdir D:\producer
98+
Move-Item -Path "D:\a\amazon-kinesis-video-streams-producer-sdk-cpp\amazon-kinesis-video-streams-producer-sdk-cpp\*" -Destination "D:\producer"
99+
- name: Install dependencies
100+
run: |
101+
choco install nasm strawberryperl mkvtoolnix
102+
choco install gstreamer --version=1.22.8
103+
choco install gstreamer-devel --version=1.22.8
104+
- name: Build repository
105+
run: |
106+
$env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\producer\open-source\local\lib;D:\producer\open-source\local\bin'
107+
git config --system core.longpaths true
108+
cd D:\producer
109+
dir
110+
.github\build_windows.bat
111+
- name: Configure AWS Credentials
112+
uses: aws-actions/configure-aws-credentials@v4
113+
with:
114+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
115+
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
116+
aws-region: ${{ secrets.AWS_REGION }}
117+
role-duration-seconds: 10800
118+
- name: Run kvssink with dump dir
119+
env:
120+
GST_PLUGIN_PATH: D:\producer\build\
121+
KVS_DEBUG_DUMP_DATA_FILE_DIR: D:\producer\build\debug_output
122+
working-directory: D:\producer\build\
123+
run: |
124+
$env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\producer\open-source\local\lib;D:\producer\open-source\local\bin;D:\gstreamer\1.0\msvc_x86_64\bin'
125+
126+
# Create the debug directory (equivalent to mkdir -p)
127+
New-Item -ItemType Directory -Path "D:\producer\build\debug_output" -Force
128+
129+
# Stream for 15 seconds (450 frames @ 30 fps)
130+
gst-launch-1.0.exe videotestsrc is-live=true num-buffers=450 ! video/x-raw,framerate=30/1,width=640,height=480 ! videoconvert ! x264enc tune=zerolatency key-int-max=45 ! h264parse ! kvssink stream-name="demo-stream"
131+
- name: Verify MKV dump
132+
working-directory: D:\producer\build
133+
run: |
134+
$env:Path += ";C:\Program Files\MKVToolNix"
135+
$mkvFiles = Get-ChildItem -Path "D:\producer\build\debug_output" -Filter *.mkv
76136
77-
if grep -q "All heap blocks were freed -- no leaks are possible" valgrind-out.txt; then
78-
echo "No memory leaks detected"
79-
else
80-
echo "Memory leaks detected. Review the valgrind output:"
81-
cat valgrind-out.txt
137+
if ($mkvFiles.Count -eq 0) {
138+
Write-Error "No MKV files found in D:\producer\build\debug_output"
82139
exit 1
83-
fi
140+
}
141+
142+
# Run mkvinfo on each MKV file
143+
foreach ($file in $mkvFiles) {
144+
Write-Output "Verifying $($file.FullName) with mkvinfo:"
145+
mkvinfo.exe "$($file.FullName)"
146+
}

.github/workflows/raspberry-pi.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-22.04
1212
timeout-minutes: 30
1313
permissions:
1414
id-token: write
@@ -70,7 +70,7 @@ jobs:
7070
make -j$(nproc)
7171
7272
export GST_PLUGIN_PATH=$(pwd)
73-
73+
7474
set +e # Disable exit on error for the timeout command
7575
timeout --preserve-status --signal=SIGINT --kill-after=15s 30s \
7676
gst-launch-1.0 -v videotestsrc is-live=true \
@@ -81,10 +81,10 @@ jobs:
8181
! kvssink stream-name="cpp-producer-rpi-${{ matrix.os }}"
8282
EXIT_CODE=$?
8383
set -e # Re-enable exit on error
84-
84+
8585
# 0: Process exited after interrupt with code 0
8686
# 1: Process exited with error code 1
87-
# 137: Process killed by SIGKILL (if the --kill-after timeout is reached)
87+
# 137: Process killed by SIGKILL (if the --kill-after timeout is reached)
8888
echo "Command exited with code: $EXIT_CODE"
8989
if [ $EXIT_CODE -ne 0 ]; then
9090
echo "Command did not exit gracefully after interrupt."

0 commit comments

Comments
 (0)