Skip to content

Commit

Permalink
Ci update (#898)
Browse files Browse the repository at this point in the history
* Update clang format checking

* Separate out the checking of each subdirectory in lib

* Remove old directories from format check

* Break up lib/runtime even further in format checking for parallelism

* Disable fail-fast so that format reporting is thorough

* Remove unnecessary format checks.

* Move over to use clang-format-16 and correct config file

* Update clang-format-check version

* Update to v3

---------

Co-authored-by: Colin Unger <lockshaw@lockshaw.net>
  • Loading branch information
aquan9 and lockshaw authored Aug 8, 2023
1 parent e828ecd commit 3eade8f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
3 changes: 0 additions & 3 deletions .clang-tidy-15

This file was deleted.

20 changes: 12 additions & 8 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,25 @@ jobs:
name: Formatting Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
path:
- check: "src"
exclude: '\.proto$'
- check: "include"
- check: "nmt"
- check: "python"
- check: "scripts"
- check: "lib/compiler"
- check: "lib/ffi"
- check: "lib/kernels"
- check: "lib/op-attrs"
- check: "lib/pcg"
- check: "lib/runtime"
- check: "lib/substitutions"
- check: "lib/utils"
- check: "tests"
- check: "examples"
- check: "bindings"
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/clang-format-action@v4.8.0
uses: lockshaw/clang-format-action@v4.11.0-flexflow-3
with:
clang-format-version: "15"
clang-format-version: "16"
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}
8 changes: 3 additions & 5 deletions lib/utils/include/utils/test_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,9 @@ namespace std {
template <
::FlexFlow::test_types::
capability... CAPABILITIES> //, typename = typename
//std::enable_if<::FlexFlow::test_types::has_capability<::FlexFlow::test_types::HASHABLE>::value,
//bool>::type>
struct hash<
::FlexFlow::test_types::test_type_t<
CAPABILITIES...>> {
// std::enable_if<::FlexFlow::test_types::has_capability<::FlexFlow::test_types::HASHABLE>::value,
// bool>::type>
struct hash<::FlexFlow::test_types::test_type_t<CAPABILITIES...>> {
typename std::enable_if<
::FlexFlow::test_types::has_capability<::FlexFlow::test_types::HASHABLE,
CAPABILITIES...>::value,
Expand Down
2 changes: 1 addition & 1 deletion scripts/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fi
CLANG_FORMAT_CONFIG="$GIT_ROOT/.clang-format-for-format-sh"
mapfile -t FILES < <(git ls-files ':!:triton/**' '*.h' '*.cc' '*.cpp' '*.cu' '*.c')
if [[ -f $CLANG_FORMAT_CONFIG ]]; then
"$CLANG_FORMAT_PATH" -style=file:"$CLANG_FORMAT_CONFIG" -i "${FILES[@]}"
"$CLANG_FORMAT_PATH" --style=file:"$CLANG_FORMAT_CONFIG" -i "${FILES[@]}"
else
echo "error"
fi

0 comments on commit 3eade8f

Please sign in to comment.