diff --git a/.circleci/config.yml b/.circleci/config.yml index e286e6387..7c9ec8a18 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,6 +6,7 @@ jobs: steps: - checkout - run: | + echo "Build and run SRS baseline" && cd trunk && ./configure && make build-centos7-noasm: docker: @@ -13,6 +14,7 @@ jobs: steps: - checkout - run: | + echo "Build and run SRS without NASM or SRTP-NASM" && cd trunk && ./configure --nasm=off --srtp-nasm=off && make build-centos7-gb28181: docker: @@ -20,6 +22,7 @@ jobs: steps: - checkout - run: | + echo "Build and run SRS with GB28181" && cd trunk && ./configure --gb28181=on && make build-centos8-baseline: docker: @@ -27,6 +30,7 @@ jobs: steps: - checkout - run: | + echo "Build and run SRS for CentOS8" && cd trunk && ./configure && make build-ubuntu20-baseline: docker: @@ -34,22 +38,36 @@ jobs: steps: - checkout - run: | + echo "Build and run SRS for Ubuntu20" && cd trunk && ./configure && make - test: + run-utest: docker: - image: ossrs/srs:dev steps: - checkout - run: | - cd trunk && - ./configure --gb28181=on --utest=on --gcov=on && make && + echo "Build and run utest for SRS" && + cd trunk && ./configure --gb28181=on --utest=on --gcov=on && make && ./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: version: 2 build_and_test: jobs: - build-centos7-baseline - - test + - run-utest + - run-regression-test - build-centos7-noasm - build-centos7-gb28181 - build-centos8-baseline diff --git a/trunk/conf/regression-test.conf b/trunk/conf/regression-test.conf new file mode 100644 index 000000000..fcb348f12 --- /dev/null +++ b/trunk/conf/regression-test.conf @@ -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; + } + } +} + diff --git a/trunk/configure b/trunk/configure index e5bb595ba..70a8319f9 100755 --- a/trunk/configure +++ b/trunk/configure @@ -192,8 +192,8 @@ if [[ $SRS_GCOV == YES ]]; then SrsLinkOptions="${SrsLinkOptions} ${SrsGcov}"; fi -# For FFMPEG/RTC. -if [[ $SRS_RTC == YES && $SRS_FFMPEG_FIT == YES ]]; then +# For FFMPEG/RTC on Linux. +if [[ $SRS_OSX != YES && $SRS_RTC == YES && $SRS_FFMPEG_FIT == YES ]]; then SrsLinkOptions="${SrsLinkOptions} -lrt"; fi