Skip to content

Commit

Permalink
ci: linters: downgrade clang
Browse files Browse the repository at this point in the history
  • Loading branch information
hmaciak committed Feb 11, 2025
1 parent dfbf331 commit a5db453
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/automation/build_linters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ set -o errexit -o pipefail -o noclobber
export CC=clang
export CXX=clang++

if [ -n "$CLANG_VERSION" ]; then
export CC=clang-$CLANG_VERSION
export CXX=clang++-$CLANG_VERSION
else
export CC=clang
export CXX=clang++
fi

if [[ "$ONEDNN_ACTION" == "configure" ]]; then
if [[ "$GITHUB_JOB" == "pr-clang-tidy" ]]; then
set -x
Expand Down Expand Up @@ -33,7 +41,7 @@ if [[ "$ONEDNN_ACTION" == "configure" ]]; then
fi
elif [[ "$ONEDNN_ACTION" == "build" ]]; then
set -x
cmake --build build
cmake --build build -j4
set +x
else
echo "Unknown action: $ONEDNN_ACTION"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/pr-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,21 @@ jobs:
pr-clang-tidy:
name: Clang-Tidy
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout oneDNN
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Install clang
run: |
sudo apt-get update
sudo apt-get install -y clang libomp-dev ocl-icd-libopencl1 ocl-icd-opencl-dev
sudo apt-get install -y clang-12 libomp-dev ocl-icd-libopencl1 ocl-icd-opencl-dev
- name: Configure oneDNN
run: .github/automation/build_linters.sh
env:
ONEDNN_ACTION: configure
CLANG_VERSION: 12

- name: Build oneDNN
run: |
Expand Down

0 comments on commit a5db453

Please sign in to comment.