Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 10 additions & 165 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,168 +359,6 @@ jobs:
run: exit 1
runs-on: ubuntu-22.04

openssl-1-0-1k:
name: "With OpenSSL 1.0.1k"
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build OpenSSL 1.0.1k
run: |
set -euxo pipefail
curl -s -L https://www.openssl.org/source/openssl-1.0.1k.tar.gz | tar xz
cd openssl-1.0.1k
./config --prefix=$HOME/.release/openssl && make -j1
sudo make install_sw
- name: Download Test File
run: |
set -euxo pipefail
curl -s -L -O https://github.com/ossrs/ffmpeg-webrtc/releases/download/pre-release/bbb-4mbps-baseline-opus.mp4
- name: Build FFmpeg
run: |
set -euxo pipefail

# Install dependencies
sudo apt-get update
sudo apt-get install -y nasm pkg-config jq libopus-dev libx264-dev

# Build FFmpeg with WebRTC support
PKG_CONFIG_PATH="$HOME/.release/openssl/lib/pkgconfig" \
./configure --enable-muxer=whip --enable-openssl --enable-version3
make -j$(nproc)
./ffmpeg -version && ./ffmpeg -muxers 2>/dev/null |grep whip
- name: Start SRS Docker container
run: |
set -euxo pipefail
ip=$(ifconfig eth0 | grep 'inet ' | awk '{print $2}')
docker run --rm -d -p 1935:1935 -p 1985:1985 -p 8080:8080 \
--env CANDIDATE=$ip -p 8000:8000/udp \
ossrs/srs:5 ./objs/srs -c conf/rtc2rtmp.conf
- name: Streaming with FFmpeg
run: |
set -euxo pipefail
nohup ./ffmpeg -t 30 -re -i bbb-4mbps-baseline-opus.mp4 -c copy \
-f whip "http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream" \
1>ffstdout.log 2>ffstderr.log &
- name: Check SRS Streaming
id: streaming
run: |
set -euxo pipefail

