forked from efabless/caravel_board
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 1.12 KB
/
clang-format.yml
File metadata and controls
37 lines (37 loc) · 1.12 KB
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: C Quality Check and Formatting
# Controls when the workflow will run
on:
push:
branches:
- master
- main
pull_request:
# The sequence of runs in this workflow:
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- run: lsb_release -a
- run: uname -a
- name: Check out Repository Code
uses: actions/checkout@v3
with:
submodules: true # Fetch submodules
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Make sure scripts/format.sh is executable
run: |
chmod +x ./scripts/format.sh
- name: Run clang-format
run: |
./scripts/format.sh format
- name: Install clang-format
run: sudo apt install clang-format
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: ${{ github.actor }}
author_email: ${{ github.actor }}@users.noreply.github.com
message: "Code formatting and linting"
add: "." # Add all files