Skip to content

Setup clang format for C code #8

Setup clang format for C code

Setup clang format for C code #8

Workflow file for this run

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