Skip to content

Commit

Permalink
Merge branch 'test/support-run-coding-convention' of https://github.c…
Browse files Browse the repository at this point in the history
…om/SiliconLabs/IEC60730_Libs into test/support-run-coding-convention
  • Loading branch information
Bich Vu Thi Ngoc committed Oct 14, 2024
2 parents 2772dc0 + 5fefbee commit fc9bcf8
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coding_convention.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Coding Convention
on:
push:
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
REPO_LINK: https://github.com/${{ github.repository }}.git
jobs:
job1:
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Run test
run: |
pre-commit run --all-files > CodingConventionTool.txt
- name: Upload Result
if: always()
uses: actions/[email protected]
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/generate_firmware.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Generate Firmware
on:
push:
branches:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
Expand All @@ -24,7 +24,7 @@ jobs:
permissions:
contents: read
pull-requests: write
env:
env:
BOARD_NAME: brd4187c
HOST_IP: 192.168.1.69
TOOL_DIRS: arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
permissions:
contents: read
pull-requests: write
env:
env:
BOARD_NAME: brd4161a
HOST_IP: 192.168.1.69
TOOL_DIRS: arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:
- name: Generate image
run: |
export PATH=$PATH:$PWD/commander
export PATH=$PATH:$PWD/slc_cli
export PATH=$PATH:$PWD/slc_cli
export TOOL_DIRS=$PWD/$TOOL_DIRS
export PATH=$PATH:/usr/bin/
export SDK_PATH=$PWD/gecko_sdk_$SDK_VER
Expand Down Expand Up @@ -290,6 +290,3 @@ jobs:
path: ${{ github.workspace }}/build/test/integration_test/build/${{ env.BOARD_NAME }}/integration_test_iec60730_invariable_memory/NS/
warn: Output a warning but do not fail the action
retention-days: 90



20 changes: 10 additions & 10 deletions .github/workflows/integration_test_auto.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Integration Tests Auto Trigger
on:
push:
branches:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
Expand All @@ -18,14 +18,14 @@ jobs:
permissions:
contents: read
pull-requests: write
env:
env:
BOARD_NAME: brd4187c
HOST_IP: 192.168.1.69
COMPILER: GCC
TOOL_CHAINS: GCC
TASK: all
COMPONENTS: all
ADAPTER_SN: 440111030
ADAPTER_SN: 440111030
CHIP: EFR32MG24BXXXF1536
TOOL_DIRS: /home/sqa/SimplicityStudio-5/SimplicityStudio_v5/developer/toolchains/gnu_arm/12.2.rel1_2023.7/bin
START_ADDR_FLASH: 0x8000000
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
slc signature trust -extpath $SDK_PATH/extension/$REPO_NAME
cd ../test
bash execute_integration_test.sh ${BOARD_NAME} $TASK $COMPONENTS $ADAPTER_SN $COMPILER > Test_integration_${BOARD_NAME}_GCC_1.txt
bash execute_integration_test.sh ${BOARD_NAME} $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DTEST_SECURE_PERIPHERALS_ENABLE=ON -DINTEGRATION_TEST_WDOG1_ENABLE=ON -DINTEGRATION_TEST_USE_MARCHX_DISABLE=ON -DENABLE_CAL_CRC_32=ON" > Test_integration_${BOARD_NAME}_GCC_2.txt
bash execute_integration_test.sh ${BOARD_NAME} $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DTEST_SECURE_PERIPHERALS_ENABLE=ON -DINTEGRATION_TEST_WDOG1_ENABLE=ON -DINTEGRATION_TEST_USE_MARCHX_DISABLE=ON -DENABLE_CRC_USE_SW=ON" > Test_integration_${BOARD_NAME}_GCC_3.txt
Expand All @@ -76,8 +76,8 @@ jobs:
path: test/Test_integration_${{env.BOARD_NAME}}_*.txt
warn: Output a warning but do not fail the action
retention-days: 90


