Skip to content

Remove FetchContent from the compiler #9945

Remove FetchContent from the compiler

Remove FetchContent from the compiler #9945

Workflow file for this run

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'
- '**.clang-tidy'
permissions:
contents: read
jobs:
check_clang_format:
name: Check clang-format and ruff
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Install clang-format
run: brew install llvm@21
- name: Check clang-format
run: ./run-clang-format.sh -c
- uses: astral-sh/ruff-action@v3
check_clang_tidy:
name: Check clang-tidy
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
repository: microsoft/vcpkg
path: vcpkg
ref: 2026.01.16
fetch-depth: 0 # need all history for vcpkg's versioning mechanism to work
- name: Install dependencies
run: brew install lld@21 llvm@21
- name: Run clang-tidy
run: ./run-clang-tidy.sh
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
check_cmake_file_lists:
name: Check CMake file lists
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- 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 ])