From c6817ac785b9f636efa7543cf0a4e4529230a58e Mon Sep 17 00:00:00 2001 From: Dmitriy Khaustov aka xDimon Date: Wed, 7 Feb 2024 10:20:23 +0300 Subject: [PATCH] fix: CI Signed-off-by: Dmitriy Khaustov aka xDimon --- .github/workflows/clang-tidy.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index d1683ca..bc6ccb0 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -46,13 +46,10 @@ jobs: - name: run checks run: | #!/bin/bash - LLVM_DIR=/usr/lib/llvm-15 - test -d $LLVM_DIR || echo $(echo "llvm is absent, cannot continue" && exit 1) - VER_COUNT=$(ls -1 ${LLVM_DIR} | wc -l) + LLVM_DIR=/usr/lib/llvm-?? + VER_COUNT=$(ls -d -1 ${LLVM_DIR} | wc -l) test ${VER_COUNT} -eq 0 && echo "no llvm version detected" && exit 1 - test $VER_COUNT -gt 1 && echo "wrong llvm installation" && exit 1 - LLVM_VER=$(ls -1 ${LLVM_DIR}) - export LLVM_ROOT=${LLVM_DIR}/${LLVM_VER} + export LLVM_ROOT=$(ls -r -d -1 ${LLVM_DIR} | head -1) export PATH=${LLVM_ROOT}/bin:${LLVM_ROOT}/share/clang:${PATH} cmake . -Bbuild .github/aux/clang-tidy.sh build