CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
108 lines
3.3 KiB
YAML
108 lines
3.3 KiB
YAML
name: profiler-hub Static Analysis
|
|
run-name: profiler-hub-static-analysis
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- develop
|
|
paths:
|
|
- '.github/workflows/profiler-hub-static-analysis.yml'
|
|
- 'profilers/profiler-hub/**'
|
|
- '!profilers/profiler-hub/build/**'
|
|
- '!profilers/profiler-hub/docs/**'
|
|
- '!profilers/profiler-hub/README.md'
|
|
pull_request:
|
|
branches:
|
|
- develop
|
|
paths:
|
|
- '.github/workflows/profiler-hub-static-analysis.yml'
|
|
- 'profilers/profiler-hub/**'
|
|
- '!profilers/profiler-hub/build/**'
|
|
- '!profilers/profiler-hub/docs/**'
|
|
- '!profilers/profiler-hub/README.md'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
clang-tidy:
|
|
name: clang-tidy
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 20
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
sparse-checkout: |
|
|
profilers/profiler-hub
|
|
.github/workflows
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
cmake \
|
|
gcc g++ clang-tidy-18 \
|
|
libsqlite3-dev libspdlog-dev libfmt-dev nlohmann-json3-dev \
|
|
libgtest-dev libgmock-dev libbenchmark-dev
|
|
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-18 100
|
|
|
|
- name: Configure
|
|
working-directory: profilers/profiler-hub
|
|
env:
|
|
CC: gcc
|
|
CXX: g++
|
|
run: |
|
|
cmake --version
|
|
clang-tidy --version | head -2
|
|
cmake -S . -B build \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
|
-DPROFILER_HUB_BUILD_TESTS=OFF \
|
|
-DPROFILER_HUB_BUILD_BENCHMARKS=OFF
|
|
|
|
- name: Build
|
|
working-directory: profilers/profiler-hub
|
|
run: cmake --build build --parallel $(nproc)
|
|
|
|
- name: Run clang-tidy
|
|
working-directory: profilers/profiler-hub
|
|
run: |
|
|
set -o pipefail
|
|
cmake --build build --target clang-tidy 2>&1 | tee clang-tidy.log
|
|
WARNINGS=$(grep -cE 'warning:' clang-tidy.log || true)
|
|
ERRORS=$(grep -cE 'error:' clang-tidy.log || true)
|
|
{
|
|
echo "## clang-tidy summary"
|
|
echo ""
|
|
echo "| Severity | Count |"
|
|
echo "|----------|-------|"
|
|
echo "| Errors | ${ERRORS} |"
|
|
echo "| Warnings | ${WARNINGS} |"
|
|
} >> "${GITHUB_STEP_SUMMARY}"
|
|
echo "Errors: ${ERRORS}, Warnings: ${WARNINGS}"
|
|
|
|
- name: Report clang-tidy findings (non-blocking)
|
|
working-directory: profilers/profiler-hub
|
|
run: |
|
|
WARNINGS=$(grep -cE 'warning:' clang-tidy.log || true)
|
|
ERRORS=$(grep -cE 'error:' clang-tidy.log || true)
|
|
if [ "${ERRORS}" -gt 0 ] || [ "${WARNINGS}" -gt 0 ]; then
|
|
echo "::warning::clang-tidy reported ${ERRORS} error(s) and ${WARNINGS} warning(s); cleanup tracked separately"
|
|
else
|
|
echo "clang-tidy produced zero errors and zero warnings"
|
|
fi
|
|
|
|
- name: Upload clang-tidy log
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: clang-tidy-log
|
|
path: profilers/profiler-hub/clang-tidy.log
|
|
if-no-files-found: warn
|