Skip to content

Commit

Permalink
Update 02-Run_Unit_Test.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Silabs-ThieuVu authored Nov 29, 2024
1 parent cb35565 commit f265549
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/02-Run_Unit_Test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -389,18 +389,16 @@ jobs:

steps:
- name: Trigger
if: ${{ env.COMPILER == 'GCC' }}
run: |
if [ "$COMPILER" == "IAR" ]; then
echo "Run with IAR in job1"
exit 0
fi
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
if: ${{ env.COMPILER == 'GCC' }}
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
if [ -z "${{ github.event.inputs.Validate_branch }}" ]; then
Expand All @@ -412,26 +410,31 @@ jobs:
fi
- name: Checkout
if: ${{ env.COMPILER == 'GCC' }}
uses: actions/[email protected]
with:
ref: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.Validate_branch || github.ref }}"

- name: Log Current Branch and Commit
if: ${{ env.COMPILER == 'GCC' }}
run: |
echo "Current branch: $(git rev-parse --abbrev-ref HEAD)"
echo "Current commit: $(git rev-parse HEAD)"
- name: Create build folder
if: ${{ env.COMPILER == 'GCC' }}
run: |
make prepare
#mkdir -p ${{ github.workspace }}/build/test/unit_test/build
- name: Install jq (if needed)
if: ${{ env.COMPILER == 'GCC' }}
run: |
jq -V
#sudo apt-get install jq -y
- name: Download output for MG12 from Job 1
if: ${{ env.COMPILER == 'GCC' }}
run: |
export PAT="${{ secrets.SILABS_THIEUVU_PAT}}"
export REPO_OWNER="SiliconLabsSoftware"
Expand All @@ -456,6 +459,7 @@ jobs:
fi
- name: Run test MG12
if: ${{ env.COMPILER == 'GCC' }}
run: |
export PATH=$PATH:~/SimplicityStudio-5/SimplicityStudio_v5/developer/adapter_packs/commander
export PATH=$PATH:~/slc_cli
Expand Down Expand Up @@ -497,13 +501,15 @@ jobs:
#echo 'bash execute_unit_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
- name: Upload artifact MG12
if: ${{ env.COMPILER == 'GCC' }}
uses: actions/[email protected]
with:
name: unit_test_log_mg12_gcc
path: ${{ github.workspace }}/test/log_MG12/
retention-days: 90

- name: Check log file to set status of the job MG12
if: ${{ env.COMPILER == 'GCC' }}
run: |
cd ${{ github.workspace }}
echo "Current directory: $PWD"
Expand All @@ -528,6 +534,7 @@ jobs:
done
- name: Download output for MG24 from Job 1
if: ${{ env.COMPILER == 'GCC' }}
run: |
export PAT="${{ secrets.SILABS_THIEUVU_PAT}}"
export REPO_OWNER="SiliconLabsSoftware"
Expand All @@ -550,6 +557,7 @@ jobs:
fi
- name: Run test MG24
if: ${{ env.COMPILER == 'GCC' }}
run: |
export PATH=$PATH:~/SimplicityStudio-5/SimplicityStudio_v5/developer/adapter_packs/commander
export PATH=$PATH:~/slc_cli
Expand Down Expand Up @@ -589,13 +597,15 @@ jobs:
bash execute_unit_test.sh $BOARD_NAME_MG24 run-only all $ADAPTER_SN_MG24 $COMPILER 2>&1 | tee log_MG24/Unit_Test_MG24.txt
- name: Upload artifact MG24
if: ${{ env.COMPILER == 'GCC' }}
uses: actions/[email protected]
with:
name: unit_test_log_mg24_gcc
path: ${{ github.workspace }}/test/log_MG24/
retention-days: 90

- name: Check log file to set status of the job MG24
if: ${{ env.COMPILER == 'GCC' }}
run: |
cd ${{ github.workspace }}
echo "Current directory: $PWD"
Expand Down

0 comments on commit f265549

Please sign in to comment.