Skip to content

Commit

Permalink
Fix: picking AP Models as per input for manual triggers (#910)
Browse files Browse the repository at this point in the history
* Fix: picking AP Models as per input for manual triggers

Signed-off-by: anil-tegala <[email protected]>
---------
  • Loading branch information
anil-tegala authored Apr 7, 2024
1 parent 8c3fb5e commit 674b951
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ jobs:
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap104,cig_wf186w,edgecore_eap111' }}"
elif [[ "$DOW" -eq "4" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap102,cig_wf196' }}"
else
AP_MODELS="${{ github.event.inputs.ap_models || 'cig_wf188n,edgecore_oap101-6e,hfcl_ion4xe' }}"
fi
echo "List of AP models to test - $AP_MODELS"
AP_MODELS=$(echo $AP_MODELS | sed "s/,/\",\"/g" | sed 's/^/[\"/g' | sed 's/$/\"]/g')
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/quali.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
echo "marker_expression=$(echo ${{ github.event.inputs.marker_expression || 'ow_sanity_lf' }})" >> $GITHUB_OUTPUT
echo "existing_controller=$(echo ${{ github.event.inputs.existing_controller || 'qa01' }})" >> $GITHUB_OUTPUT
# Schedule runs at - 11 hours UTC
DOW=$(date +%u)
Expand All @@ -90,6 +91,8 @@ jobs:
AP_MODELS="${{ github.event.inputs.ap_models || 'cig_wf188n,edgecore_oap101-6e,edgecore_eap104,cig_wf186w,edgecore_eap111' }}"
elif [[ "$DOW" -eq "5" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'hfcl_ion4xe' }}"
else
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap102,cig_wf196,edgecore_eap101,yuncore_fap655,yuncore_ax820,edgecore_eap111' }}"
fi
echo "List of AP models to test - $AP_MODELS"
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
marker_expressions=${MARKER_EXPRESSIONS}
EOF
# Schedule runs in two slots. slot 1 - 11 hours UTC
# choose AP models as per the day and slot if the scheduled run gets triggered else provided.
DOW=$(date +%u)
TOD=$(date +%H)
SLOT=$(( 10#$TOD % 24)) # 11 - slot 1
Expand All @@ -82,17 +82,17 @@ jobs:
echo "Current time is $TOD hours, which is $(( 10#$TOD % 24)) in cron notation"
echo "Current slot is $SLOT"
if [[ "$SLOT" -eq "11" ]]; then
echo "Choosing slot 1 since time of the day is $SLOT hours"
if [[ "$DOW" -eq "4" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'hfcl_ion4xe' }}"
elif [[ "$DOW" -eq "5" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'cig_wf188n,edgecore_oap101-6e,edgecore_eap104' }}"
elif [[ "$DOW" -eq "6" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap102,cig_wf196,yuncore_fap655' }}"
elif [[ "$DOW" -eq "7" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap101,yuncore_ax820,edgecore_eap111' }}"
fi
# choose AP models as per the day if the scheduled run gets triggered else input provided.
if [[ "$DOW" -eq "4" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'hfcl_ion4xe' }}"
elif [[ "$DOW" -eq "5" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'cig_wf188n,edgecore_oap101-6e,edgecore_eap104' }}"
elif [[ "$DOW" -eq "6" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap102,cig_wf196,yuncore_fap655' }}"
elif [[ "$DOW" -eq "7" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap101,yuncore_ax820,edgecore_eap111' }}"
else
AP_MODELS="${{ github.event.inputs.ap_models || 'cig_wf188n,edgecore_oap101-6e,edgecore_eap104' }}"
fi
AP_MODELS=$(echo $AP_MODELS | sed "s/,/\",\"/g" | sed 's/^/[\"/g' | sed 's/$/\"]/g')
Expand Down

0 comments on commit 674b951

Please sign in to comment.