summaryrefslogtreecommitdiffstats
path: root/.github/workflows/lint.yml
blob: d6220eedcea8a343c13eb6aa40f18d4186ec6124 (plain)
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
55
56
57
58
59
60
61
name: lint

on:
  push:
    branches:
      - main
  pull_request:
    paths-ignore:
      - '/.*'
      - '/_*'
      - '!.clang-format'
      - 'Brewfile'
      - 'docs/**'
      - '**.adoc'
      - '**.md'
      - '**.nix'
      - 'flake.lock'

jobs:
  clang-format:
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, 'skip ci')"
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 1
          submodules: true
      - uses: DoozyX/clang-format-lint-action@v0.15
        with:
          clangFormatVersion: 11.0.0
  shellcheck:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 1
          submodules: true
      - uses: ludeeus/action-shellcheck@master
        with:
          scandir: './ci'
        env:
          SHELLCHECK_OPTS: -x
  version-cmake-up-to-date:
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, 'skip ci')"
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 1
          path: rnp
      - name: Download latest version.cmake
        uses: actions/checkout@v3
        with:
          repository: rnpgp/cmake-versioning
          fetch-depth: 1
          path: cmake-versioning
      - name: Compare
        run: |
          set -x
          diff "rnp/cmake/version.cmake" "cmake-versioning/version.cmake"