mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Speedup test by using cache image.
This commit is contained in:
parent
d4e5138a58
commit
1fe12b8e8c
7 changed files with 84 additions and 77 deletions
|
@ -369,6 +369,22 @@ if [[ $OS_IS_UBUNTU = NO && $OS_IS_CENTOS = NO && $OS_IS_OSX = NO && $SRS_CROSS_
|
|||
exit 1
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
# Try to load cache if exists /usr/local/srs-cache
|
||||
#####################################################################################
|
||||
# Use srs-cache from base image.
|
||||
if [[ -d /usr/local/srs-cache/srs/trunk/objs && $(pwd) != "/usr/local/srs-cache/srs/trunk" ]]; then
|
||||
SOURCE_DIR=$(ls -d /usr/local/srs-cache/srs/trunk/objs/Platform-* 2>/dev/null|head -n 1)
|
||||
if [[ -d $SOURCE_DIR ]]; then
|
||||
TARGET_DIR=${SRS_OBJS}/${SRS_PLATFORM} &&
|
||||
echo "Build from cache, source=$SOURCE_DIR, target=$TARGET_DIR" &&
|
||||
rm -rf $TARGET_DIR && mkdir -p ${SRS_OBJS} && cp -R $SOURCE_DIR $TARGET_DIR &&
|
||||
du -sh /usr/local/srs-cache/srs/trunk/objs/Platform-* &&
|
||||
du -sh objs/Platform-* &&
|
||||
ls -lh objs
|
||||
fi
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
# state-threads
|
||||
#####################################################################################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue