From 0220e8b13d798b6779e8cc37a540aa12f629aaf5 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Fri, 16 Feb 2024 05:00:17 -0800 Subject: [PATCH 1/6] satisfy nRF24/.github#9 --- .clang-format | 33 ++++++++++---------------- .github/workflows/build_arduino.yml | 2 ++ .github/workflows/build_platformIO.yml | 2 ++ .github/workflows/doxygen.yml | 3 ++- 4 files changed, 18 insertions(+), 22 deletions(-) diff --git a/.clang-format b/.clang-format index 5305356..c02cf2f 100644 --- a/.clang-format +++ b/.clang-format @@ -14,13 +14,13 @@ AlignTrailingComments: true AllowAllArgumentsOnNextLine: true AllowAllConstructorInitializersOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true -AllowShortEnumsOnASingleLine: true -AllowShortBlocksOnASingleLine: Always -AllowShortCaseLabelsOnASingleLine: false +AllowShortEnumsOnASingleLine: false +AllowShortBlocksOnASingleLine: Empty +AllowShortCaseLabelsOnASingleLine: true AllowShortFunctionsOnASingleLine: All AllowShortLambdasOnASingleLine: All -AllowShortIfStatementsOnASingleLine: WithoutElse -AllowShortLoopsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: Yes @@ -67,10 +67,7 @@ DeriveLineEnding: false DerivePointerAlignment: false DisableFormat: false EmptyLineBeforeAccessModifier: Always -# --- -# only in v13+ -# EmptyLineAfterAccessModifier: Leave -# --- +EmptyLineAfterAccessModifier: Leave ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true IncludeBlocks: Preserve @@ -89,10 +86,7 @@ IncludeCategories: CaseSensitive: false IncludeIsMainRegex: "(Test)?$" IncludeIsMainSourceRegex: "" -# --- -# only in v13+ -# IndentAccessModifiers: false -# --- +IndentAccessModifiers: false IndentCaseLabels: true IndentCaseBlocks: false IndentGotoLabels: false @@ -117,15 +111,12 @@ PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 60 PenaltyIndentedWhitespace: 0 PointerAlignment: Left -# --- -# only in v13+ -# ReferenceAlignment: Right -# --- +ReferenceAlignment: Pointer ReflowComments: true -# --- -# only in v13+ -# ShortNamespaceLines: 0 -# --- +SpacesInLineCommentPrefix: + Maximum: -1 + Minimum: 0 +ShortNamespaceLines: 0 # Sort**** is about sorting include/using statements alphabetically SortIncludes: false SortUsingDeclarations: false diff --git a/.github/workflows/build_arduino.yml b/.github/workflows/build_arduino.yml index 1299fb4..526743d 100644 --- a/.github/workflows/build_arduino.yml +++ b/.github/workflows/build_arduino.yml @@ -2,12 +2,14 @@ name: Arduino CLI build on: pull_request: + branches: [master] types: [opened, reopened] paths: - ".github/workflows/build_arduino.yml" - "examples/**" push: + branches: [master] paths: - ".github/workflows/build_arduino.yml" - "examples/**" diff --git a/.github/workflows/build_platformIO.yml b/.github/workflows/build_platformIO.yml index d02a77f..d66c770 100644 --- a/.github/workflows/build_platformIO.yml +++ b/.github/workflows/build_platformIO.yml @@ -2,6 +2,7 @@ name: PlatformIO build on: pull_request: + branches: [master] types: [opened, reopened] paths: - ".github/workflows/build_platformIO.yml" @@ -12,6 +13,7 @@ on: - "!Dns.*" - "!clock-arch.*" push: + branches: [master] paths: - ".github/workflows/build_platformIO.yml" - "library.json" diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index 1256af3..cfb6c3a 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -2,6 +2,7 @@ name: DoxyGen build on: pull_request: + branches: [master] types: [opened, reopened] paths: - "*.h" @@ -14,6 +15,7 @@ on: - "Doxyfile" - "library.properties" # get lib version from here push: + branches: [master] paths: - "*.h" - "docs/**" @@ -25,7 +27,6 @@ on: - "Doxyfile" - "library.properties" # get lib version from here release: - branches: [master] types: [published, edited] workflow_dispatch: From a577371a0fa8b724adbf0d1666dccbfaa594bf2b Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Fri, 16 Feb 2024 05:01:27 -0800 Subject: [PATCH 2/6] ran clang-format --- RF24Client.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/RF24Client.cpp b/RF24Client.cpp index 99d7e11..49f2648 100644 --- a/RF24Client.cpp +++ b/RF24Client.cpp @@ -352,24 +352,24 @@ void serialip_appcall(void) // Only call this if the TCP window has already been re-opened, the connection is being polled, but no data // has been acked if (!(u->state & (UIP_CLIENT_CLOSE | UIP_CLIENT_REMOTECLOSED))) - { - - if (u->windowOpened == true && u->state & UIP_CLIENT_RESTART && millis() - u->restartTime > u->restartInterval) { - u->restartTime = millis(); + + if (u->windowOpened == true && u->state & UIP_CLIENT_RESTART && millis() - u->restartTime > u->restartInterval) + { + u->restartTime = millis(); #if defined RF24ETHERNET_DEBUG_CLIENT || defined ETH_DEBUG_L1 - Serial.println(); - Serial.print(millis()); + Serial.println(); + Serial.print(millis()); #if UIP_CONNECTION_TIMEOUT > 0 - Serial.print(F(" UIPClient Re-Open TCP Window, time remaining before abort: ")); - Serial.println(UIP_CONNECTION_TIMEOUT - (millis() - u->connectTimer)); + Serial.print(F(" UIPClient Re-Open TCP Window, time remaining before abort: ")); + Serial.println(UIP_CONNECTION_TIMEOUT - (millis() - u->connectTimer)); #endif #endif - u->restartInterval += 500; - u->restartInterval = rf24_min(u->restartInterval, 7000); - uip_restart(); + u->restartInterval += 500; + u->restartInterval = rf24_min(u->restartInterval, 7000); + uip_restart(); + } } - } } /*******Close**********/ From 195835824c17366325144e86d2ccb705aaffb728 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sat, 17 Feb 2024 04:58:12 -0800 Subject: [PATCH 3/6] use separate workflow to check code format also remove PR event types in CI triggers --- .github/workflows/build_arduino.yml | 7 ------- .github/workflows/build_platformIO.yml | 9 +-------- .github/workflows/clang_format.yml | 14 ++++++++++++++ .github/workflows/doxygen.yml | 1 - 4 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/clang_format.yml diff --git a/.github/workflows/build_arduino.yml b/.github/workflows/build_arduino.yml index 526743d..27ead50 100644 --- a/.github/workflows/build_arduino.yml +++ b/.github/workflows/build_arduino.yml @@ -3,7 +3,6 @@ name: Arduino CLI build on: pull_request: branches: [master] - types: [opened, reopened] paths: - ".github/workflows/build_arduino.yml" - "examples/**" @@ -15,14 +14,8 @@ on: - "examples/**" jobs: - check_formatting: - uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main - with: - ignore: 'utility|clock-arch.c|clock-arch.h|Dns.cpp|Dns.h' - extensions: ino,cpp,h build: - needs: check_formatting uses: nRF24/.github/.github/workflows/build_arduino.yaml@main with: sketch-paths: | diff --git a/.github/workflows/build_platformIO.yml b/.github/workflows/build_platformIO.yml index d66c770..656428e 100644 --- a/.github/workflows/build_platformIO.yml +++ b/.github/workflows/build_platformIO.yml @@ -3,7 +3,6 @@ name: PlatformIO build on: pull_request: branches: [master] - types: [opened, reopened] paths: - ".github/workflows/build_platformIO.yml" - "library.json" @@ -32,14 +31,8 @@ jobs: with: deploy-release: ${{ github.event_name == 'release' }} - check_formatting: - uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main - with: - ignore: 'utility|clock-arch.c|clock-arch.h|Dns.cpp|Dns.h' - extensions: ino,cpp,h - build: - needs: [check_formatting, validate_lib_json] + needs: [validate_lib_json] if: uses: nRF24/.github/.github/workflows/build_platformio.yaml@main with: diff --git a/.github/workflows/clang_format.yml b/.github/workflows/clang_format.yml new file mode 100644 index 0000000..162a8f9 --- /dev/null +++ b/.github/workflows/clang_format.yml @@ -0,0 +1,14 @@ +name: check code formatting + +on: + push: + branches: [master, v1.x] + pull_request: + branches: [master, v1.x] + +jobs: + check_formatting: + uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main + with: + ignore: 'utility|clock-arch.c|clock-arch.h|Dns.cpp|Dns.h' + extensions: ino,c,cpp,h diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index cfb6c3a..80d1b2c 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -3,7 +3,6 @@ name: DoxyGen build on: pull_request: branches: [master] - types: [opened, reopened] paths: - "*.h" - "docs/**" From 4c4f06fb1e48e03c01d4eacf6aa6665e4bb6e046 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sat, 17 Feb 2024 04:58:23 -0800 Subject: [PATCH 4/6] enable dependabot --- .github/dependabot.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..05a48fc --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" + # Workflow files stored in the + # default location of `.github/workflows` + directory: "/" + schedule: + interval: "weekly" From e9e8f4cddf0d8ebef2ca6bd4d76ca659ee18ca53 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Tue, 20 Feb 2024 05:57:20 -0800 Subject: [PATCH 5/6] move blue pill CI builds from PIO to Arduino --- .github/workflows/build_arduino.yml | 3 +++ .github/workflows/build_platformIO.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_arduino.yml b/.github/workflows/build_arduino.yml index 27ead50..7f4da04 100644 --- a/.github/workflows/build_arduino.yml +++ b/.github/workflows/build_arduino.yml @@ -52,6 +52,8 @@ jobs: - name: arduino:megaavr - name: arduino:samd - name: arduino:mbed + - name: STMicroelectronics:stm32 + source-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json # - name: arduino:sam strategy: fail-fast: false @@ -96,6 +98,7 @@ jobs: - "arduino:samd:tian" - "arduino:megaavr:uno2018" # - "arduino:megaavr:nano4809" # board not found + - "STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8" # By default, don't generate size deltas data. enable-deltas-report: - false diff --git a/.github/workflows/build_platformIO.yml b/.github/workflows/build_platformIO.yml index 656428e..2078214 100644 --- a/.github/workflows/build_platformIO.yml +++ b/.github/workflows/build_platformIO.yml @@ -65,4 +65,4 @@ jobs: board: - "tinypico" - "nodemcuv2" - - "bluepill_f103c8" + # - "bluepill_f103c8" From f9881f578cf28800a2076ae709434249e9cb9d67 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Tue, 20 Feb 2024 16:01:30 -0800 Subject: [PATCH 6/6] Revert "move blue pill CI builds from PIO to Arduino" This reverts commit e9e8f4cddf0d8ebef2ca6bd4d76ca659ee18ca53. --- .github/workflows/build_arduino.yml | 3 --- .github/workflows/build_platformIO.yml | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build_arduino.yml b/.github/workflows/build_arduino.yml index 7f4da04..27ead50 100644 --- a/.github/workflows/build_arduino.yml +++ b/.github/workflows/build_arduino.yml @@ -52,8 +52,6 @@ jobs: - name: arduino:megaavr - name: arduino:samd - name: arduino:mbed - - name: STMicroelectronics:stm32 - source-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json # - name: arduino:sam strategy: fail-fast: false @@ -98,7 +96,6 @@ jobs: - "arduino:samd:tian" - "arduino:megaavr:uno2018" # - "arduino:megaavr:nano4809" # board not found - - "STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8" # By default, don't generate size deltas data. enable-deltas-report: - false diff --git a/.github/workflows/build_platformIO.yml b/.github/workflows/build_platformIO.yml index 2078214..656428e 100644 --- a/.github/workflows/build_platformIO.yml +++ b/.github/workflows/build_platformIO.yml @@ -65,4 +65,4 @@ jobs: board: - "tinypico" - "nodemcuv2" - # - "bluepill_f103c8" + - "bluepill_f103c8"