You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.2 KiB
55 lines
1.2 KiB
# This is a format job. Pre-commit has a first-party GitHub action, so we use
|
|
# that: https://github.com/pre-commit/action
|
|
|
|
name: Format
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
- stable
|
|
- "v*"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
FORCE_COLOR: 3
|
|
# For cmake:
|
|
VERBOSE: 1
|
|
|
|
jobs:
|
|
pre-commit:
|
|
name: Format
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Add matchers
|
|
run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json"
|
|
- uses: pre-commit/action@v3.0.1
|
|
|
|
clang-tidy:
|
|
# When making changes here, please also review the "Clang-Tidy" section
|
|
# in .github/CONTRIBUTING.md and update as needed.
|
|
name: Clang-Tidy
|
|
runs-on: ubuntu-latest
|
|
container: silkeh/clang:20
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Install requirements
|
|
run: apt-get update && apt-get install -y git python3-dev python3-pytest ninja-build
|
|
|
|
- name: Configure
|
|
run: cmake --preset tidy
|
|
- name: Build
|
|
run: cmake --build --preset tidy
|
|
|
|
- name: Embedded
|
|
run: cmake --build --preset tidy -t cpptest
|