sotn-decomp/.github/workflows/format.yml
Luciano Ciccariello ff1c3dc64c
Regenerate orphaned symbols in the CI (#625)
[As
mentioned](https://discord.com/channels/1079389589950705684/1135205782703570994/1154948845638254672),
since #595 some tools are not able to pick up some function names as the
symbol names are gone. This PR adds a quick tool to re-generate that
list from a map file and integrates it in the CI flow.

EDIT: CI is failing because the running Linter is from `master`, where
`mapfile-parser` is not installed.
2023-09-24 12:55:33 -04:00

39 lines
854 B
YAML

name: Format code
on:
push:
branches:
- master
paths:
- '*/*.c'
- '*/*.h'
- '**/*.c'
- '**/*.h'
- '**/*.py'
- 'config/symbols.*.txt'
workflow_dispatch:
jobs:
format:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Install requirements
run: sudo apt-get install clang-format
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install black
run: pip install black pyyaml mapfile-parser==2.1.4
- name: Clone main repository
uses: actions/checkout@v3
with:
submodules: false
- name: Format code
run: make format
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Format code