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
|
2021-03-18 18:29:22 +00:00
|
|
|
- smart_holder
|
2020-07-20 17:35:21 +00:00
|
|
|
- "v*"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
pre-commit:
|
|
|
|
name: Format
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
2021-04-21 19:00:00 +00:00
|
|
|
- uses: pre-commit/action@v2.0.3
|
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:
|
2021-06-22 22:12:58 +00:00
|
|
|
# When making changes here, please also review the "Clang-Tidy" section
|
|
|
|
# in .github/CONTRIBUTING.md and update as needed.
|
2020-09-11 01:16:40 +00:00
|
|
|
name: Clang-Tidy
|
|
|
|
runs-on: ubuntu-latest
|
2021-06-22 16:11:54 +00:00
|
|
|
container: silkeh/clang:12
|
2020-09-11 01:16:40 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install requirements
|
|
|
|
run: apt-get update && apt-get install -y python3-dev python3-pytest
|
|
|
|
|
|
|
|
- name: Configure
|
2020-11-09 18:10:19 +00:00
|
|
|
run: >
|
|
|
|
cmake -S . -B build
|
2021-06-22 16:11:54 +00:00
|
|
|
-DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy)"
|
2020-11-09 18:10:19 +00:00
|
|
|
-DDOWNLOAD_EIGEN=ON
|
|
|
|
-DDOWNLOAD_CATCH=ON
|
|
|
|
-DCMAKE_CXX_STANDARD=17
|
2020-09-11 01:16:40 +00:00
|
|
|
|
|
|
|
- name: Build
|
2021-06-21 19:40:10 +00:00
|
|
|
run: cmake --build build -j 2 -- --keep-going
|