-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1015 Bytes
/
cpp-ci.yml
File metadata and controls
48 lines (39 loc) · 1015 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
41
42
43
44
45
46
47
48
name: C++ CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
format-check:
name: Format Check
runs-on: ubuntu-24.04
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Check format
run: |
clang-format --version
find src tests \( -name "*.hpp" -o -name "*.cpp" -o -name "*.h" \) | \
xargs clang-format --dry-run --Werror
build-and-test:
name: Build and Test
runs-on: ubuntu-24.04
needs: format-check
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtest-dev
- name: Show tool versions
run: |
cmake --version
g++ --version
- name: Configure
run: cmake --preset ci
- name: Build
run: cmake --build --preset ci
- name: Test
run: ctest --preset ci