Skip to content

Register analysis managers in generateLLVM #59

Register analysis managers in generateLLVM

Register analysis managers in generateLLVM #59

Workflow file for this run

name: Build
on:
pull_request:
branches: [main]
env:
LLVM_DEPS: llvm-19 llvm-19-dev clang-19 python3 ninja-build cmake
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache apt packages
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: ${{ env.LLVM_DEPS }}
version: 1.0
- name: Configure
run: |
cmake -S . -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_DIR=/usr/lib/llvm-19 \
-DCMAKE_C_COMPILER=clang-19 \
-DCMAKE_CXX_COMPILER=clang++-19
- name: Build
run: cmake --build build
- name: Test
run: cmake --build build --target test
tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache apt packages
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: ${{ env.LLVM_DEPS }} clang-tidy-19
version: 1.0
- name: Configure
run: |
cmake -S . -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_DIR=/usr/lib/llvm-19 \
-DCMAKE_C_COMPILER=clang-19 \
-DCMAKE_CXX_COMPILER=clang++-19 \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Tidy changed files
run: |
git fetch origin "${{ github.base_ref }}"
files=$(git diff --name-only --diff-filter=ACM \
"origin/${{ github.base_ref }}...HEAD" \
-- 'compiler/*.cpp' 'tools/*.cpp')
if [ -z "$files" ]; then
echo "No C++ files changed; skipping tidy."
exit 0
fi
echo "$files" | xargs -P "$(nproc)" -n 1 clang-tidy-19 -p build
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache apt packages
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: clang-format-19
version: 1.0
- name: Check formatting
run: |
find compiler tools \( -name '*.cpp' -o -name '*.hpp' \) -print0 \
| xargs -0 clang-format-19 --dry-run --Werror