-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 972 Bytes
/
Copy pathci.yml
File metadata and controls
40 lines (33 loc) · 972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: CI
on:
push:
branches: [main, "copilot/**"]
pull_request:
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install tools
run: |
sudo apt-get update && sudo apt-get install -y \
cmake ninja-build clang clang-format clang-tidy
- name: Configure
run: |
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure
- name: clang-format check
run: |
find include src tests -name "*.hpp" -o -name "*.cpp" | \
xargs clang-format --dry-run --Werror
- name: clang-tidy
run: |
find src -name "*.cpp" | \
xargs clang-tidy -p build/