-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5fe48ea
commit 9d53674
Showing
1 changed file
with
60 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,40 +9,57 @@ on: | |
description: 'Branch to test' | ||
type: string | ||
default: 'dev' | ||
ADAPTER_SN_MG12: | ||
description: 'Adapter serial number of MG12' | ||
type: string | ||
default: '440189400' | ||
ADAPTER_SN_MG24: | ||
description: 'Adapter serial number of MG24' | ||
type: string | ||
default: '440133193' | ||
env: | ||
REPO_URL: ${{ github.server_url }}/${{ github.repository }} | ||
REPO_BRANCH: ${{ github.event.inputs.branch }} | ||
REPO_NAME: ${{ github.repository }} | ||
REPO_BRANCH: ${{ github.head_ref || github.ref_name }} | ||
REPO_NAME: ${{ github.event.repository.name }} | ||
JLINK_PATH: /opt/SEGGER/JLink/libjlinkarm.so | ||
SDK_PATH: $HOME/SimplicityStudio/SDKs/gecko_sdk | ||
SDK_PATH: /home/sqa/SimplicityStudio/SDKs/gecko_sdk | ||
jobs: | ||
job1: | ||
name: Integration test for mg24 with gcc | ||
name: Integration test | ||
runs-on: [self-hosted, ds-sqa-hn-iec] | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
env: | ||
BOARD_NAME: brd4187c | ||
BOARD_NAME_MG12: brd4161a | ||
BOARD_NAME_MG24: brd4187c | ||
HOST_IP: 192.168.1.69 | ||
COMPILER: GCC | ||
TOOL_CHAINS: GCC | ||
TASK: all | ||
COMPONENTS: all | ||
ADAPTER_SN: 440111030 | ||
ADAPTER_SN_MG12: ${{ github.event.inputs.ADAPTER_SN_MG12 }} #440189400 | ||
ADAPTER_SN_MG24: ${{ github.event.inputs.ADAPTER_SN_MG24 }} #440133193 | ||
CHIP: EFR32MG24BXXXF1536 | ||
TOOL_DIRS: $HOME/SimplicityStudio-5/SimplicityStudio_v5/developer/toolchains/gnu_arm/12.2.rel1_2023.7/bin | ||
TOOL_DIRS: /home/sqa/SimplicityStudio-5/SimplicityStudio_v5/developer/toolchains/gnu_arm/12.2.rel1_2023.7/bin | ||
START_ADDR_FLASH: 0x8000000 | ||
|
||
steps: | ||
- name: Trigger | ||
run: echo "Triggered by ${{github.event_name}} event" | ||
run: | | ||
echo "Triggered by ${{github.event_name}} event" | ||
echo "Repo root directory: $GITHUB_WORKSPACE" | ||
echo "Current directory: $PWD" | ||
rm -rf ${{ github.workspace }} | ||
mkdir ${{ github.workspace }} | ||
- name: Check Branch Input | ||
run: | | ||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | ||
if [ -z "${{ github.event.inputs.branch }}" ]; then | ||
echo "Branch input is required for manual trigger." | ||
exit 1 | ||
else | ||
echo "REPO_BRANCH=${{ github.event.inputs.branch }}">> $GITHUB_ENV | ||
fi | ||
fi | ||
- name: Checkout | ||
|
@@ -58,123 +75,63 @@ jobs: | |
cd $SDK_PATH | ||
cd extension | ||
ls -la | ||
rm -rd $REPO_NAME || true | ||
git clone $REPO_URL | ||
ls -la | ||
cd $REPO_URL | ||
cd $REPO_NAME | ||
echo "Curent REPO_BRANCH is $REPO_BRANCH" | ||
git checkout $REPO_BRANCH | ||
ls -la | ||
- name: Run test | ||
run: | | ||
export PATH=$PATH:$HOME/SimplicityStudio-5/SimplicityStudio_v5/developer/adapter_packs/commander | ||
export PATH=$PATH:$HOME/slc_cli | ||
export PATH=$PATH:~/SimplicityStudio-5/SimplicityStudio_v5/developer/adapter_packs/commander | ||
export PATH=$PATH:~/slc_cli | ||
export PATH=$PATH:/usr/bin/ | ||
export PATH=$PATH:$HOME/amazon-corretto-17.0.12.7.1-linux-x64/bin | ||
export LST_PATH=$PWD/build/test/integration_test/build/$BOARD_NAME/integration_test_iec60730_watchdog/S | ||
export PATH=$PATH:~/amazon-corretto-17.0.12.7.1-linux-x64/bin | ||
export LST_PATH=$PWD/build/test/integration_test/build/${BOARD_NAME}/integration_test_iec60730_watchdog/S | ||
slc configuration --sdk=${SDK_PATH} | ||
ninja --version | ||
slc signature trust --sdk $SDK_PATH | ||
slc configuration -gcc=$TOOL_DIRS | ||
make prepare | ||
echo "Run integration test for MG12" | ||
cd build | ||
slc signature trust -extpath $SDK_PATH/extension/$REPO_NAME | ||
cmake --toolchain ../cmake/toolchain.cmake .. -DENABLE_INTEGRATION_TESTING=ON -DBOARD_NAME=$BOARD_NAME | ||
make integration_test_info -j4 | ||
cd ../test | ||
mkdir log | ||
echo 'bash execute_integration_test.sh $BOARD_NAME $TASK $COMPONENTS $ADAPTER_SN $COMPILER' > log/Test_integration_$BOARD_NAME_GCC_1.txt | ||
#echo '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"' > log/Test_integration_$BOARD_NAME_GCC_2.txt | ||
#echo '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"' > log/Test_integration_$BOARD_NAME_GCC_3.txt | ||
#echo '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 -DENABLE_SW_CRC_TABLE=ON"' > log/Test_integration_$BOARD_NAME_GCC_4.txt | ||
#echo 'bash execute_integration_test.sh $BOARD_NAME $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DINTEGRATION_TEST_WDOG1_ENABLE=ON -DINTEGRATION_TEST_USE_MARCHX_DISABLE=ON -DENABLE_CRC_USE_SW=ON -DENABLE_SW_CRC_TABLE=ON -DENABLE_CAL_CRC_32=ON"' > log/Test_integration_$BOARD_NAME_GCC_5.txt | ||
|
||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: integration_test_log_mg24_gcc | ||
path: test/log/ | ||
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] | ||
if: ${{ always() }} | ||
needs: [job1] | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
env: | ||
BOARD_NAME: brd4161a | ||
HOST_IP: 192.168.1.69 | ||
COMPILER: GCC | ||
TOOL_CHAINS: GCC | ||
TASK: all | ||
COMPONENTS: all | ||
ADAPTER_SN: 440189400 | ||
CHIP: EFR32MG12 | ||
TOOL_DIRS: $HOME/SimplicityStudio-5/SimplicityStudio_v5/developer/toolchains/gnu_arm/12.2.rel1_2023.7/bin | ||
START_ADDR_FLASH: 0x0000000 | ||
if [ -z "${{ github.event.inputs.ADAPTER_SN_MG12 }}" ]; then | ||
ADAPTER_SN_MG12=440189400 | ||
fi | ||
mkdir log_MG12 | ||
bash execute_integration_test.sh $BOARD_NAME_MG12 $TASK $COMPONENTS $ADAPTER_SN_MG12 $COMPILER 2>&1 | tee log_MG12/Integration_Test_MG12.txt | ||
#echo 'bash execute_integration_test.sh $BOARD_NAME $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DENABLE_CAL_CRC_32=ON"' > log/Test_integration_$BOARD_NAME_GCC_2.txt | ||
#echo 'bash execute_integration_test.sh $BOARD_NAME $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DENABLE_CRC_USE_SW=ON"' > log/Test_integration_$BOARD_NAME_GCC_3.txt | ||
#echo 'bash execute_integration_test.sh $BOARD_NAME $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DENABLE_CRC_USE_SW=ON -DENABLE_SW_CRC_TABLE=ON"' > log/Test_integration_$BOARD_NAME_GCC_4.txt | ||
#echo 'bash execute_integration_test.sh $BOARD_NAME $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DENABLE_CRC_USE_SW=ON -DENABLE_SW_CRC_TABLE=ON -DENABLE_CAL_CRC_32=ON"' > log/Test_integration_$BOARD_NAME_GCC_5.txt | ||
#echo 'bash execute_integration_test.sh $BOARD_NAME $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DENABLE_CRC_USE_SW=ON -DENABLE_CAL_CRC_32=ON"' > log/Test_integration_$BOARD_NAME_GCC_5.txt | ||
steps: | ||
- name: Trigger | ||
run: echo "Triggered by ${{github.event_name}} event" | ||
- name: Check Branch Input | ||
run: | | ||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | ||
if [ -z "${{ github.event.inputs.branch }}" ]; then | ||
echo "Branch input is required for manual trigger." | ||
exit 1 | ||
fi | ||
fi | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
ref: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}" | ||
- name: Log Current Branch and Commit | ||
run: | | ||
echo "Current branch: $(git rev-parse --abbrev-ref HEAD)" | ||
echo "Current commit: $(git rev-parse HEAD)" | ||
- name: Add extension | ||
run: | | ||
cd $SDK_PATH | ||
cd extension | ||
echo "Run integration test for MG24" | ||
ls -la | ||
git clone $REPO_URL | ||
ls -la | ||
cd $REPO_URL | ||
git checkout $REPO_BRANCH | ||
cd ${{ github.workspace }} | ||
ls -la | ||
- name: Prepare environment | ||
run: | | ||
export PATH=$PATH:$HOME/SimplicityStudio-5/SimplicityStudio_v5/developer/adapter_packs/commander | ||
export PATH=$PATH:$HOME/slc_cli | ||
export PATH=$PATH:/usr/bin/ | ||
export PATH=$PATH:$HOME/amazon-corretto-17.0.12.7.1-linux-x64/bin | ||
export LST_PATH=$PWD/build/test/integration_test/build/$BOARD_NAME/integration_test_iec60730_watchdog/S | ||
slc configuration --sdk=${SDK_PATH} | ||
ninja --version | ||
slc signature trust --sdk $SDK_PATH | ||
slc configuration -gcc=$TOOL_DIRS | ||
rm -rf build | ||
make prepare | ||
cd build | ||
slc signature trust -extpath $SDK_PATH/extension/$REPO_NAME | ||
cmake --toolchain ../cmake/toolchain.cmake .. -DENABLE_INTEGRATION_TESTING=ON -DBOARD_NAME=$BOARD_NAME | ||
make integration_test_info -j4 | ||
cd ../test | ||
mkdir log | ||
echo 'bash execute_integration_test.sh $BOARD_NAME $TASK $COMPONENTS $ADAPTER_SN $COMPILER' > log/Test_integration_$BOARD_NAME_GCC_1.txt | ||
#echo '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"' > log/Test_integration_$BOARD_NAME_GCC_2.txt | ||
#echo '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"' > log/Test_integration_$BOARD_NAME_GCC_3.txt | ||
#echo '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 -DENABLE_SW_CRC_TABLE=ON"' > log/Test_integration_$BOARD_NAME_GCC_4.txt | ||
#echo 'bash execute_integration_test.sh $BOARD_NAME $TASK $COMPONENTS $ADAPTER_SN $COMPILER "-DINTEGRATION_TEST_WDOG1_ENABLE=ON -DINTEGRATION_TEST_USE_MARCHX_DISABLE=ON -DENABLE_CRC_USE_SW=ON -DENABLE_SW_CRC_TABLE=ON -DENABLE_CAL_CRC_32=ON"' > log/Test_integration_$BOARD_NAME_GCC_5.txt | ||
|
||
- name: Upload artifact | ||
if [ -z "${{ github.event.inputs.ADAPTER_SN_MG12 }}" ]; then | ||
ADAPTER_SN_MG12=440189400 | ||
fi | ||
mkdir log_MG24 | ||
bash execute_integration_test.sh $BOARD_NAME_MG24 $TASK $COMPONENTS $ADAPTER_SN_MG24 $COMPILER 2>&1 | tee log_MG24/Integration_Test_MG24.txt | ||
- name: Upload artifact MG12 | ||
uses: actions/[email protected] | ||
with: | ||
name: Integration_test_log_mg12_gcc | ||
path: ${{ github.workspace }}/test/log_MG12/ | ||
retention-days: 90 | ||
- name: Upload artifact MG24 | ||
uses: actions/[email protected] | ||
with: | ||
name: integration_test_log_mg12_gcc | ||
path: test/log/ | ||
warn: Output a warning but do not fail the action | ||
name: Integration_test_log_mg24_gcc | ||
path: ${{ github.workspace }}/test/log_MG24/ | ||
retention-days: 90 |