[PATCH] D129880: workflows: Use sccache to speed up CI builds
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 09:53:43 PDT 2022
tstellar created this revision.
tstellar added reviewers: alexbatashev, asl.
Herald added a project: All.
tstellar requested review of this revision.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129880
Files:
.github/workflows/llvm-project-tests.yml
Index: .github/workflows/llvm-project-tests.yml
===================================================================
--- .github/workflows/llvm-project-tests.yml
+++ .github/workflows/llvm-project-tests.yml
@@ -44,9 +44,25 @@
arch: amd64
- name: Install Ninja
uses: llvm/actions/install-ninja at main
+ # actions/checkout deletes any existing files in the new git directory,
+ # so this needs to either run before ccache-action or it has to use
+ # clean: false.
- uses: actions/checkout at v3
with:
fetch-depth: 250
+ - name: Setup ccache
+ uses: hendrikmuhs/ccache-action at v1.2
+ with:
+ # A full build of llvm, clang, lld, and lldb takes about 250MB
+ # of ccache space. There's not much reason to have more than this,
+ # because we usually won't need to save cache entries from older
+ # builds. Also, there is an overall 10GB cache limit, and each
+ # run creates a new cache entry so we want to ensure that we have
+ # enough cache space for all the tests to run at once and still
+ # fit under the 10 GB limit.
+ max-size: 500M
+ key: sccache-${{ matrix.os }}
+ variant: sccache
- name: Build and Test
uses: llvm/actions/build-test-llvm-project at main
env:
@@ -54,7 +70,7 @@
# This should be a no-op for non-mac OSes
PKG_CONFIG_PATH: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig//11
with:
- cmake_args: '-GNinja -DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" -DCMAKE_BUILD_TYPE=Release -DLLDB_INCLUDE_TESTS=OFF'
+ cmake_args: '-GNinja -DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" -DCMAKE_BUILD_TYPE=Release -DLLDB_INCLUDE_TESTS=OFF -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache'
build_target: '${{ inputs.build_target }}'
- name: Build and Test libclc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129880.445036.patch
Type: text/x-patch
Size: 1965 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220715/c1552fef/attachment.bin>
More information about the llvm-commits
mailing list