Skip to content

Fix CI.

Fix CI. #172

Workflow file for this run

name: Clang
on:
push:
branches:
- '**'
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * 0'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
std_version: [20, 23]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Add homebrew to PATH (Linux only)
if: runner.os == 'Linux'
run: |
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
- name: Get LLVM and Ninja via Homebrew
run: |
brew install llvm ninja
- name: Make local build of libc++ with module enabled
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"
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
- name: Run executable
run: |
./build/CppStandardLibraryModule