File: format.yml

package info (click to toggle)
pybind11 3.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,448 kB
  • sloc: cpp: 27,239; python: 13,512; ansic: 4,244; makefile: 204; sh: 36
file content (54 lines) | stat: -rw-r--r-- 1,224 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# 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@v4
    - uses: actions/setup-python@v5
      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@v4

    - 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