-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 844 Bytes
/
ci.yml
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
name: Code Quality
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '.github/workflows/ci.yml'
- 'src/**.[ch]'
- 'CMakeLists.txt'
- 'CMakePresets.json'
jobs:
build:
runs-on: ubuntu-latest
env:
CMAKE_BUILD_TYPE: Release
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: hustcer/setup-nu@v3
with:
version: '0.97.1'
- name: Check Format
shell: nu {0}
run: clang-format --dry-run ...(glob 'src/**/*.{c,h}')
- name: Configure CMake
run: cmake --preset=default .
- name: Check Lints
shell: nu {0}
run: clang-tidy --quiet -p .build ...(glob 'src/**/*.{c,h}')
- name: Build with Make
run: cmake --build .build
- name: Run Unit Tests
run: ctest --preset=default