Skip to content

Commit

Permalink
Windows: Merge develop for configure scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Nov 18, 2022
2 parents acbb9a0 + 60ba0cf commit bec00b7
Show file tree
Hide file tree
Showing 42 changed files with 935 additions and 763 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
run: |
echo "pwd: $(pwd), who: $(whoami)"
docker run --rm -v $(pwd):$(pwd) -w $(pwd)/trunk ossrs/srs:ubuntu20-cache \
bash -c "./configure --jobs=2 && chmod 777 -R objs"
cd trunk && ./configure --jobs=2 && make -j2
bash -c "./configure && chmod 777 -R objs"
cd trunk && ./configure && make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
run: docker run --rm srs:test bash -c 'make utest && ./objs/srs_utest'
# For regression-test
- name: Run SRS regression-test
run: docker run --rm srs:test bash -c 'make && ./objs/srs -c conf/regression-test.conf && cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v'
run: docker run --rm srs:test bash -c 'make && (./objs/srs -c conf/regression-test.conf; ./etc/init.d/srs status) && cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v'

coverage:
name: coverage
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

.idea
.DS_Store
*.heap

cmake-build-debug
/trunk/ide/srs_clion/CMakeCache.txt
Expand Down
5 changes: 2 additions & 3 deletions trunk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ FROM ${ARCH}${IMAGE} AS build

ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG JOBS=2
ARG SRS_AUTO_PACKAGER
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, JOBS: $JOBS, PACKAGER: ${#SRS_AUTO_PACKAGER}"
RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, PACKAGER: ${#SRS_AUTO_PACKAGER}"

# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
ENV DEBIAN_FRONTEND noninteractive
Expand All @@ -24,7 +23,7 @@ WORKDIR /srs/trunk

# Build and install SRS.
# Note that SRT is enabled by default, so we configure without --srt=on.
RUN ./configure --jobs=${JOBS} --gb28181=on --sanitizer-static=on && make -j${JOBS} && make install
RUN ./configure --gb28181=on --sanitizer-static=on && make && make install

# All config files for SRS.
RUN cp -R conf /usr/local/srs/conf && \
Expand Down
34 changes: 17 additions & 17 deletions trunk/Dockerfile.builds
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
########################################################
FROM ossrs/srs:dev-cache AS centos7-baseline
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off --gb28181=off && make -j2
RUN cd /srs/trunk && ./configure --srt=off --gb28181=off && make

FROM ossrs/srs:dev-cache AS centos7-no-webrtc
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off --gb28181=off --rtc=off && make -j2
RUN cd /srs/trunk && ./configure --srt=off --gb28181=off --rtc=off && make

FROM ossrs/srs:dev-cache AS centos7-no-asm
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off --gb28181=off --nasm=off --srtp-nasm=off && make -j2
RUN cd /srs/trunk && ./configure --srt=off --gb28181=off --nasm=off --srtp-nasm=off && make

FROM ossrs/srs:dev-cache AS centos7-all
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=on --gb28181=on && make -j2
RUN cd /srs/trunk && ./configure --srt=on --gb28181=on && make

FROM ossrs/srs:dev-cache AS centos7-ansi-no-ffmpeg
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off --gb28181=off --cxx11=off --cxx14=off --ffmpeg-fit=off && make -j2
RUN cd /srs/trunk && ./configure --srt=off --gb28181=off --cxx11=off --cxx14=off --ffmpeg-fit=off && make

########################################################
FROM ossrs/srs:dev6-cache AS centos6-baseline
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off --gb28181=off --cxx11=off --cxx14=off --sanitizer=off && make -j2
RUN cd /srs/trunk && ./configure --srt=off --gb28181=off --cxx11=off --cxx14=off --sanitizer=off && make

FROM ossrs/srs:dev6-cache AS centos6-all
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=on --gb28181=on --cxx11=off --cxx14=off --sanitizer=off && make -j2
RUN cd /srs/trunk && ./configure --srt=on --gb28181=on --cxx11=off --cxx14=off --sanitizer=off && make

########################################################
FROM ossrs/srs:ubuntu16-cache AS ubuntu16-baseline
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off --gb28181=off && make -j2
RUN cd /srs/trunk && ./configure --srt=off --gb28181=off && make

FROM ossrs/srs:ubuntu16-cache AS ubuntu16-all
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=on --gb28181=on && make -j2
RUN cd /srs/trunk && ./configure --srt=on --gb28181=on && make

########################################################
FROM ossrs/srs:ubuntu18-cache AS ubuntu18-baseline
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off --gb28181=off && make -j2
RUN cd /srs/trunk && ./configure --srt=off --gb28181=off && make

FROM ossrs/srs:ubuntu18-cache AS ubuntu18-all
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=on --gb28181=on && make -j2
RUN cd /srs/trunk && ./configure --srt=on --gb28181=on && make

########################################################
FROM ossrs/srs:ubuntu20-cache AS ubuntu20-baseline
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=off --gb28181=off && make -j2
RUN cd /srs/trunk && ./configure --srt=off --gb28181=off && make

FROM ossrs/srs:ubuntu20-cache AS ubuntu20-all
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --srt=on --gb28181=on && make -j2
RUN cd /srs/trunk && ./configure --srt=on --gb28181=on && make

########################################################
FROM ossrs/srs:ubuntu16-cross-arm AS ubuntu16-cross-armv7
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --cross-build --cross-prefix=arm-linux-gnueabihf- && make -j2
RUN cd /srs/trunk && ./configure --cross-build --cross-prefix=arm-linux-gnueabihf- && make

FROM ossrs/srs:ubuntu16-cross-aarch64 AS ubuntu16-cross-aarch64
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --cross-build --cross-prefix=aarch64-linux-gnu- && make -j2
RUN cd /srs/trunk && ./configure --cross-build --cross-prefix=aarch64-linux-gnu- && make

########################################################
FROM ossrs/srs:ubuntu20-cross-arm AS ubuntu20-cross-armv7
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --cross-build --cross-prefix=arm-linux-gnueabihf- && make -j2
RUN cd /srs/trunk && ./configure --cross-build --cross-prefix=arm-linux-gnueabihf- && make

FROM ossrs/srs:ubuntu20-cross-aarch64 AS ubuntu20-cross-aarch64
COPY . /srs
RUN cd /srs/trunk && ./configure --jobs=2 --cross-build --cross-prefix=aarch64-linux-gnu- && make -j2
RUN cd /srs/trunk && ./configure --cross-build --cross-prefix=aarch64-linux-gnu- && make
4 changes: 2 additions & 2 deletions trunk/Dockerfile.cov
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ COPY . /srs
WORKDIR /srs/trunk

# Note that we must enable the gcc7 or link failed.
RUN scl enable devtoolset-7 -- ./configure --srt=on --gb28181=on --utest=on --gcov=on --sanitizer=off --jobs=2
RUN scl enable devtoolset-7 -- make -j2 utest
RUN scl enable devtoolset-7 -- ./configure --srt=on --gb28181=on --utest=on --gcov=on --sanitizer=off
RUN scl enable devtoolset-7 -- make utest
2 changes: 1 addition & 1 deletion trunk/Dockerfile.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ RUN yum install -y zip
# Build and install SRS.
ADD srs-server-${version}.tar.gz /srs
WORKDIR /srs/srs-server-${version}/trunk
RUN ./scripts/package.sh --x86-x64 --jobs=2 --tag=${version}
RUN ./scripts/package.sh --x86-x64 --tag=${version}

4 changes: 2 additions & 2 deletions trunk/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ COPY . /srs
WORKDIR /srs/trunk

# Note that we must enable the gcc7 or link failed.
RUN scl enable devtoolset-7 -- ./configure --srt=on --gb28181=on --utest=on --sanitizer=off --jobs=2
RUN scl enable devtoolset-7 -- make -j2 utest
RUN scl enable devtoolset-7 -- ./configure --srt=on --gb28181=on --utest=on
RUN scl enable devtoolset-7 -- make utest

# Build benchmark tool.
RUN cd 3rdparty/srs-bench && make
Expand Down
17 changes: 9 additions & 8 deletions trunk/auto/apps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
#
# params:
# $SRS_OBJS the objs directory to store the Makefile. ie. ./objs
# $SRS_OBJS_DIR the objs directory for Makefile. ie. objs
# $SRS_MAKEFILE the makefile name. ie. Makefile
# $SRS_OBJS the objs directory for Makefile. ie. objs
#
# $MAIN_ENTRANCES array, disable all except the $APP_MAIN itself. ie. ["srs_main_server"]
# $APP_MAIN the object file that contains main function. ie. srs_main_server
Expand All @@ -13,9 +12,9 @@
# $ModuleLibFiles array, the 3rdpart library file to link with. ie. [objs/st-1.9/obj/libst.a objs/libx264/obj/libx264.a]
# $LINK_OPTIONS the linker options. ie. -ldl

FILE=${SRS_OBJS}/${SRS_MAKEFILE}
FILE=${SRS_OBJS}/Makefile

APP_TARGET="${SRS_OBJS_DIR}/${APP_NAME}"
APP_TARGET="${SRS_OBJS}/${APP_NAME}"

echo "Generating app ${APP_NAME} depends.";

Expand All @@ -40,15 +39,16 @@ for item in ${MODULE_OBJS[*]}; do
fi
done

if [ ! -f ${item} ]; then
if [ ! -f ${SRS_WORKDIR}/${item} ]; then
ignored=1
fi

if [ ${ignored} == 1 ]; then
echo "Ignore file ${FILE_NAME}"
continue;
fi

OBJ_FILE=${SRS_OBJS_DIR}/$item
OBJ_FILE=${SRS_OBJS}/$item
OBJ_FILE="${OBJ_FILE%.*}.o"
echo -n "${OBJ_FILE} " >> ${FILE}
done
Expand All @@ -71,15 +71,16 @@ for item in ${MODULE_OBJS[*]}; do
fi
done

if [ ! -f ${item} ]; then
if [ ! -f ${SRS_WORKDIR}/${item} ]; then
ignored=1
fi

if [ ${ignored} == 1 ]; then
echo "Ignore file ${FILE_NAME}"
continue;
fi

OBJ_FILE=${SRS_OBJS_DIR}/$item
OBJ_FILE=${SRS_OBJS}/$item
OBJ_FILE="${OBJ_FILE%.*}.o"
echo -n "${OBJ_FILE} " >> ${FILE}
done
Expand Down
Loading

0 comments on commit bec00b7

Please sign in to comment.