Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use clang-tools on x86 only #3969

Merged
merged 3 commits into from
Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conda/recipes/libcuml/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ build:
requirements:
build:
- cmake>=3.20.1
- clang=8.0.1
- clang-tools=8.0.1
- clang=8.0.1 # [x86_64]
- clang-tools=8.0.1 # [x86_64]
host:
- nccl>=2.9.9
- cudf {{ minor_version }}
Expand Down
7 changes: 7 additions & 0 deletions cpp/scripts/run-clang-format.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import subprocess
import argparse
import tempfile
import shutil


EXPECTED_VERSION = "8.0.1"
Expand Down Expand Up @@ -129,6 +130,12 @@ def main():
sys.exit(-1)
all_files = list_all_src_files(args.regex_compiled, args.ignore_compiled,
args.dirs, args.dstdir, args.inplace)

# Check whether clang-format exists
if shutil.which("clang-format") is None:
print("clang-format not found. Exiting...")
return

# actual format checker
status = True
for src, dst in all_files:
Expand Down
5 changes: 5 additions & 0 deletions cpp/scripts/run-clang-tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import argparse
import json
import multiprocessing as mp
import shutil


EXPECTED_VERSION = "8.0.1"
Expand Down Expand Up @@ -237,6 +238,10 @@ def main():
# Attempt to making sure that we run this script from root of repo always
if not os.path.exists(".git"):
raise Exception("This needs to always be run from the root of repo")
# Check whether clang-tidy exists
if shutil.which("clang-tidy") is not None:
print("clang-tidy not found. Exiting...")
return
all_files = get_all_commands(args.cdb)
status = run_tidy_for_all_files(args, all_files)
if not status:
Expand Down