LibreSplit/.github/workflows/check.yml
Jack Tench df1a2dc99f
Update linting workflow to use older c standard (#289)
* Update linting workflow to use older c standard

* Add int types to bind.c

* Run clang-format to move include
2026-02-08 12:58:55 -03:00

48 lines
1.4 KiB
YAML

on: [push, pull_request]
jobs:
format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Format files
run: |
clang-format -i $(find src -name '*.c' -or -name '*.h')
- name: Check for changes
run: |
changed_files=$(git diff --name-only)
if [ -n "$changed_files" ]; then
echo "The following files require formatting:"
echo "$changed_files"
echo "Run 'clang-format -i src/**/*.{c,h}' and commit the changes."
exit 1
fi
linter-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install and cache dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: >
meson
libgtk-3-dev
libx11-dev
libjansson-dev
libluajit-5.1-dev
cppcheck
version: 1.0
- name: Set up project
run: meson setup build -Dbuildtype=debug
- name: Run linter tests
run: meson test -C build --suite lint -v