Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 22 additions & 33 deletions .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ on:
push:
branches:
- 'main'
paths:
- '**/*.c'
- '**/*.cpp'
- '**/*.h'
- '**/*.hpp'

pull_request:
types:
Expand All @@ -18,43 +13,37 @@ on:
- synchronize
branches:
- 'main'
paths:
- '**/*.c'
- '**/*.cpp'
- '**/*.h'
- '**/*.hpp'

workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'

jobs:
format-check:
verify-format:
runs-on: ubuntu-latest
strategy:
matrix:
path:
- check: 'cores/arduino/'
exclude: 'cores/arduino/api/'
- check: 'loader/'
exclude: 'loader/llext_exports\.c$'
- check: 'libraries/'
exclude: '(examples|extras|ea_malloc)'
fail-fast: false

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: false
persist-credentials: false

- name: Get changed source files that need format check
id: changed-files
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
files: |
cores/arduino/**/*.{c,cpp,h,hpp,ino}
loader/**/*.{c,cpp,h,hpp,ino}
libraries/**/*.{c,cpp,h,hpp,ino}
files_ignore: |
cores/arduino/api/**
loader/llext_exports.c
libraries/examples/**
libraries/extras/**
libraries/ea_malloc/**
write_output_files: true
- name: List changed files
if: steps.changed-files.outputs.any_changed == 'true'
run: cat .github/outputs/all_changed_files.txt
- name: Run clang-format check
uses: jidicula/[email protected]
if: steps.changed-files.outputs.any_changed == 'true'
uses: pillo79/clang-format-action@05f671e71f0758aba4d3c9dbb0ee81bc5f0137c6
with:
clang-format-version: '19'
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}
check-files-from: .github/outputs/all_changed_files.txt
1 change: 0 additions & 1 deletion .github/workflows/package_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ jobs:
failOnError: false

verify-core:
name: Collect job errors
runs-on: ubuntu-latest
if: cancelled() || contains(needs.*.result, 'failure')
needs:
Expand Down
2 changes: 1 addition & 1 deletion loader/main.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/*
* Copyright (C) 2024 Arduino SA
*
Expand Down Expand Up @@ -40,7 +40,7 @@
DEVICE_DT_GET(DT_PHANDLE_BY_IDX(DT_PATH(zephyr_user), cdc_acm, 0));

static int enable_shell_usb(void) {
bool log_backend = CONFIG_SHELL_BACKEND_SERIAL_LOG_LEVEL > 0;
bool log_backend = CONFIG_SHELL_BACKEND_SERIAL_LOG_LEVEL > 0;
uint32_t level = (CONFIG_SHELL_BACKEND_SERIAL_LOG_LEVEL > LOG_LEVEL_DBG) ?
CONFIG_LOG_MAX_LEVEL :
CONFIG_SHELL_BACKEND_SERIAL_LOG_LEVEL;
Expand Down
Loading