Skip to content

Commit

Permalink
Cache libc++ build.
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe2933 committed May 9, 2024
1 parent 3dc8c1f commit c9a5efa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,28 @@ jobs:
echo "CC=$(brew --prefix llvm)/bin/clang" >> "$GITHUB_ENV"
echo "CXX=$(brew --prefix llvm)/bin/clang++" >> "$GITHUB_ENV"
- name: Make local build of libc++ with module enabled
- name: Cache libc++ build
id: cache-libcxx
uses: actions/cache@v4
with:
path: llvm-project/build
key: ${{ runner.os }}-libcxx

- name: Make local build of libc++ with Standard Library Module (when cache miss)
if: steps.cache-libcxx.outputs.cache-hit != 'true'
run: |
git clone https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir build
cmake -G Ninja -S runtimes -B build \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind"
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
-DLLVM_INCLUDE_TESTS=OFF
ninja -C build
- name: Configure
run: |
mkdir build
cmake -S . -G Ninja -B build \
cmake -S . -G Ninja -B build \
-DCMAKE_CXX_STANDARD=${{ matrix.std_version }} \
-DLIBCXX_BUILD=${{ github.workspace }}/llvm-project/build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
- name: Configure
run: |
mkdir build
cmake -S . -B build `
-G "Visual Studio 17 2022" -T v143 `
cmake -S . -B build `
-G "Visual Studio 17 2022" -T v143 `
-DCMAKE_CXX_STANDARD=${{ matrix.std_version }} `
-DVCTOOLS_INSTALL_DIR="$env:VCToolsInstallDir"
Expand Down

0 comments on commit c9a5efa

Please sign in to comment.