Add CMake build rules for (some) of the generator jit tests #7843
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
permissions: | |
contents: read | |
jobs: | |
check_clang_format: | |
name: Check clang-format | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: DoozyX/[email protected] | |
with: | |
source: '.' | |
extensions: 'h,c,cpp' | |
clangFormatVersion: 16 | |
# As of Aug 2023, the macOS runners have more RAM (14GB vs 7GB) and CPU (3 cores vs 2) | |
# than the Linux and Windows runners, so let's use those instead, since clang-tidy is | |
# a bit of a sluggard | |
check_clang_tidy: | |
name: Check clang-tidy | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Workaround for https://github.com/actions/setup-python/issues/577 | |
- name: Clean up python binaries | |
run: | | |
rm -f /usr/local/bin/2to3*; | |
rm -f /usr/local/bin/idle3*; | |
rm -f /usr/local/bin/pydoc3*; | |
rm -f /usr/local/bin/python3*; | |
rm -f /usr/local/bin/python3*-config; | |
- name: Install clang-tidy | |
run: | | |
brew update | |
brew install llvm@16 ninja coreutils flatbuffers | |
- name: Run clang-tidy | |
run: | | |
export CC=/usr/local/opt/llvm/bin/clang | |
export CXX=/usr/local/opt/llvm/bin/clang++ | |
export CLANG_TIDY_LLVM_INSTALL_DIR=/usr/local/opt/llvm | |
export CMAKE_GENERATOR=Ninja | |
./run-clang-tidy.sh | |
check_cmake_file_lists: | |
name: Check CMake file lists | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run test sources check | |
run: | | |
shopt -s nullglob | |
(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/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/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/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/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 ]) |