Skip to content

Experimental serializer #7336

Experimental serializer

Experimental serializer #7336

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'
permissions:
contents: read
jobs:
check_clang_format:
name: Check clang-format
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: DoozyX/clang-format-lint-action@v0.14
with:
source: '.'
extensions: 'h,c,cpp'
clangFormatVersion: 14
check_clang_tidy:
name: Check clang-tidy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install clang-tidy
run: |
# from apt.llvm.org
# wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 15CF4D18AF4F7421
sudo apt-add-repository "deb https://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-14 main"
sudo apt-get update
sudo apt-get install llvm-14 clang-14 liblld-14-dev libclang-14-dev clang-tidy-14 ninja-build
- name: Run clang-tidy
run: |
export CC=clang-14
export CXX=clang++-14
export CLANG_TIDY_LLVM_INSTALL_DIR=/usr/lib/llvm-14
./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 ])