Skip to content

Commit

Permalink
Merge pull request #10 from stripe2933/latest-llvm
Browse files Browse the repository at this point in the history
Use latest LLVM and cache libc++ build.
  • Loading branch information
stripe2933 authored May 9, 2024
2 parents 09fdbf4 + a5aeb4b commit 08f5e25
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,37 @@ jobs:
- name: Get LLVM and Ninja via Homebrew
run: |
brew install llvm ninja
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
CC=$(brew --prefix llvm)/bin/clang \
CXX=$(brew --prefix llvm)/bin/clang++ \
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
CC=$(brew --prefix llvm)/bin/clang \
CXX=$(brew --prefix llvm)/bin/clang++ \
cmake -S . -G Ninja -B build \
-DCMAKE_CXX_STANDARD=${{ matrix.std_version }} \
-DLIBCXX_BUILD=${{ github.workspace }}/llvm-project/build
- name: Build
run: |
ninja -C build
cmake --build build -t CppStandardLibraryModule --config Release
- name: Run executable
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ 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"
- name: Build
run: |
cmake --build build --config Release -j4
cmake --build build -t CppStandardLibraryModule --config Release
- name: Run executable
run: |
Expand Down

0 comments on commit 08f5e25

Please sign in to comment.