1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Actions: Fix GitHub actions warnings.

This commit is contained in:
winlin 2022-12-25 17:00:07 +08:00
parent f6e0b1c894
commit 23b7939574
6 changed files with 106 additions and 114 deletions

View file

@ -2,10 +2,13 @@ ARG ARCH
ARG IMAGE=ossrs/srs:ubuntu20
FROM ${ARCH}${IMAGE} AS build
ARG CONFARGS
ARG MAKEARGS
ARG INSTALLDEPENDS
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG SRS_AUTO_PACKAGER
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, PACKAGER: ${#SRS_AUTO_PACKAGER}"
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, PACKAGER: ${#SRS_AUTO_PACKAGER}, CONFARGS: ${CONFARGS}, MAKEARGS: ${MAKEARGS}, INSTALLDEPENDS: ${INSTALLDEPENDS}"
# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
ENV DEBIAN_FRONTEND noninteractive
@ -15,7 +18,9 @@ ENV DEBIAN_FRONTEND noninteractive
SHELL ["/bin/bash", "-c"]
# Install depends tools.
RUN apt-get update && apt-get install -y gcc make g++ patch unzip perl git libasan5
RUN if [[ $INSTALLDEPENDS != 'NO' ]]; then \
apt-get update && apt-get install -y gcc make g++ patch unzip perl git libasan5; \
fi
# Copy source code to docker.
COPY . /srs
@ -24,7 +29,7 @@ WORKDIR /srs/trunk
# Build and install SRS.
# Note that SRT is enabled by default, so we configure without --srt=on.
# Note that we have copied all files by make install.
RUN ./configure --gb28181=on --sanitizer-static=on && make && make install
RUN ./configure --gb28181=on --sanitizer-static=on ${CONFARGS} && make ${MAKEARGS} && make install
############################################################
# dist

View file

@ -40,6 +40,8 @@ SRS_FFMPEG_FIT=RESERVED
SRS_PREFIX=/usr/local/srs
SRS_DEFAULT_CONFIG=conf/srs.conf
SRS_JOBS=1
# If enabled, force to use SRS_JOBS for make on linux, however you're able to overwrite by -jN on macOS.
SRS_FORCE_MAKE_JOBS=YES
SRS_STATIC=NO
# If enabled, link shared libraries for libst.so which uses MPL license.
# See https://ossrs.net/lts/zh-cn/license#state-threads
@ -243,6 +245,7 @@ function parse_user_option() {
--help) help=yes ;;
--jobs) SRS_JOBS=${value} ;;
--force-make-jobs) SRS_FORCE_MAKE_JOBS=${value} ;;
--prefix) SRS_PREFIX=${value} ;;
--config) SRS_DEFAULT_CONFIG=${value} ;;

17
trunk/configure vendored
View file

@ -494,15 +494,22 @@ SRS_PREFIX=${SRS_PREFIX}
SRS_DEFAULT_CONFIG=${SRS_DEFAULT_CONFIG}
__REAL_INSTALL=\$(DESTDIR)\$(SRS_PREFIX)
SRS_FORCE_MAKE_JOBS=${SRS_FORCE_MAKE_JOBS}
END
if [[ $SRS_FORCE_MAKE_JOBS == YES ]]; then
cat << END >> ${SRS_MAKEFILE}
JOBS=\$(shell echo \$(MAKEFLAGS)| grep -qE '\-j[0-9]+' || echo " ${SRS_JOBS}")
END
fi
# the real entry for all platform:
cat << END >> ${SRS_MAKEFILE}
default: server
all: _default
END
# the real entry for all platform:
cat << END >> ${SRS_MAKEFILE}
_default: server srs_ingest_hls utest $__mdefaults
help:
@ -579,7 +586,7 @@ END
cat << END >> ${SRS_MAKEFILE}
server: _prepare_dir
@echo "Build the SRS server"
@echo "Build the SRS server, JOBS=\${JOBS}, FORCE_MAKE_JOBS=${SRS_FORCE_MAKE_JOBS}"
\$(MAKE)\$(JOBS) -f ${SRS_OBJS}/Makefile srs
@bash objs/_srs_build_summary.sh