From ae29081f97c5b1e6b2b4f43dde2a72914831995c Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 25 Apr 2018 09:48:15 -0400 Subject: [PATCH] Only use sccache for shared(debug) builds --- .circleci/config.yml | 26 ++++++++++++++++++-------- vsts.yml | 15 +++++++++++---- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f49bbfc3f..64a68542c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,9 +15,6 @@ jobs: - run: name: Update command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache - - run: - name: Check sccache stats before build - command: script/sccache -s - run: name: Build shared library command: script/build -t $TARGET_ARCH -c $COMPONENT @@ -56,7 +53,7 @@ jobs: command: script/bootstrap - run: name: Update - command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache + command: script/update --clean -t $TARGET_ARCH - run: name: Build static library command: script/build -t $TARGET_ARCH -c $COMPONENT @@ -99,6 +96,9 @@ jobs: - run: name: Build FFmpeg command: script/build -t $TARGET_ARCH -c ffmpeg + - run: + name: Check sccache stats after build + command: script/sccache -s - run: name: Create distribution command: script/create-dist -t $TARGET_ARCH -c $COMPONENT @@ -128,7 +128,7 @@ jobs: command: script/bootstrap - run: name: Update - command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache + command: script/update --clean -t $TARGET_ARCH - run: name: Build static library command: script/build -t $TARGET_ARCH -c $COMPONENT @@ -174,6 +174,9 @@ jobs: - run: name: Build FFmpeg command: script/build -t $TARGET_ARCH -c ffmpeg + - run: + name: Check sccache stats after build + command: script/sccache -s - run: name: Create shared distribution command: script/create-dist -t $TARGET_ARCH -c $COMPONENT @@ -208,7 +211,7 @@ jobs: command: script/bootstrap - run: name: Update - command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache + command: script/update --clean -t $TARGET_ARCH - run: name: Build static library command: script/build -t $TARGET_ARCH -c $COMPONENT @@ -254,6 +257,9 @@ jobs: - run: name: Build FFmpeg command: script/build -t $TARGET_ARCH -c ffmpeg + - run: + name: Check sccache stats after build + command: script/sccache -s - run: name: Create shared distribution command: script/create-dist -t $TARGET_ARCH -c $COMPONENT @@ -288,7 +294,7 @@ jobs: command: script/bootstrap - run: name: Update - command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache + command: script/update --clean -t $TARGET_ARCH - run: name: Build static library command: script/build -t $TARGET_ARCH -c $COMPONENT @@ -331,6 +337,9 @@ jobs: - run: name: Build FFmpeg command: script/build -t $TARGET_ARCH -c ffmpeg + - run: + name: Check sccache stats after build + command: script/sccache -s - run: name: Create distribution command: script/create-dist -t $TARGET_ARCH -c $COMPONENT @@ -360,7 +369,8 @@ jobs: command: script/bootstrap - run: name: Update - command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache + command: script/update --clean -t $TARGET_ARCH + - run: name: Build static library command: script/build -t $TARGET_ARCH -c $COMPONENT diff --git a/vsts.yml b/vsts.yml index 239ded32b..f831a9f06 100644 --- a/vsts.yml +++ b/vsts.yml @@ -47,17 +47,24 @@ phases: - bash: | echo "===Updating for $TARGET_ARCH===" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) - script/update --clean -t $TARGET_ARCH --use-bundled-sccache > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) + if [ "$COMPONENT" == "shared_library" ]; then + script/update --clean -t $TARGET_ARCH --use-bundled-sccache > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) + else + script/update --clean -t $TARGET_ARCH > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) name: Update - bash: | - script/sccache --start-server --azure_container $(SCCACHE_AZURE_BLOB_CONTAINER) --azure_connection "$(SCCACHE_AZURE_CONNECTION_STRING)" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) - script/sccache -s > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) + if [ "$COMPONENT" == "shared_library" ]; then + script/sccache --start-server --azure_container $(SCCACHE_AZURE_BLOB_CONTAINER) --azure_connection "$(SCCACHE_AZURE_CONNECTION_STRING)" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) + script/sccache -s > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) + fi echo "===Building $COMPONENT for $TARGET_ARCH===" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) script/build -t $TARGET_ARCH -c $COMPONENT > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) echo "===Building ffmpeg for $TARGET_ARCH===" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) script/build -t $TARGET_ARCH -c ffmpeg > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) - script/sccache --stop-server > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) + if [ "$COMPONENT" == "shared_library" ]; then + script/sccache --stop-server > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2) + fi name: Build - bash: |