-
Notifications
You must be signed in to change notification settings - Fork 234
42 lines (40 loc) · 1.06 KB
/
clang-format.yml
File metadata and controls
42 lines (40 loc) · 1.06 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
38
39
40
41
42
name: C Code Formatting Check
on:
push:
paths:
- '**.c'
- '**.h'
- '.clang-format'
- '.github/workflows/clang-format.yml'
pull_request:
paths:
- '**.c'
- '**.h'
- '.clang-format'
- '.github/workflows/clang-format.yml'
jobs:
format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"
bundler-cache: none
- name: Set working directory as safe
run: git config --global --add safe.directory $(pwd)
- name: Set up permission
run: chmod -R o-w /opt/hostedtoolcache/Ruby
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libdb-dev curl autoconf automake m4 libtool clang-format
- name: Update rubygems & bundler
run: |
ruby -v
gem update --system
- name: bin/setup
run: |
bin/setup
- name: Check C code formatting
run: bundle exec rake format:c_check