Support regression test in CI.

pull/2257/head
winlin 4 years ago
parent 212ff6fc2d
commit 5a66d15e85

@ -6,6 +6,7 @@ jobs:
steps: steps:
- checkout - checkout
- run: | - run: |
echo "Build and run SRS baseline" &&
cd trunk && ./configure && make cd trunk && ./configure && make
build-centos7-noasm: build-centos7-noasm:
docker: docker:
@ -13,6 +14,7 @@ jobs:
steps: steps:
- checkout - checkout
- run: | - run: |
echo "Build and run SRS without NASM or SRTP-NASM" &&
cd trunk && ./configure --nasm=off --srtp-nasm=off && make cd trunk && ./configure --nasm=off --srtp-nasm=off && make
build-centos7-gb28181: build-centos7-gb28181:
docker: docker:
@ -20,6 +22,7 @@ jobs:
steps: steps:
- checkout - checkout
- run: | - run: |
echo "Build and run SRS with GB28181" &&
cd trunk && ./configure --gb28181=on && make cd trunk && ./configure --gb28181=on && make
build-centos8-baseline: build-centos8-baseline:
docker: docker:
@ -27,6 +30,7 @@ jobs:
steps: steps:
- checkout - checkout
- run: | - run: |
echo "Build and run SRS for CentOS8" &&
cd trunk && ./configure && make cd trunk && ./configure && make
build-ubuntu20-baseline: build-ubuntu20-baseline:
docker: docker:
@ -34,22 +38,36 @@ jobs:
steps: steps:
- checkout - checkout
- run: | - run: |
echo "Build and run SRS for Ubuntu20" &&
cd trunk && ./configure && make cd trunk && ./configure && make
test: run-utest:
docker: docker:
- image: ossrs/srs:dev - image: ossrs/srs:dev
steps: steps:
- checkout - checkout
- run: | - run: |
cd trunk && echo "Build and run utest for SRS" &&
./configure --gb28181=on --utest=on --gcov=on && make && cd trunk && ./configure --gb28181=on --utest=on --gcov=on && make &&
./objs/srs_utest && bash auto/coverage.sh ./objs/srs_utest && bash auto/coverage.sh
run-regression-test:
docker:
- image: ossrs/srs:dev
steps:
- checkout
- run: |
echo "Build and run SRS with regression config" &&
cd trunk && ./configure && make && ./objs/srs -c conf/regression-test.conf &&
echo "Clone srs-bench for regression test" &&
cd 3rdparty && git clone -b feature/srs --depth=1 https://github.com/ossrs/srs-bench &&
echo "Run srs-bench regression test" &&
cd srs-bench && make && ./objs/srs_test -test.v
workflows: workflows:
version: 2 version: 2
build_and_test: build_and_test:
jobs: jobs:
- build-centos7-baseline - build-centos7-baseline
- test - run-utest
- run-regression-test
- build-centos7-noasm - build-centos7-noasm
- build-centos7-gb28181 - build-centos7-gb28181
- build-centos8-baseline - build-centos8-baseline

@ -0,0 +1,54 @@
listen 1935;
max_connections 1000;
daemon on;
srs_log_tank file;
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
http_api {
enabled on;
listen 1985;
}
stats {
network 0;
}
rtc_server {
enabled on;
# Listen at udp://8000
listen 8000;
#
# The $CANDIDATE means fetch from env, if not configed, use * as default.
#
# The * means retrieving server IP automatically, from all network interfaces,
# @see https://github.com/ossrs/srs/issues/307#issuecomment-599028124
candidate $CANDIDATE;
}
vhost __defaultVhost__ {
rtc {
enabled on;
bframe discard;
}
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
ingest livestream {
enabled on;
input {
type file;
url ./doc/source.200kbps.768x320.flv;
}
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine {
enabled off;
output rtmp://127.0.0.1:[port]/live/livestream;
}
}
}

4
trunk/configure vendored

@ -192,8 +192,8 @@ if [[ $SRS_GCOV == YES ]]; then
SrsLinkOptions="${SrsLinkOptions} ${SrsGcov}"; SrsLinkOptions="${SrsLinkOptions} ${SrsGcov}";
fi fi
# For FFMPEG/RTC. # For FFMPEG/RTC on Linux.
if [[ $SRS_RTC == YES && $SRS_FFMPEG_FIT == YES ]]; then if [[ $SRS_OSX != YES && $SRS_RTC == YES && $SRS_FFMPEG_FIT == YES ]]; then
SrsLinkOptions="${SrsLinkOptions} -lrt"; SrsLinkOptions="${SrsLinkOptions} -lrt";
fi fi

Loading…
Cancel
Save