Skip to content

Commit

Permalink
Use sccache to speed up verify build.
Browse files Browse the repository at this point in the history
  • Loading branch information
mysterymath committed Feb 7, 2023
1 parent d2436cb commit 8a981e3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,23 @@ jobs:
with:
repository: 'llvm-mos/llvm-mos'
path: 'llvm-mos'
- 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 the compiler.
run: |
cd llvm-mos
cmake -C clang/cmake/caches/MOS.cmake -G Ninja -S llvm -B build -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_USE_LINKER=lld
cmake -C clang/cmake/caches/MOS.cmake -G Ninja -S llvm -B build -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_USE_LINKER=lld -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
cd build
cmake --build . --target clang lld llvm-ar llvm-ranlib llvm-size llvm-mlb
- name: Archive the compiler.
Expand Down

0 comments on commit 8a981e3

Please sign in to comment.