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

pull/3150/head
winlin 3 years ago
parent 14832b66eb
commit f44b694a17

@ -24,9 +24,12 @@ WORKDIR /srs/trunk
# Use srs-cache from base image.
RUN if [[ -d /usr/local/srs-cache/srs/trunk/objs ]]; then \
echo "Build from cache of base image" && mkdir -p objs && \
cp -R /usr/local/srs-cache/srs/trunk/objs/Platform-* objs/ && \
du -sh objs/*; \
./configure --generate-objs=on && \
SOURCE_DIR=$(ls -d /usr/local/srs-cache/srs/trunk/objs/Platform-*) && \
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
# Build and install SRS.

@ -63,6 +63,7 @@ SRS_VALGRIND=NO
SRS_BUILD_TAG= # Set the object files tag name.
SRS_CLEAN=YES # Whether do "make clean" when configure.
SRS_SIMULATOR=NO # Whether enable RTC simulate API.
SRS_GENERATE_OBJS=NO # Whether generate objs and quit.
#
################################################################
# 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)
--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)
--generate-objs=on|off RTC: Whether generate objs and quit. Default: $(value2switch $SRS_GENERATE_OBJS)
--build-tag=<TAG> Set the build object directory suffix.
Workflow:
@ -287,6 +289,7 @@ function parse_user_option() {
--without-rtc) SRS_RTC=NO ;;
--rtc) SRS_RTC=$(switch2value $value) ;;
--simulator) SRS_SIMULATOR=$(switch2value $value) ;;
--generate-objs) SRS_GENERATE_OBJS=$(switch2value $value) ;;
--ffmpeg-fit) SRS_FFMPEG_FIT=$(switch2value $value) ;;
--cxx11) SRS_CXX11=$(switch2value $value) ;;

4
trunk/configure vendored

@ -29,8 +29,10 @@ BLACK="\\033[0m"
# We don't need to cleanup the exists files.
rm -f ${SRS_WORKDIR}/${SRS_MAKEFILE}
# create objs
# Create objs and platform directories.
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.
. auto/depends.sh

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

Loading…
Cancel
Save