diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c268ca7ba3..94162ee51c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -257,7 +257,8 @@ jobs: - name: "Build target" working-directory: ./housekeeping/docker/kagome-dev - run: make kagome_dev_docker_build_tidy \ + run: + make kagome_dev_docker_build_tidy \ DOCKER_REGISTRY_PATH=${DOCKER_REGISTRY_PATH} \ GITHUB_HUNTER_USERNAME=${{ secrets.HUNTER_USERNAME }} \ GITHUB_HUNTER_TOKEN=${{ secrets.HUNTER_TOKEN }} diff --git a/housekeeping/clang-tidy-diff.sh b/housekeeping/clang-tidy-diff.sh index a45961a47c..13658f1653 100755 --- a/housekeeping/clang-tidy-diff.sh +++ b/housekeeping/clang-tidy-diff.sh @@ -7,9 +7,13 @@ BUILD_DIR="${BUILD_DIR:-build}" CLANG_TIDY_BIN="${CLANG_TIDY_BIN:-clang-tidy}" +CI="${CI:-false}" + +if [ "${CI}" == "true" ]; then + git fetch origin master +fi cd $(dirname $0)/.. # exclude WAVM because on CI clang-tidy is run on a WasmEdge build -git fetch origin master git diff -U0 origin/master -- . ':!core/runtime/wavm' | clang-tidy-diff.py -p1 -path ${BUILD_DIR} -iregex '(core|node)\/.*\.(h|c|hpp|cpp)' -clang-tidy-binary ${CLANG_TIDY_BIN} | tee clang-tidy.log ! grep ': error:' clang-tidy.log diff --git a/housekeeping/docker/kagome-dev/Makefile b/housekeeping/docker/kagome-dev/Makefile index 8bda285ac7..4f9ca7345b 100644 --- a/housekeeping/docker/kagome-dev/Makefile +++ b/housekeeping/docker/kagome-dev/Makefile @@ -159,7 +159,7 @@ kagome_dev_docker_build_tidy: echo \"Building in $$(pwd)\" && \ cmake . -B\"$(BUILD_DIR)\" -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=\"$(BUILD_TYPE)\" -DBACKWARD=OFF -DWERROR=$(WERROR) && \ cmake --build \"$(BUILD_DIR)\" --target generated -- -j${BUILD_THREADS} && \ - cd /opt/kagome/ && ./housekeeping/clang-tidy-diff.sh \ + cd /opt/kagome/ && export CI='true' && ./housekeeping/clang-tidy-diff.sh \ " || DOCKER_EXEC_RESULT=$$? ; \ if [ $$DOCKER_EXEC_RESULT -ne 0 ]; then \ echo "Error: Docker exec failed with return code $$DOCKER_EXEC_RESULT"; \ diff --git a/housekeeping/docker/kagome-dev/kagome_builder_deb.Dockerfile b/housekeeping/docker/kagome-dev/kagome_builder_deb.Dockerfile index 6fb188d077..a89308aeca 100644 --- a/housekeeping/docker/kagome-dev/kagome_builder_deb.Dockerfile +++ b/housekeeping/docker/kagome-dev/kagome_builder_deb.Dockerfile @@ -5,7 +5,7 @@ ARG RUST_VERSION ARG ARCHITECTURE=x86_64 ARG DEBIAN_VERSION=bookworm -ARG LLVM_VERSION=18 +ARG LLVM_VERSION=19 FROM ${BASE_IMAGE}