Skip to content

Bump attrs from 25.4.0 to 26.1.0 #118

Bump attrs from 25.4.0 to 26.1.0

Bump attrs from 25.4.0 to 26.1.0 #118

Workflow file for this run

name: Code Style

Check failure on line 1 in .github/workflows/code_style.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/code_style.yml

Invalid workflow file

(Line: 41, Col: 3): 'clang-format' is already defined, (Line: 136, Col: 3): 'ShellCheck' is already defined
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
clang-format:
runs-on: ubuntu-22.04
if: ${{ github.repository_owner == 'openvinotoolkit' }}
permissions:
contents: read
checks: write
issues: write
pull-requests: write
steps:
- name: Checkout
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
- uses: ./.github/actions/handle_docker
id: handle_docker
with:
images: |
ov_test/ubuntu_24_04_x64_code_style
ov_test/ubuntu_22_04_x64_code_style
registry: 'openvinogithubactions.azurecr.io'
dockerfiles_root_dir: '.github/dockerfiles'
changed_components: ${{ needs.smart_ci.outputs.changed_components }}
clang-format:
needs: Docker
runs-on: aks-linux-4-cores-16gb
container:
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_24_04_x64_code_style }}
volumes:
- /mount:/mount
options: --user 1001 # We use standard github-actions user inside container to avoid permission issues after checkout
steps:
- uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
submodules: 'true'
# Run cmake with extra options to cover as much source code as possible:
# - -DENABLE_PROFILING_ITT=FULL -DSELECTIVE_BUILD=COLLECT to enable codestyle check for ITT collector
# - -DENABLE_SNIPPETS_LIBXSMM_TPP to cover snippets TPP adaptation
- name: CMake configure
run: cmake -DENABLE_PYTHON=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=FULL -DSELECTIVE_BUILD=COLLECT -DENABLE_SNIPPETS_LIBXSMM_TPP=ON -B build
- name: Create code style diff
run: cmake --build build --target clang_format_fix_all -j8
- name: suggester / clang-format
if: startsWith(github.event_name, 'pull_request')
uses: reviewdog/action-suggester@4747dbc9f9e37adba0943e681cc20db466642158 # v1.19.0
with:
github_token: ${{ github.token }}
tool_name: "clang-format"
reviewdog_flags: -reporter=github-pr-review
level: warning
fail_level: error
filter_mode: nofilter
clang-format-aarch64:
needs: Docker
runs-on: aks-linux-4-cores-16gb
container:
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_24_04_x64_code_style }}
volumes:
- /mount:/mount
options: --user 1001 # We use standard github-actions user inside container to avoid permission issues after checkout
steps:
- uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
submodules: 'true'
# Run cmake with extra options to cover as much source code as possible:
# - -DENABLE_PROFILING_ITT=FULL -DSELECTIVE_BUILD=COLLECT to enable codestyle check for ITT collector
# - -DENABLE_SNIPPETS_LIBXSMM_TPP to cover snippets TPP adaptation
- name: CMake configure
run: cmake -DENABLE_CLANG_FORMAT=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=FULL -DSELECTIVE_BUILD=COLLECT -DENABLE_SNIPPETS_LIBXSMM_TPP=ON -DCMAKE_TOOLCHAIN_FILE=cmake/arm64.toolchain.cmake -B build_arm64
- name: Create code style diff
run: cmake --build build_arm64 --target clang_format_fix_all -j8
- name: suggester / clang-format
if: startsWith(github.event_name, 'pull_request')
uses: reviewdog/action-suggester@4747dbc9f9e37adba0943e681cc20db466642158 # v1.19.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
level: warning
fail_level: error
filter_mode: nofilter
ShellCheck:
runs-on: ubuntu-22.04
if: ${{ github.repository_owner == 'openvinotoolkit' }}
permissions:
contents: read
checks: write
issues: write
pull-requests: write
steps:
- uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
submodules: 'true'
- name: CMake configure
run: cmake -DENABLE_CLANG_FORMAT=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=FULL -DSELECTIVE_BUILD=COLLECT -DTHREADING=SEQ -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/riscv64.linux.toolchain.cmake -B build_riscv64
- name: Create code style diff
run: cmake --build build_riscv64 --target clang_format_fix_all -j8
- name: suggester / clang-format
if: startsWith(github.event_name, 'pull_request')
uses: reviewdog/action-suggester@4747dbc9f9e37adba0943e681cc20db466642158 # v1.19.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
level: warning
fail_level: error
filter_mode: nofilter
ShellCheck:
needs: Docker
runs-on: aks-linux-4-cores-16gb
container:
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64_code_style }}
volumes:
- /mount:/mount
options: --user 1001 # We use standard github-actions user inside container to avoid permission issues after checkout
steps:
- uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
submodules: 'true'
- name: CMake configure
run: cmake -B build
#
# - name: Shellcheck cmake target
# run: cmake --build build --target ov_shellcheck -j8
# always provide suggestions even for skipped scripts in ov_shellcheck target
- name: ShellCheck action
if: always()
uses: reviewdog/action-shellcheck@4c07458293ac342d477251099501a718ae5ef86e # v1.32.0
with:
reporter: github-pr-review
check_all_files_with_shebangs: true
fail_level: error
exclude: |
"*/thirdparty/*"
"./temp/*"
"*/.git/*"
NamingConventionCheck:
needs: Docker
runs-on: aks-linux-4-cores-16gb
container:
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64_code_style }}
volumes:
- /mount:/mount
options: --user 1001 # We use standard github-actions user inside container to avoid permission issues after checkout
steps:
- uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
submodules: 'true'
- name: Install Python-based dependencies
run: python3 -m pip install -r cmake/developer_package/ncc_naming_style/requirements_dev.txt
- name: CMake configure
run: cmake -DENABLE_NCC_STYLE=ON -B build
- name: Naming convention check
run: cmake --build build --target ncc_all -j8
- name: suggester / Naming Convention
if: always()
uses: reviewdog/action-suggester@v1
with:
github_token: ${{ github.token }}
reviewdog_flags: -reporter=github-pr-review
level: error
fail_on_error: true