Skip to content

Commit

Permalink
ClangTidy - new build workflow updated
Browse files Browse the repository at this point in the history
  • Loading branch information
qdrvm-ci committed Aug 22, 2024
1 parent 1295582 commit ee502a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 27 deletions.
29 changes: 3 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ env:
DEFAULT_BUILD_TYPE: Release
GIT_REF_NAME: ${{ github.ref_name }}
IS_MAIN_OR_TAG: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) }}
CI: true


jobs:
Expand Down Expand Up @@ -132,29 +131,6 @@ jobs:
- name: "${{ matrix.options.name }}"
run: "${{ matrix.options.run }}"

clang-tidy:
name: "Linux: clang-tidy"
runs-on: ubuntu-latest
timeout-minutes: 120
container: qdrvm/kagome-dev:9-minideb
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v4
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ env.CACHE_VERSION }}
- name: clang-tidy
env:
# build only generated files, so clang-tidy will work correctly
BUILD_FINAL_TARGET: generated
# run build for both WAVM and WasmEdge to download both, otherwise clang-tidy
# isn't able to find headers
run: |
./housekeeping/make_build.sh
./housekeeping/clang-tidy-diff.sh
coverage-self-hosted:
if: false # ${{ github.ref == 'refs/heads/master' || startsWith( github.ref, 'refs/tags/') || contains( github.event.pull_request.labels.*.name, 'Non-master self-hosted') }}
name: "Self-hosted: Linux: gcc-12 coverage/sonar"
Expand Down Expand Up @@ -221,7 +197,7 @@ jobs:
kagome_dev_docker_build_tidy:
runs-on: ubuntu-latest
timeout-minutes: 180
name: "Linux: clang-tidy GCE"
name: "Linux: clang-tidy"

steps:
- name: "Checkout repository"
Expand Down Expand Up @@ -261,7 +237,8 @@ jobs:
make kagome_dev_docker_build_tidy \
DOCKER_REGISTRY_PATH=${DOCKER_REGISTRY_PATH} \
GITHUB_HUNTER_USERNAME=${{ secrets.HUNTER_USERNAME }} \
GITHUB_HUNTER_TOKEN=${{ secrets.HUNTER_TOKEN }}
GITHUB_HUNTER_TOKEN=${{ secrets.HUNTER_TOKEN }} \
CI="true"

- name: "Cleaning cache"
run: |
Expand Down
3 changes: 2 additions & 1 deletion housekeeping/docker/kagome-dev/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ REGION ?= europe-north1
# CI Variables
IS_MAIN_OR_TAG ?= false
GIT_REF_NAME ?=
CI ?= false

export DOCKER_BUILDKIT=1
# BUILDKIT_PROGRESS - auto, plain, tty, rawjson
Expand Down Expand Up @@ -159,7 +160,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/ && export CI='true' && ./housekeeping/clang-tidy-diff.sh \
cd /opt/kagome/ && export CI='$(CI)' && ./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"; \
Expand Down

0 comments on commit ee502a3

Please sign in to comment.