job2:
name: Integration test for mg12 with gcc
runs-on: [self-hosted, ds-sqa-hn-iec]
Expand All @@ -86,14 +86,14 @@ jobs:
permissions:
contents: read
pull-requests: write
env:
env:
BOARD_NAME: brd4161a
HOST_IP: 192.168.1.69
COMPILER: GCC
TOOL_CHAINS: GCC
TASK: all
COMPONENTS: all
ADAPTER_SN: 440189400
ADAPTER_SN: 440189400
CHIP: EFR32MG12
TOOL_DIRS: /home/sqa/SimplicityStudio-5/SimplicityStudio_v5/developer/toolchains/gnu_arm/12.2.rel1_2023.7/bin
START_ADDR_FLASH: 0x0000000
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
slc signature trust -extpath $SDK_PATH/extension/$REPO_NAME
cd ../test
bash execute_integration_test.sh ${BOARD_NAME} $TASK $COMPONENTS $ADAPTER_SN $COMPILER > Test_integration_${BOARD_NAME}_GCC_1.txt
bash execute_integration_test.sh ${BOARD_NAME} $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DTEST_SECURE_PERIPHERALS_ENABLE=ON -DINTEGRATION_TEST_WDOG1_ENABLE=ON -DINTEGRATION_TEST_USE_MARCHX_DISABLE=ON -DENABLE_CAL_CRC_32=ON" > Test_integration_${BOARD_NAME}_GCC_2.txt
bash execute_integration_test.sh ${BOARD_NAME} $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DTEST_SECURE_PERIPHERALS_ENABLE=ON -DINTEGRATION_TEST_WDOG1_ENABLE=ON -DINTEGRATION_TEST_USE_MARCHX_DISABLE=ON -DENABLE_CRC_USE_SW=ON" > Test_integration_${BOARD_NAME}_GCC_3.txt
Expand All @@ -144,4 +144,4 @@ jobs:
name: integration_test_log_mg12_gcc
path: test/Test_integration_${{env.BOARD_NAME}}_*.txt
warn: Output a warning but do not fail the action
retention-days: 90
retention-days: 90
18 changes: 9 additions & 9 deletions .github/workflows/unit_test_auto.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Unit Tests Auto Trigger
on:
push:
branches:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
Expand All @@ -18,14 +18,14 @@ jobs:
permissions:
contents: read
pull-requests: write
env:
env:
BOARD_NAME: brd4187c
HOST_IP: 192.168.1.69
COMPILER: GCC
TOOL_CHAINS: GCC
TASK: all
COMPONENTS: all
ADAPTER_SN: 440111030
ADAPTER_SN: 440111030
CHIP: EFR32MG24BXXXF1536
TOOL_DIRS: /home/sqa/SimplicityStudio-5/SimplicityStudio_v5/developer/toolchains/gnu_arm/12.2.rel1_2023.7/bin
START_ADDR_FLASH: 0x8000000
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
slc signature trust -extpath $SDK_PATH/extension/$REPO_NAME
cd ../test
bash execute_unit_test.sh ${BOARD_NAME} $TASK $COMPONENTS $ADAPTER_SN $COMPILER > Test_integration_${BOARD_NAME}_GCC_1.txt
bash execute_unit_test.sh ${BOARD_NAME} $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DENABLE_CAL_CRC_32=ON" > Test_integration_${BOARD_NAME}_GCC_2.txt
bash execute_unit_test.sh ${BOARD_NAME} $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DENABLE_CRC_USE_SW=ON" > Test_integration_${BOARD_NAME}_GCC_3.txt
Expand All @@ -77,8 +77,8 @@ jobs:
path: test/Test_integration_${{env.BOARD_NAME}}_*.txt
warn: Output a warning but do not fail the action
retention-days: 90


job2:
name: Unit test for mg12 with gcc
runs-on: [self-hosted, ds-sqa-hn-iec]
Expand All @@ -87,14 +87,14 @@ jobs:
permissions:
contents: read
pull-requests: write
env:
env:
BOARD_NAME: brd4161a
HOST_IP: 192.168.1.69
COMPILER: GCC
TOOL_CHAINS: GCC
TASK: all
COMPONENTS: all
ADAPTER_SN: 440189400
ADAPTER_SN: 440189400
CHIP: EFR32MG12
TOOL_DIRS: /home/sqa/SimplicityStudio-5/SimplicityStudio_v5/developer/toolchains/gnu_arm/12.2.rel1_2023.7/bin
START_ADDR_FLASH: 0x0000000
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
slc signature trust -extpath $SDK_PATH/extension/$REPO_NAME
cd ../test
bash execute_unit_test.sh ${BOARD_NAME} $TASK $COMPONENTS $ADAPTER_SN $COMPILER > Test_integration_${BOARD_NAME}_GCC_1.txt
bash execute_unit_test.sh ${BOARD_NAME} $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DENABLE_CAL_CRC_32=ON" > Test_integration_${BOARD_NAME}_GCC_2.txt
bash execute_unit_test.sh ${BOARD_NAME} $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DENABLE_CRC_USE_SW=ON" > Test_integration_${BOARD_NAME}_GCC_3.txt
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: ^(docs|pictures|simplicity_sdk|test/test_script|log|sample|cmake|components|lib/inc/coding_standard.h|lib/inc/silabs_license_agreement.h|lib/inc/sl_iec60730_library_documentation.h)
exclude: ^(docs|pictures|simplicity_sdk|test/test_script|log|sample|cmake|components|lib/inc/coding_standard.h|lib/inc/silabs_license_agreement.h|lib/inc/sl_iec60730_library_documentation.h|README.md)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
Expand All @@ -21,6 +21,6 @@ repos:
- --use-color
- --extra-arg=-Iusr/include
- --header-filter:'^((?!test).)*$'
- -p=./tools
- -p=./build
- id: cppcheck
args: [--language=c,--std=c99,--check-config,-DSL_IEC60730_BOARD_HEADER="sl_iec60730_board.h",--suppress=missingInclude,--suppress=unmatchedSuppression]
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
# IEC60730_Libs
Platform codes for EFR32 series chips which complies to IEC60730 safety standard


2 changes: 0 additions & 2 deletions cmake/coding_convention.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,4 @@ function(generate_coding_convention relative_dir)
# copy database to folder tools
execute_process(COMMAND rm -rf ${CMAKE_SOURCE_DIR}/tools/compile_commands.json
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/build/compile_commands.json ${CMAKE_SOURCE_DIR}/tools/
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endfunction(generate_coding_convention)
2 changes: 1 addition & 1 deletion docs/coding_convention_tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ $ make prepare
$ cd build
$ cmake --toolchain ../cmake/toolchain.cmake .. -DCHECK_CODING_CONVETION_ENABLE=ON -DBOARD_NAME=brd4187c
```
After running the above command, the file `compile_commands.json` data base will be created in the folder [tools](../tools/).
After running the above command, the file `compile_commands.json` data base will be created in the folder [build](../build/).

Run pre-commit install to install pre-commit into your git hooks. pre-commit will now run on every commit:

Expand Down

0 comments on commit fc9bcf8

Please sign in to comment.