2020-08-18 00:07:13 +02:00
|
|
|
name: Lint
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'src/*'
|
|
|
|
- 'include/*'
|
2020-10-13 21:53:45 +02:00
|
|
|
- 'format.sh'
|
|
|
|
- '.clang-tidy'
|
2020-08-18 00:07:13 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2020-08-20 00:29:41 +02:00
|
|
|
- run: sudo apt-get install -y astyle clang-tidy
|
2020-08-18 00:07:13 +02:00
|
|
|
|
2020-08-24 14:53:19 +02:00
|
|
|
- run: ./format.sh
|
2020-08-18 00:07:13 +02:00
|
|
|
|
2020-10-13 21:53:45 +02:00
|
|
|
# Detect any files changed by ./format.sh
|
2020-08-18 00:07:13 +02:00
|
|
|
- id: files_formatted
|
|
|
|
uses: jackton1/find-changed-files@v1.1
|
|
|
|
with:
|
|
|
|
files: src, include
|
|
|
|
|
|
|
|
- name: Fail if any files reformatted
|
|
|
|
if: steps.files_formatted.outputs.files_changed == 'true'
|
2020-08-18 01:35:18 +02:00
|
|
|
run: exit 1
|