-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (38 loc) · 1.19 KB
/
style_check.yaml
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
name: Style check
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- "trunk-*"
workflow_dispatch:
jobs:
clang-tidy:
name: Run clang-tidy
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.12
- name: Set up Python environment
uses: glotzerlab/workflows/setup-uv@0d90feacda686e08bfecc451fc04a8596bd295f5 # 0.4.0
with:
lockfile: ".github/requirements-test.txt"
- name: Configure
run: cmake -B build
- name: Execute clang-tidy
run: clang-tidy-18 -p=build gsd/*.c gsd/*.h scripts/*.cc --quiet --warnings-as-errors="*"
# This job is used to provide a single requirement for branch merge conditions.
checks_complete:
name: Style check
if: always()
needs: [clang-tidy]
runs-on: ubuntu-latest
steps:
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
- name: Done
run: exit 0