From 7f6632b6385c17bd07c536aa3b1456f63c1bec3f Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Thu, 24 Nov 2022 09:49:24 +0100 Subject: [PATCH 1/5] ci: replace deprecated spellcheck by codespell --- .github/workflows/Continuous-Integration.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Continuous-Integration.yml b/.github/workflows/Continuous-Integration.yml index 56e6403..e4a17b1 100644 --- a/.github/workflows/Continuous-Integration.yml +++ b/.github/workflows/Continuous-Integration.yml @@ -33,14 +33,21 @@ jobs: run: | cat ${{ steps.Astyle.outputs.astyle-result }} exit 1 - spell-check: + codespell: + name: Check for spelling errors runs-on: ubuntu-latest - name: Spell check steps: - - uses: actions/checkout@main - - uses: arduino/actions/libraries/spell-check@master - # with: - # ignore-words-list: "./extras/codespell-ignore-words-list.txt" + - name: Checkout + uses: actions/checkout@main + + # See: https://github.com/codespell-project/actions-codespell/blob/master/README.md + - name: Spell check + uses: codespell-project/actions-codespell@master + with: + check_filenames: true + check_hidden: true + # In the event of a false positive, add the word in all lower case to this file: + # ignore_words_file: ./extras/codespell-ignore-words-list.txt lib_build: runs-on: ubuntu-latest name: Library compilation From a0c971861cad92907c8f9cddfb75021bb52620be Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Thu, 24 Nov 2022 18:02:41 +0100 Subject: [PATCH 2/5] refactor(ci): split by type Build will now compile for all nucleo. Signed-off-by: Frederic Pillon --- .github/workflows/CodeSpell.yml | 26 +++++++++++++++ .github/workflows/Continuous-Integration.yml | 35 +------------------- .github/workflows/astyle.yml | 35 ++++++++++++++++++++ 3 files changed, 62 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/CodeSpell.yml create mode 100644 .github/workflows/astyle.yml diff --git a/.github/workflows/CodeSpell.yml b/.github/workflows/CodeSpell.yml new file mode 100644 index 0000000..df482ae --- /dev/null +++ b/.github/workflows/CodeSpell.yml @@ -0,0 +1,26 @@ +name: Check misspelled words with codespell + +on: + push: + branches: + - main + pull_request: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@main + + # See: https://github.com/codespell-project/actions-codespell/blob/master/README.md + - name: Spell check + uses: codespell-project/actions-codespell@master + with: + check_filenames: true + check_hidden: true + # In the event of a false positive, add the word in all lower case to this file: + # ignore_words_file: ./CI/codespell/.codespellignore diff --git a/.github/workflows/Continuous-Integration.yml b/.github/workflows/Continuous-Integration.yml index e4a17b1..fa839df 100644 --- a/.github/workflows/Continuous-Integration.yml +++ b/.github/workflows/Continuous-Integration.yml @@ -15,39 +15,6 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: - astyle_check: - runs-on: ubuntu-latest - name: AStyle check - steps: - # First of all, clone the repo using the checkout action. - - name: Checkout - uses: actions/checkout@main - - - name: Astyle check - id: Astyle - uses: stm32duino/actions/astyle-check@main - - # Use the output from the `Astyle` step - - name: Astyle Errors - if: failure() - run: | - cat ${{ steps.Astyle.outputs.astyle-result }} - exit 1 - codespell: - name: Check for spelling errors - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@main - - # See: https://github.com/codespell-project/actions-codespell/blob/master/README.md - - name: Spell check - uses: codespell-project/actions-codespell@master - with: - check_filenames: true - check_hidden: true - # In the event of a false positive, add the word in all lower case to this file: - # ignore_words_file: ./extras/codespell-ignore-words-list.txt lib_build: runs-on: ubuntu-latest name: Library compilation @@ -60,7 +27,7 @@ jobs: id: Compile uses: stm32duino/actions/compile-examples@main with: - board-pattern: ".*NUCLEO_([^F]|F[^0]|F0[^34]).*" + board-pattern: ".*NUCLEO.*" custom-config: "./extras/rtc_cores_config.json" # Use the output from the `Compile` step diff --git a/.github/workflows/astyle.yml b/.github/workflows/astyle.yml new file mode 100644 index 0000000..18b9f26 --- /dev/null +++ b/.github/workflows/astyle.yml @@ -0,0 +1,35 @@ +name: Check code formatting with astyle +on: + push: + branches: + - main + paths-ignore: + - '*' + - '**.md' + - '**.txt' + pull_request: + paths-ignore: + - '*' + - '**.md' + - '**.txt' + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +jobs: + astyle_check: + runs-on: ubuntu-latest + name: Check for astyle errors + steps: + # First of all, clone the repo using the checkout action. + - name: Checkout + uses: actions/checkout@main + + - name: Astyle check + id: Astyle + uses: stm32duino/actions/astyle-check@main + + # Use the output from the `Astyle` step + - name: Astyle Errors + if: failure() + run: | + cat ${{ steps.Astyle.outputs.astyle-result }} + exit 1 From 42252f331c4d6fef354a898f46885ac4b2c52f55 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Thu, 24 Nov 2022 18:03:43 +0100 Subject: [PATCH 3/5] fix: only some STM32F0 have HAL_RTCEx_WakeUpTimerIRQHandler Signed-off-by: Frederic Pillon --- src/rtc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rtc.c b/src/rtc.c index 662aa80..85ce964 100644 --- a/src/rtc.c +++ b/src/rtc.c @@ -864,7 +864,10 @@ void RTC_Alarm_IRQHandler(void) { HAL_RTC_AlarmIRQHandler(&RtcHandle); -#if defined(STM32F0xx) || defined(STM32G0xx) || defined(STM32L0xx) || defined(STM32L5xx) || defined(STM32U5xx) +#if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || \ + defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F070xB) || \ + defined(STM32F030xC) || defined(STM32G0xx) || defined(STM32L0xx) || \ + defined(STM32L5xx) || defined(STM32U5xx) // In some cases, the same vector is used to manage WakeupTimer, // but with a dedicated HAL IRQHandler HAL_RTCEx_WakeUpTimerIRQHandler(&RtcHandle); From 2778a4c5f90bd9be7ac7a3bcb47ecec09fa56427 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Thu, 24 Nov 2022 19:59:32 +0100 Subject: [PATCH 4/5] chore: bump version to 1.3.4 --- library.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.json b/library.json index fb030f0..cd37329 100644 --- a/library.json +++ b/library.json @@ -7,7 +7,7 @@ "type": "git", "url": "https://github.com/stm32duino/STM32RTC" }, - "version": "1.3.3", + "version": "1.3.4", "frameworks": "arduino", "platforms": "ststm32", "build": { From 32b412b2a5728daddf6c0de6cd4dc471fdb50c1e Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Thu, 24 Nov 2022 19:59:51 +0100 Subject: [PATCH 5/5] chore: bump version to 1.3.4 --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 9079d31..bfd70ef 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=STM32duino RTC -version=1.3.3 +version=1.3.4 author=STMicroelectronics, Wi6Labs maintainer=stm32duino sentence=Allows to use the RTC functionalities of STM32 based boards.