# Check streams in SRS.
for ((i=0; i<10; i++)); do
STREAM=$(curl -s http://localhost:1985/api/v1/streams/ | jq -r '.streams[].name')
if [[ "$STREAM" == "livestream" ]]; then
echo 'Test OK';
echo "has_stream=true" >> $GITHUB_OUTPUT
break;
fi
sleep 3
done

if [[ "$STREAM" != "livestream" ]]; then
echo "Stream not found: $STREAM"
echo "has_stream=false" >> $GITHUB_OUTPUT
fi
- name: Stop FFmpeg normally
run: |
pkill -SIGINT ffmpeg && sleep 3 ||
echo "FFmpeg process not found or already stopped."
- name: Show FFmpeg Stdout Log
run: cat ffstdout.log
- name: Show FFmpeg Stderr Log
run: cat ffstderr.log
- name: Check FFmpeg Exit Log
run: |
set -euxo pipefail
cat ffstderr.log |grep 'Exiting normally' && exit 0
echo "Exiting normally not found in ffstderr.log" && exit 1
- name: Check Stream Existence
if: ${{ steps.streaming.outputs.has_stream == 'false' }}
run: exit 1
runs-on: ubuntu-22.04

openssl-1-0-2:
name: "With OpenSSL 1.0.2"
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build OpenSSL 1.0.2
run: |
set -euxo pipefail
curl -s -L https://www.openssl.org/source/openssl-1.0.2.tar.gz | tar xz
cd openssl-1.0.2
./config --prefix=$HOME/.release/openssl
make -j1 && sudo make install_sw
- name: Download Test File
run: |
set -euxo pipefail
curl -s -L -O https://github.com/ossrs/ffmpeg-webrtc/releases/download/pre-release/bbb-4mbps-baseline-opus.mp4
- name: Build FFmpeg
run: |
set -euxo pipefail

# Install dependencies
sudo apt-get update
sudo apt-get install -y nasm pkg-config jq libopus-dev libx264-dev

# Build FFmpeg with WebRTC support
PKG_CONFIG_PATH="$HOME/.release/openssl/lib/pkgconfig" \
./configure --enable-muxer=whip --enable-openssl --enable-version3
make -j$(nproc)
./ffmpeg -version && ./ffmpeg -muxers 2>/dev/null |grep whip
- name: Start SRS Docker container
run: |
set -euxo pipefail
ip=$(ifconfig eth0 | grep 'inet ' | awk '{print $2}')
docker run --rm -d -p 1935:1935 -p 1985:1985 -p 8080:8080 \
--env CANDIDATE=$ip -p 8000:8000/udp \
ossrs/srs:5 ./objs/srs -c conf/rtc2rtmp.conf
- name: Streaming with FFmpeg
run: |
set -euxo pipefail
nohup ./ffmpeg -t 30 -re -i bbb-4mbps-baseline-opus.mp4 -c copy \
-f whip "http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream" \
1>ffstdout.log 2>ffstderr.log &
- name: Check SRS Streaming
id: streaming
run: |
set -euxo pipefail

# Check streams in SRS.
for ((i=0; i<10; i++)); do
STREAM=$(curl -s http://localhost:1985/api/v1/streams/ | jq -r '.streams[].name')
if [[ "$STREAM" == "livestream" ]]; then
echo 'Test OK';
echo "has_stream=true" >> $GITHUB_OUTPUT
break;
fi
sleep 3
done

if [[ "$STREAM" != "livestream" ]]; then
echo "Stream not found: $STREAM"
echo "has_stream=false" >> $GITHUB_OUTPUT
fi
- name: Stop FFmpeg normally
run: |
pkill -SIGINT ffmpeg && sleep 3 ||
echo "FFmpeg process not found or already stopped."
- name: Show FFmpeg Stdout Log
run: cat ffstdout.log
- name: Show FFmpeg Stderr Log
run: cat ffstderr.log
- name: Check FFmpeg Exit Log
run: |
set -euxo pipefail
cat ffstderr.log |grep 'Exiting normally' && exit 0
echo "Exiting normally not found in ffstderr.log" && exit 1
- name: Check Stream Existence
if: ${{ steps.streaming.outputs.has_stream == 'false' }}
run: exit 1
runs-on: ubuntu-22.04

openssl-1-1-0h:
name: "With OpenSSL 1.1.0h"
needs: build
Expand Down Expand Up @@ -548,7 +386,10 @@ jobs:

# Build FFmpeg with WebRTC support
PKG_CONFIG_PATH="$HOME/.release/openssl/lib/pkgconfig" \
./configure --enable-muxer=whip --enable-openssl --enable-version3
./configure --enable-muxer=whip --enable-openssl \
--extra-cflags="-I$HOME/.release/openssl/include" \
--extra-ldflags="-L$HOME/.release/openssl/lib" \
--pkg-config-flags="--static"
make -j$(nproc)
./ffmpeg -version && ./ffmpeg -muxers 2>/dev/null |grep whip
- name: Start SRS Docker container
Expand Down Expand Up @@ -626,6 +467,9 @@ jobs:
# Build FFmpeg with WebRTC support
PKG_CONFIG_PATH="$HOME/.release/openssl/lib/pkgconfig" \
./configure --enable-muxer=whip --enable-openssl --enable-version3 \
--extra-cflags="-I$HOME/.release/openssl/include" \
--extra-ldflags="-L$HOME/.release/openssl/lib" \
--pkg-config-flags="--static" \
--enable-libx264 --enable-gpl --enable-libopus
make -j$(nproc)
./ffmpeg -version && ./ffmpeg -muxers 2>/dev/null |grep whip
Expand Down Expand Up @@ -705,6 +549,9 @@ jobs:
# Build FFmpeg with WebRTC support
PKG_CONFIG_PATH="$HOME/.release/openssl/lib/pkgconfig" \
./configure --enable-muxer=whip --enable-openssl --enable-version3 \
--extra-cflags="-I$HOME/.release/openssl/include" \
--extra-ldflags="-L$HOME/.release/openssl/lib" \
--pkg-config-flags="--static" \
--enable-libx264 --enable-gpl --enable-libopus
make -j$(nproc)
./ffmpeg -version && ./ffmpeg -muxers 2>/dev/null |grep whip
Expand Down Expand Up @@ -835,8 +682,6 @@ jobs:
- pion
- janus
- asan
- openssl-1-0-1k
- openssl-1-0-2
- openssl-1-1-0h
- openssl-3-0
- openssl-latest
Expand Down
Loading