Attempting to fix package list. #32
Workflow file for this run
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: Clang-Tidy | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
tidy: | |
name: Run Clang-Tidy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Clang-Tidy | |
run: sudo apt update && sudo apt install clang-15 clang-tidy-15 llvm-15-dev libc++abi-15-dev libc++-15-dev libstdc++-12-dev libomp-dev make nvidia-cuda-toolkit g++ python3 && clang-tidy --version && nvcc --version && cmake --version | |
- name: Check out code, generate compile commands | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build compile_commands.json | |
run: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B./build -S. | |
- name: Build CUDA complie_commands.json | |
run: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DMICM_ENABLE_CUDA=ON -DMICM_GPU_TYPE=v100 -DCMAKE_CUDA_ARCHITECTURES=70 -B./cuda-build -S. | |
- name: Scan includes | |
run: | | |
INCLUDE_FILES=$(find include -type f \( -name '*.hpp' -o -name '*.h' -o -name '*.cuh' -o -name '*.inl' \) | grep -v jit | grep -v '.inl') | |
echo "scanning include files:" | |
echo ${INCLUDE_FILES} | tr " " "\n" | |
time clang-tidy -p ./build/ -checks=-*,bugprone-* -header-filter=$(pwd)/include/.* --extra-arg "-lcudart_static" --extra-arg "-std=c++20" ${INCLUDE_FILES} | |
continue-on-error: true | |
- name: Scan CUDA source | |
run: | | |
SOURCE_FILES=$(find src -type f \( -name '*.cu' -o -name '*.hpp' -o -name '*.h' -o -name '*.cpp' \)) | |
echo "scanning src files:" | |
echo ${SOURCE_FILES} | tr " " "\n" | |
time clang-tidy -p ./cuda-build/ -checks=-*,bugprone-* -header-filter=$(pwd)/include/.* --extra-arg "-lcudart_static" --extra-arg "-std=c++20" ${SOURCE_FILES} -- -Iinclude/ | |
continue-on-error: true | |
- name: Scan Test files | |
run: | | |
TEST_FILES=$(find test -type f \( -name '*.hpp' -o -name '*.h' -o -name '*.cpp' -o -name '*.cuh' -o -name '*.cu' \) ! -path 'test/tutorial/*' ! -path '**/test_openmp_jit_solver.cpp' ! -path '**/.cuh') | |
echo "scanning test files:" | |
echo ${TEST_FILES} | tr " " "\n" | |
time clang-tidy -p ./cuda-build/ -checks=-*,bugprone-* -header-filter=$(pwd)/include/.* --extra-arg "-lcudart_static" --extra-arg "-std=c++20" ${TEST_FILES} -- -Iinclude/ -isystem ./cuda-build/_deps/googletest-src/googletest/include -isystem ./cuda-build/_deps/json-src/include | |
continue-on-error: true | |