1
0
Fork 0
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:
winlin 2022-08-13 10:27:14 +08:00
parent d4e5138a58
commit 1fe12b8e8c
7 changed files with 84 additions and 77 deletions

View file

@ -22,16 +22,6 @@ RUN apt-get update && apt-get install -y gcc make g++ patch unzip perl git
COPY . /srs
WORKDIR /srs/trunk
# Use srs-cache from base image.
RUN if [[ -d /usr/local/srs-cache/srs/trunk/objs ]]; then \
./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.
# Note that SRT is enabled by default, so we configure without --srt=on.
RUN ./configure --jobs=${JOBS} && make -j${JOBS} && make install