2020-09-16 21:13:41 +00:00
|
|
|
# This is a format job. Pre-commit has a first-party GitHub action, so we use
|
|
|
|
# that: https://github.com/pre-commit/action
|
|
|
|
|
2020-07-20 17:35:21 +00:00
|
|
|
name: Format
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- stable
|
|
|
|
- "v*"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
pre-commit:
|
|
|
|
name: Format
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
- uses: pre-commit/action@v2.0.0
|
2020-09-16 21:13:41 +00:00
|
|
|
with:
|
|
|
|
# Slow hooks are marked with manual - slow is okay here, run them too
|
2020-10-05 19:31:00 +00:00
|
|
|
extra_args: --hook-stage manual --all-files
|
2020-09-11 01:16:40 +00:00
|
|
|
|
|
|
|
clang-tidy:
|
|
|
|
name: Clang-Tidy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: silkeh/clang:10
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install requirements
|
|
|
|
run: apt-get update && apt-get install -y python3-dev python3-pytest
|
|
|
|
|
|
|
|
- name: Configure
|
|
|
|
run: cmake -S . -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);--warnings-as-errors=*"
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: cmake --build build -j 2
|