-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (36 loc) · 1.13 KB
/
style.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
38
39
40
41
42
43
44
45
# SPDX-FileCopyrightText: 2022 The dune-iga developers [email protected]
# SPDX-License-Identifier: CC0-1.0
name: CodeStyle
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: "**/cpm_modules"
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
- uses: actions/checkout@v2
with:
path: 'repo'
- name: Install format dependencies
run: |
sudo cp /usr/bin/clang-format-13 /usr/bin/clang-format
pip install cmake_format==0.6.13 pyyaml
pip install black==23.3.0
- name: configure
run: cmake -S "cmake/FormatTarget" -Bbuild -DADD_FORMATTARGET=TRUE -DADD_PYTHONFORMATTING=1
- name: check style
run: |
cmake --build build --target format
cmake --build build --target check-format
cmake --build build --target check-pythonformat