From 4a100616fc5bc60f1ac18d8637e83ea8f950dbe9 Mon Sep 17 00:00:00 2001 From: chundonglinlin Date: Wed, 1 Nov 2023 17:47:52 +0800 Subject: [PATCH] Support build without cache to test if actions fail. v5.0.196 v6.0.96 (#3858) By default, caching is enabled during compilation, which means that data is cached in Docker. This helps to avoid compiling third-party dependency libraries. However, sometimes when updating third-party libraries, it's necessary to disable caching to temporarily verify if the pipeline can succeed. Therefore, a configure option should be added. When this option is enabled, the compilation cache will not be used, and all third-party libraries will be compiled from scratch. --------- Co-authored-by: winlin --- trunk/auto/depends.sh | 2 +- trunk/auto/options.sh | 6 ++++ trunk/doc/CHANGELOG.md | 2 ++ trunk/research/players/rtc_player.html | 2 +- trunk/research/players/rtc_publisher.html | 2 +- trunk/research/players/srs_bwt.html | 2 +- trunk/research/players/srs_chat.html | 2 +- trunk/research/players/srs_gb28181.html | 2 +- trunk/research/players/srs_player.html | 34 +++++++++---------- .../players/srs_player_deprecated.html | 2 +- trunk/research/players/srs_publisher.html | 2 +- .../research/players/srs_publisher_flash.html | 2 +- trunk/research/players/vlc.html | 2 +- trunk/research/players/whep.html | 10 ++++-- trunk/research/players/whip.html | 10 ++++-- trunk/src/core/srs_core_version5.hpp | 2 +- trunk/src/core/srs_core_version6.hpp | 2 +- 17 files changed, 51 insertions(+), 35 deletions(-) diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index 8c33d58395..e376fb016c 100755 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -189,7 +189,7 @@ fi ##################################################################################### # Use srs-cache from base image. See https://github.com/ossrs/dev-docker/blob/ubuntu20-cache/Dockerfile # Note that the cache for cygwin is not under /usr/local, but copy to objs instead. -if [[ -d /usr/local/srs-cache/srs/trunk/objs && $(pwd) != "/usr/local/srs-cache/srs/trunk" ]]; then +if [[ -d /usr/local/srs-cache/srs/trunk/objs && $(pwd) != "/usr/local/srs-cache/srs/trunk" && $SRS_BUILD_CACHE == YES ]]; then SOURCE_DIR=$(ls -d /usr/local/srs-cache/srs/trunk/objs/Platform-SRS${SRS_MAJOR}-* 2>/dev/null|head -n 1) if [[ -d $SOURCE_DIR ]]; then TARGET_DIR=${SRS_OBJS}/${SRS_PLATFORM} && diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index 9d924d309c..333233a066 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -108,6 +108,8 @@ SRS_CROSS_BUILD_ARCH= SRS_CROSS_BUILD_HOST= # For cross build, the cross prefix, for example(FFmpeg), --cross-prefix=aarch64-linux-gnu- SRS_CROSS_BUILD_PREFIX= +# For cache build +SRS_BUILD_CACHE=YES # ##################################################################################### # Toolchain for cross-build on Ubuntu for ARM or MIPS. @@ -448,6 +450,10 @@ function parse_user_option() { --ffmpeg) SRS_FFMPEG_TOOL=$(switch2value $value) ;; --ffmpeg-tool) SRS_FFMPEG_TOOL=$(switch2value $value) ;; + # use cache for build. + --build-cache) SRS_BUILD_CACHE=YES ;; + --without-build-cache) SRS_BUILD_CACHE=NO ;; + *) echo "$0: error: invalid option \"$option\"" exit 1 diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 20e97cd0a6..9a96b03738 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -7,6 +7,7 @@ The changelog for SRS. ## SRS 6.0 Changelog +* v6.0, 2023-11-01, Merge [#3858](https://github.com/ossrs/srs/pull/3858): Support build without cache to test if actions fail. v6.0.96 (#3858) * v6.0, 2023-10-25, Merge [#3845](https://github.com/ossrs/srs/pull/3845): RTC: Fix FFmpeg opus audio noisy issue. v6.0.95 (#3845) * v6.0, 2023-10-21, Merge [#3847](https://github.com/ossrs/srs/pull/3847): WebRTC: TCP transport should use read_fully instead of read. v6.0.94 (#3847) * v6.0, 2023-10-20, Merge [#3846](https://github.com/ossrs/srs/pull/3846): Added system library option for ffmpeg, srtp, srt libraries. v6.0.93 (#3846) @@ -107,6 +108,7 @@ The changelog for SRS. ## SRS 5.0 Changelog +* v5.0, 2023-11-01, Merge [#3858](https://github.com/ossrs/srs/pull/3858): Support build without cache to test if actions fail. v5.0.196 (#3858) * v5.0, 2023-10-25, Merge [#3845](https://github.com/ossrs/srs/pull/3845): RTC: Fix FFmpeg opus audio noisy issue. v5.0.195 (#3845) * v5.0, 2023-10-21, Merge [#3847](https://github.com/ossrs/srs/pull/3847): WebRTC: TCP transport should use read_fully instead of read. v5.0.194 (#3847) * v5.0, 2023-10-20, Merge [#3846](https://github.com/ossrs/srs/pull/3846): Added system library option for ffmpeg, srtp, srt libraries. v5.0.193 (#3846) diff --git a/trunk/research/players/rtc_player.html b/trunk/research/players/rtc_player.html index 9ee372bb6b..5c02e3c594 100644 --- a/trunk/research/players/rtc_player.html +++ b/trunk/research/players/rtc_player.html @@ -23,7 +23,7 @@ SRS