diff options
author | Tom Stellard <tstellar@redhat.com> | 2022-07-26 17:24:18 -0700 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2022-07-26 17:25:26 -0700 |
commit | 858ded9cba11aa108eaa67433983cb3af14f6fbf (patch) | |
tree | da123a1f8e61e3e1fbafba61c6116514010104db | |
parent | c99b9cf45a9232175949d2ff2b535b456c379775 (diff) |
workflows: Use sccache to speed up CI builds
Reviewed By: asl
Differential Revision: https://reviews.llvm.org/D129880
-rw-r--r-- | .github/workflows/llvm-project-tests.yml | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/.github/workflows/llvm-project-tests.yml b/.github/workflows/llvm-project-tests.yml index 70c2528b5b96..4910ddbe5cfd 100644 --- a/.github/workflows/llvm-project-tests.yml +++ b/.github/workflows/llvm-project-tests.yml @@ -50,9 +50,25 @@ jobs: arch: amd64 - name: Install Ninja uses: llvm/actions/install-ninja@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@v3 with: fetch-depth: 250 + - name: Setup ccache + uses: hendrikmuhs/ccache-action@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@main env: @@ -60,7 +76,7 @@ jobs: # 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 |