Someone working on a branch in their own fork won't see the lint running on their github-actions CI until they open a pull request. It'd be much easier to ensure changes being worked on are going to pass the linter if the linter runs before the last step of opening the PR.
36 lines
680 B
YAML
36 lines
680 B
YAML
name: Lint
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
types: [ opened, reopened, synchronize ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install Dependencies
|
|
uses: ./.github/workflows/actions/ubuntu-build-deps
|
|
with:
|
|
SUDO: true
|
|
|
|
- name: Install clang-format-15
|
|
run: sudo apt install -y clang-format-15
|
|
|
|
- name: Configure
|
|
run: ./configure
|
|
|
|
- name: lint
|
|
run: |
|
|
if which clang-format-15 2>&1 >/dev/null
|
|
then
|
|
sudo cp $(which clang-format-15) $(which clang-format)
|
|
fi
|
|
clang-format --version
|
|
make lint
|