Skip to content

Commit

Permalink
Add mac and linux as well
Browse files Browse the repository at this point in the history
  • Loading branch information
sirknightj committed Feb 5, 2025
1 parent a96a744 commit 543e32a
Showing 1 changed file with 126 additions and 2 deletions.
128 changes: 126 additions & 2 deletions .github/workflows/kvssink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,130 @@ jobs:
# exit 1
# fi

mac-debug-dump-dir:
runs-on: macos-latest
env:
AWS_KVS_LOG_LEVEL: 1
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
brew install pkg-config openssl cmake gstreamer log4cplus mkvtoolnix
brew unlink openssl
- name: Build kvssink
run: |
mkdir build && cd build
cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_DEPENDENCIES=OFF
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 kvssink with dump dir
env:
GST_PLUGIN_PATH: ${{ github.workspace }}/build
KVS_DEBUG_DUMP_DATA_FILE_DIR: ${{ github.workspace }}/build/debug_output
working-directory: ./build
run: |
mkdir -p debug_output
gst-launch-1.0 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"
- name: Verify MKV dump
working-directory: ./build/debug_output
run: |
mkvfiles=(*.mkv)
if [ ${#mkvfiles[@]} -eq 0 ]; then
echo "No MKV files found in debug_output"
exit 1
fi
for file in "${mkvfiles[@]}"; do
echo "Verifying $file with mkvinfo (verbose and hexdump):"
mkvinfo -v -X "$file"
done
linux-debug-dump-dir:
runs-on: ubuntu-latest
env:
AWS_KVS_LOG_LEVEL: 1
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
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 mkvtoolnix
- name: Setup build directory
run: |
mkdir -p build
cd build
- name: Build kvssink
working-directory: ./build
run: |
cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DCMAKE_BUILD_TYPE=Debug -DALIGNED_MEMORY_MODEL=ON -DBUILD_DEPENDENCIES=OFF
make -j$(nproc)
- name: Run kvssink with dump dir
env:
GST_PLUGIN_PATH: ${{ github.workspace }}/build
KVS_DEBUG_DUMP_DATA_FILE_DIR: ${{ github.workspace }}/build/debug_output
working-directory: ./build
run: |
mkdir -p debug_output
gst-launch-1.0 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"
- name: Verify MKV dump
working-directory: ./build/debug_output
run: |
mkvfiles=(*.mkv)
if [ ${#mkvfiles[@]} -eq 0 ]; then
echo "No MKV files found in debug_output"
exit 1
fi
for file in "${mkvfiles[@]}"; do
echo "Verifying $file with mkvinfo (verbose and hexdump):"
mkvinfo -v -X "$file"
done
windows-debug-dump-dir:
runs-on: windows-2022
env:
Expand Down Expand Up @@ -141,6 +265,6 @@ jobs:
# Run mkvinfo on each MKV file
foreach ($file in $mkvFiles) {
Write-Output "Verifying $($file.FullName) with mkvinfo:"
mkvinfo.exe "$($file.FullName)"
Write-Output "Verifying $($file.FullName) with mkvinfo (verbose and hexdump):"
mkvinfo.exe -v -X "$($file.FullName)"
}

0 comments on commit 543e32a

Please sign in to comment.