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

For test docker image, use cache eventhough the kernel changed. v5.0.37

This commit is contained in:
winlin 2022-08-08 21:39:42 +08:00
parent 14832b66eb
commit f44b694a17
4 changed files with 13 additions and 5 deletions

View file

@ -24,9 +24,12 @@ WORKDIR /srs/trunk
# Use srs-cache from base image. # Use srs-cache from base image.
RUN if [[ -d /usr/local/srs-cache/srs/trunk/objs ]]; then \ RUN if [[ -d /usr/local/srs-cache/srs/trunk/objs ]]; then \
echo "Build from cache of base image" && mkdir -p objs && \ ./configure --generate-objs=on && \
cp -R /usr/local/srs-cache/srs/trunk/objs/Platform-* objs/ && \ SOURCE_DIR=$(ls -d /usr/local/srs-cache/srs/trunk/objs/Platform-*) && \
du -sh objs/*; \ TARGET_DIR=$(ls -d objs/Platform-*) && \
echo "Build from cache, source=$SOURCE_DIR, target=$TARGET_DIR" && \
rm -rf $TARGET_DIR && mv $SOURCE_DIR $TARGET_DIR && \
du -sh $TARGET_DIR && ls -lh objs; \
fi fi
# Build and install SRS. # Build and install SRS.

View file

@ -63,6 +63,7 @@ SRS_VALGRIND=NO
SRS_BUILD_TAG= # Set the object files tag name. SRS_BUILD_TAG= # Set the object files tag name.
SRS_CLEAN=YES # Whether do "make clean" when configure. SRS_CLEAN=YES # Whether do "make clean" when configure.
SRS_SIMULATOR=NO # Whether enable RTC simulate API. SRS_SIMULATOR=NO # Whether enable RTC simulate API.
SRS_GENERATE_OBJS=NO # Whether generate objs and quit.
# #
################################################################ ################################################################
# Performance options. # Performance options.
@ -173,6 +174,7 @@ Experts:
--shared-ffmpeg=on|off Use shared libraries for FFmpeg which is LGPL license. Default: $(value2switch $SRS_SHARED_FFMPEG) --shared-ffmpeg=on|off Use shared libraries for FFmpeg which is LGPL license. Default: $(value2switch $SRS_SHARED_FFMPEG)
--clean=on|off Whether do 'make clean' when configure. Default: $(value2switch $SRS_CLEAN) --clean=on|off Whether do 'make clean' when configure. Default: $(value2switch $SRS_CLEAN)
--simulator=on|off RTC: Whether enable network simulator. Default: $(value2switch $SRS_SIMULATOR) --simulator=on|off RTC: Whether enable network simulator. Default: $(value2switch $SRS_SIMULATOR)
--generate-objs=on|off RTC: Whether generate objs and quit. Default: $(value2switch $SRS_GENERATE_OBJS)
--build-tag=<TAG> Set the build object directory suffix. --build-tag=<TAG> Set the build object directory suffix.
Workflow: Workflow:
@ -287,6 +289,7 @@ function parse_user_option() {
--without-rtc) SRS_RTC=NO ;; --without-rtc) SRS_RTC=NO ;;
--rtc) SRS_RTC=$(switch2value $value) ;; --rtc) SRS_RTC=$(switch2value $value) ;;
--simulator) SRS_SIMULATOR=$(switch2value $value) ;; --simulator) SRS_SIMULATOR=$(switch2value $value) ;;
--generate-objs) SRS_GENERATE_OBJS=$(switch2value $value) ;;
--ffmpeg-fit) SRS_FFMPEG_FIT=$(switch2value $value) ;; --ffmpeg-fit) SRS_FFMPEG_FIT=$(switch2value $value) ;;
--cxx11) SRS_CXX11=$(switch2value $value) ;; --cxx11) SRS_CXX11=$(switch2value $value) ;;

4
trunk/configure vendored
View file

@ -29,8 +29,10 @@ BLACK="\\033[0m"
# We don't need to cleanup the exists files. # We don't need to cleanup the exists files.
rm -f ${SRS_WORKDIR}/${SRS_MAKEFILE} rm -f ${SRS_WORKDIR}/${SRS_MAKEFILE}
# create objs # Create objs and platform directories.
mkdir -p ${SRS_OBJS}/${SRS_PLATFORM} mkdir -p ${SRS_OBJS}/${SRS_PLATFORM}
# If only generate objs directory, quit without error.
if [[ $SRS_GENERATE_OBJS == YES ]]; then exit 0; fi
# apply user options. # apply user options.
. auto/depends.sh . auto/depends.sh

View file

@ -9,6 +9,6 @@
#define VERSION_MAJOR 5 #define VERSION_MAJOR 5
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_REVISION 35 #define VERSION_REVISION 37
#endif #endif