[SWDEV-500518/SWDEV-527430] CI v4.1 (#316)

[SWDEV-500518] CI v4.1

Signed-off-by: Justin Williams <Justin.Williams@amd.com>
This commit is contained in:
Williams, Justin
2025-04-29 12:34:22 -07:00
committed by Maisam Arif
parent 9c297639f3
commit 757aa016f4
3 changed files with 76 additions and 70 deletions
+5 -14
View File
@@ -4,14 +4,12 @@ on:
pull_request:
branches:
- amd-staging
- amd-mainline
- release/rocm-rel-*
paths:
- 'include/amd_smi/amdsmi.h'
push:
branches:
- amd-staging
- amd-mainline
- release/rocm-rel-*
paths:
- 'include/amd_smi/amdsmi.h'
@@ -53,12 +51,7 @@ jobs:
echo "Pull request head branch: ${{ github.head_ref }}"
# Fetch the appropriate base branch
if [ "${{ github.base_ref }}" = "amd-mainline" ]; then
# Pull request to amd-mainline: use amd-mainline as old
git fetch origin amd-mainline
git checkout FETCH_HEAD -- include/amd_smi/amdsmi.h
mv include/amd_smi/amdsmi.h amdsmi_old.h
elif [ "${{ github.base_ref }}" = "amd-staging" ]; then
if [ "${{ github.base_ref }}" = "amd-staging" ]; then
# Pull request to amd-staging: use amd-staging as old
git fetch origin amd-staging
git checkout FETCH_HEAD -- include/amd_smi/amdsmi.h
@@ -71,10 +64,7 @@ jobs:
# Create a status file with default failure
echo "abi_exit_code=1" > $GITHUB_WORKSPACE/abi_status.txt
if [ "${{ github.base_ref }}" = "amd-mainline" ]; then
echo "Comparing amd-mainline (old) with ${{ github.head_ref }} (new)"
abi-compliance-checker -lib amdsmi -old amdsmi_old.h -new amdsmi_new.h -v1 amd-mainline -v2 ${{ github.head_ref }} -report-path abi-report.html && echo "abi_exit_code=0" > $GITHUB_WORKSPACE/abi_status.txt
elif [ "${{ github.base_ref }}" = "amd-staging" ]; then
if [ "${{ github.base_ref }}" = "amd-staging" ]; then
echo "Comparing amd-staging (old) with ${{ github.head_ref }} (new)"
abi-compliance-checker -lib amdsmi -old amdsmi_old.h -new amdsmi_new.h -v1 amd-staging -v2 ${{ github.head_ref }} -report-path abi-report.html && echo "abi_exit_code=0" > $GITHUB_WORKSPACE/abi_status.txt
fi
@@ -114,10 +104,11 @@ jobs:
source $GITHUB_WORKSPACE/abi_status.txt
echo "ABI check exit code: $abi_exit_code"
if [ "$abi_exit_code" -ne 0 ]; then
echo "ABI check failed with exit code $abi_exit_code. Check logs for more Details."
echo "::error::⚠️ ABI BREAKAGE FOUND ⚠️ CHECK \"Run ABI Compliance Check\" LOGS OR THE abi-report ARTIFACT ATTACHED TO THIS WORKFLOW FOR MORE DETAILS"
echo "::error::View the HTML report in the Artifacts section of this workflow run for detailed ABI compatibility analysis"
exit 1
else
echo "ABI check succeeded"
echo "ABI check succeeded"
fi
else
echo "ABI status file not found at $GITHUB_WORKSPACE/abi_status.txt, assuming failure"