File: presubmit.yml

package info (click to toggle)
halide 21.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 55,752 kB
  • sloc: cpp: 289,334; ansic: 22,751; python: 7,486; makefile: 4,299; sh: 2,508; java: 1,549; javascript: 282; pascal: 207; xml: 127; asm: 9
file content (66 lines) | stat: -rw-r--r-- 3,877 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
55
56
57
58
59
60
61
62
63
64
65
66
name: Halide Presubmit Checks
on:
  # We don't want 'edited' (that's basically just the description, title, etc.)
  # We don't want 'review_requested' (that's redundant to the ones below for our purposes)
  pull_request:
    types: [ opened, synchronize, reopened ]
    paths:
      - '**.h'
      - '**.c'
      - '**.cpp'
      - '**CMakeLists.txt'
      - '**.cmake'
      - 'run-clang-tidy.sh'
      - 'run-clang-format.sh'
      - '.github/workflows/presubmit.yml'

permissions:
  contents: read

jobs:
  check_clang_format:
    name: Check clang-format and ruff
    runs-on: macos-14
    steps:
      - uses: actions/checkout@v4

      - name: Install clang-format
        run: brew install llvm@19

      - name: Check clang-format
        run: ./run-clang-format.sh -c
        env:
          CLANG_FORMAT_LLVM_INSTALL_DIR: /opt/homebrew/opt/llvm@19

      - uses: astral-sh/ruff-action@v3
  check_clang_tidy:
    name: Check clang-tidy
    runs-on: macos-14
    steps:
      - uses: actions/checkout@v4
      - name: Install clang-tidy
        run: brew install llvm@19 ninja lld@19
      - name: Run clang-tidy
        run: ./run-clang-tidy.sh
        env:
          CLANG_TIDY_LLVM_INSTALL_DIR: /opt/homebrew/opt/llvm@19
  check_cmake_file_lists:
    name: Check CMake file lists
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
      - name: Run test sources check
        run: |
          shopt -s nullglob
          (cd test/autoschedulers/adams2019     && comm -23 <(ls *.{c,cpp} | sort) <(grep -P '^\s*#?\s*[A-Za-z0-9_.]+$' CMakeLists.txt | tr -d '# ' | sort) | tee missing_files && [ ! -s missing_files ])
          (cd test/autoschedulers/anderson2021  && comm -23 <(ls *.{c,cpp} | sort) <(grep -P '^\s*#?\s*[A-Za-z0-9_.]+$' CMakeLists.txt | tr -d '# ' | sort) | tee missing_files && [ ! -s missing_files ])
          (cd test/autoschedulers/li2018        && comm -23 <(ls *.{c,cpp} | sort) <(grep -P '^\s*#?\s*[A-Za-z0-9_.]+$' CMakeLists.txt | tr -d '# ' | sort) | tee missing_files && [ ! -s missing_files ])
          (cd test/autoschedulers/mullapudi2016 && comm -23 <(ls *.{c,cpp} | sort) <(grep -P '^\s*#?\s*[A-Za-z0-9_.]+$' CMakeLists.txt | tr -d '# ' | sort) | tee missing_files && [ ! -s missing_files ])
          (cd test/correctness                  && comm -23 <(ls *.{c,cpp} | sort) <(grep -P '^\s*#?\s*[A-Za-z0-9_.]+$' CMakeLists.txt | tr -d '# ' | sort) | tee missing_files && [ ! -s missing_files ])
          (cd test/error                        && comm -23 <(ls *.{c,cpp} | sort) <(grep -P '^\s*#?\s*[A-Za-z0-9_.]+$' CMakeLists.txt | tr -d '# ' | sort) | tee missing_files && [ ! -s missing_files ])
          (cd test/failing_with_issue           && comm -23 <(ls *.{c,cpp} | sort) <(grep -P '^\s*#?\s*[A-Za-z0-9_.]+$' CMakeLists.txt | tr -d '# ' | sort) | tee missing_files && [ ! -s missing_files ])
          (cd test/fuzz                         && comm -23 <(ls *.{c,cpp} | sort) <(grep -P '^\s*#?\s*[A-Za-z0-9_.]+$' CMakeLists.txt | tr -d '# ' | sort) | tee missing_files && [ ! -s missing_files ])
          (cd test/generator                    && comm -23 <(ls *.{c,cpp} | sort) <(grep -P '^\s*#?\s*[A-Za-z0-9_.]+$' CMakeLists.txt | tr -d '# ' | sort) | tee missing_files && [ ! -s missing_files ])
          (cd test/performance                  && comm -23 <(ls *.{c,cpp} | sort) <(grep -P '^\s*#?\s*[A-Za-z0-9_.]+$' CMakeLists.txt | tr -d '# ' | sort) | tee missing_files && [ ! -s missing_files ])
          (cd test/runtime                      && comm -23 <(ls *.{c,cpp} | sort) <(grep -P '^\s*#?\s*[A-Za-z0-9_.]+$' CMakeLists.txt | tr -d '# ' | sort) | tee missing_files && [ ! -s missing_files ])
          (cd test/warning                      && comm -23 <(ls *.{c,cpp} | sort) <(grep -P '^\s*#?\s*[A-Za-z0-9_.]+$' CMakeLists.txt | tr -d '# ' | sort) | tee missing_files && [ ! -s missing_files ])