Skip to content

Commit 139cdc0

Browse files
committed
Add mac and linux as well
1 parent a96a744 commit 139cdc0

File tree

1 file changed

+133
-2
lines changed

1 file changed

+133
-2
lines changed

.github/workflows/kvssink.yml

Lines changed: 133 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,137 @@ jobs:
8282
# exit 1
8383
# fi
8484

85+
mac-debug-dump-dir:
86+
runs-on: macos-latest
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: Install dependencies
96+
run: |
97+
brew install gstreamer log4cplus mkvtoolnix
98+
99+
- name: Build kvssink
100+
run: |
101+
mkdir build && cd build
102+
cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_DEPENDENCIES=OFF
103+
make -j$(nproc)
104+
105+
- name: Configure AWS Credentials
106+
uses: aws-actions/configure-aws-credentials@v4
107+
with:
108+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
109+
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
110+
aws-region: ${{ secrets.AWS_REGION }}
111+
role-duration-seconds: 10800
112+
113+
- name: Run kvssink with dump dir
114+
env:
115+
GST_PLUGIN_PATH: ${{ github.workspace }}/build
116+
KVS_DEBUG_DUMP_DATA_FILE_DIR: ${{ github.workspace }}/build/debug_output
117+
working-directory: ./build
118+
run: |
119+
mkdir -p debug_output
120+
gst-launch-1.0 videotestsrc is-live=true num-buffers=450 \
121+
! video/x-raw,framerate=30/1,width=640,height=480 \
122+
! videoconvert ! x264enc tune=zerolatency key-int-max=45 \
123+
! h264parse \
124+
! kvssink stream-name="demo-stream"
125+
126+
- name: Verify MKV dump
127+
working-directory: ./build/debug_output
128+
run: |
129+
mkvfiles=(*.mkv)
130+
if [ ${#mkvfiles[@]} -eq 0 ]; then
131+
echo "No MKV files found in debug_output"
132+
exit 1
133+
fi
134+
135+
for file in "${mkvfiles[@]}"; do
136+
echo "Verifying $file with mkvinfo (verbose and hexdump):"
137+
mkvinfo -v -X "$file"
138+
done
139+
140+
linux-debug-dump-dir:
141+
runs-on: ubuntu-latest
142+
env:
143+
AWS_KVS_LOG_LEVEL: 1
144+
permissions:
145+
id-token: write
146+
contents: read
147+
strategy:
148+
matrix:
149+
include:
150+
- os: Ubuntu 22.04
151+
image: public.ecr.aws/ubuntu/ubuntu:22.04_stable
152+
- os: Ubuntu 20.04
153+
image: public.ecr.aws/ubuntu/ubuntu:20.04_stable
154+
fail-fast: false
155+
steps:
156+
- name: Checkout repository
157+
uses: actions/checkout@v4
158+
159+
- name: Install dependencies
160+
run: |
161+
sudo apt-get update
162+
sudo apt-get install -y automake build-essential cmake git \
163+
gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad \
164+
gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly \
165+
gstreamer1.0-tools \
166+
libcurl4-openssl-dev libgstreamer1.0-dev \
167+
libgstreamer-plugins-base1.0-dev liblog4cplus-dev \
168+
libssl-dev pkg-config mkvtoolnix
169+
170+
- name: Setup build directory
171+
run: |
172+
mkdir -p build
173+
cd build
174+
175+
- name: Build kvssink
176+
working-directory: ./build
177+
run: |
178+
cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DCMAKE_BUILD_TYPE=Debug -DALIGNED_MEMORY_MODEL=ON -DBUILD_DEPENDENCIES=OFF
179+
make -j$(nproc)
180+
181+
- name: Configure AWS Credentials
182+
uses: aws-actions/configure-aws-credentials@v4
183+
with:
184+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
185+
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
186+
aws-region: ${{ secrets.AWS_REGION }}
187+
role-duration-seconds: 10800
188+
189+
- name: Run kvssink with dump dir
190+
env:
191+
GST_PLUGIN_PATH: ${{ github.workspace }}/build
192+
KVS_DEBUG_DUMP_DATA_FILE_DIR: ${{ github.workspace }}/build/debug_output
193+
working-directory: ./build
194+
run: |
195+
mkdir -p debug_output
196+
gst-launch-1.0 videotestsrc is-live=true num-buffers=450 \
197+
! video/x-raw,framerate=30/1,width=640,height=480 \
198+
! videoconvert ! x264enc tune=zerolatency key-int-max=45 \
199+
! h264parse \
200+
! kvssink stream-name="demo-stream"
201+
202+
- name: Verify MKV dump
203+
working-directory: ./build/debug_output
204+
run: |
205+
mkvfiles=(*.mkv)
206+
if [ ${#mkvfiles[@]} -eq 0 ]; then
207+
echo "No MKV files found in debug_output"
208+
exit 1
209+
fi
210+
211+
for file in "${mkvfiles[@]}"; do
212+
echo "Verifying $file with mkvinfo (verbose and hexdump):"
213+
mkvinfo -v -X "$file"
214+
done
215+
85216
windows-debug-dump-dir:
86217
runs-on: windows-2022
87218
env:
@@ -141,6 +272,6 @@ jobs:
141272
142273
# Run mkvinfo on each MKV file
143274
foreach ($file in $mkvFiles) {
144-
Write-Output "Verifying $($file.FullName) with mkvinfo:"
145-
mkvinfo.exe "$($file.FullName)"
275+
Write-Output "Verifying $($file.FullName) with mkvinfo (verbose and hexdump):"
276+
mkvinfo.exe -v -X "$($file.FullName)"
146277
}

0 commit comments

Comments
 (0)