34505943b2
* Update source/{bin,lib/{common,rocprofiler}}/CMakeLists.txt
- activate clang-tidy
* Update PTL submodule
- clang-tidy fixes
* Update .clang-tidy
- ignore performance-enum-size
* Update CI workflow
- update paths-ignore
* Add linting workflow
- runs clang-tidy
* Update cmake/rocprofiler_build_settings.cmake
- minor modification of flags not recognized by clang-tidy
* Update samples (all of them)
- rocprofiler-samples-build-flags target with -W -Wall -Wextra -Wshadow [-Werror]
- Link samples targets to rocprofiler-samples-build-flags if target exists
- Remove unused variable in main.cpp of api_{buffered,callback}_tracing
- Update samples/pc_sampling
- single-user-multiple-agents.cpp ends up with unused function find_first_gpu_agent() error
- change find_first_gpu_agent to return std::optional<rocprofiler_agent_t>
- change usage after call to find_first_gpu_agent()
- use find_first_gpu_agent() in single-user-multiple-agents.cpp to determine if there are any GPUs
* Update linting workflow
- fix path to run-ci.py script
* Update linting workflow
- install cmake
* Update common/container/stable_vector.hpp
- fix clang-tidy warning for readability-container-size-empty
87 lines
2.8 KiB
YAML
87 lines
2.8 KiB
YAML
name: Linting
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths-ignore:
|
|
- '*.md'
|
|
- 'source/docs/**'
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
paths-ignore:
|
|
- '*.md'
|
|
- 'source/docs/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
# TODO(jrmadsen): replace LD_RUNPATH_FLAG, GPU_LIST, etc. with internal handling in cmake
|
|
ROCM_PATH: "/opt/rocm"
|
|
GPU_LIST: "gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1101 gfx1102"
|
|
PATH: "/usr/bin:$PATH"
|
|
|
|
jobs:
|
|
get-latest-mainline-build-number:
|
|
runs-on: mi200
|
|
|
|
outputs:
|
|
LATEST_BUILD_NUMBER: ${{ steps.get_build_number.outputs.LATEST_BUILD_NUMBER }}
|
|
|
|
steps:
|
|
- id: get_build_number
|
|
run: echo "LATEST_BUILD_NUMBER=$(wget -qO- 'http://rocm-ci.amd.com/job/compute-rocm-dkms-no-npi-hipclang/lastSuccessfulBuild/buildNumber')" >> $GITHUB_OUTPUT
|
|
|
|
clang-tidy:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: ['ubuntu-22.04']
|
|
runner: ['renderD131']
|
|
device: ['/renderD131']
|
|
linter: ['clang-tidy']
|
|
|
|
runs-on: ${{ matrix.runner }}
|
|
|
|
# define this for containers
|
|
env:
|
|
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
|
|
|
|
container:
|
|
image: compute-artifactory.amd.com:5000/rocm-plus-docker/compute-rocm-dkms-no-npi-hipclang:${{ needs.get-latest-mainline-build-number.outputs.LATEST_BUILD_NUMBER }}-${{ matrix.os }}-stg1
|
|
options: --privileged --ipc=host --device=/dev/kfd --device=/dev/dri${{ matrix.device }} --group-add video --cap-add=SYS_PTRACE --cap-add CAP_SYS_PTRACE --cap-add CAP_SYS_ADMIN --security-opt seccomp=unconfined
|
|
|
|
if: ${{ always() }}
|
|
needs: get-latest-mainline-build-number
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Update container
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y cmake clang-tidy-11 g++-11 g++-12
|
|
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-11 10
|
|
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10 --slave /usr/bin/g++ g++ /usr/bin/g++-11
|
|
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 20 --slave /usr/bin/g++ g++ /usr/bin/g++-12
|
|
- name: Configure, Build, and Test
|
|
timeout-minutes: 30
|
|
shell: bash
|
|
run:
|
|
python3 ./source/scripts/run-ci.py -B build
|
|
--name ${{ github.repository }}-${{ github.ref_name }}-mi200-${{ matrix.linter }}
|
|
--build-jobs 8
|
|
--site mi200
|
|
--gpu-targets ${{ env.GPU_LIST }}
|
|
--linter ${{ matrix.linter }}
|
|
--
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
-DCMAKE_INSTALL_PREFIX="${{ env.ROCM_PATH }}"
|
|
-DPython3_EXECUTABLE=$(which python3)
|
|
--
|
|
-VV
|