Skip to content

Commit 57fca6d

Browse files
authored
CodeQl: Update to verify IA32/X64 package compat (#523)
With moving ArmPkg and ArmPlatformPkg into mu_basecore, the existing codeql workflow (which only runs under windows target under IA32/X64) needs to account for packages which only support AARCH64. Add a couple of lines to filter packages based on their DSC file's SUPPORTED_ARCHITECTURES, and exclude packages which cannot be run.
1 parent 381bbf8 commit 57fca6d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.sync/workflows/leaf/codeql.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ jobs:
7171
7272
packages = [d for d in os.listdir() if d.strip().lower().endswith('pkg')]
7373
74-
# Ensure the package can actually be built
75-
for package in packages:
76-
if not any(file.endswith('.dsc') for file in os.listdir(package)):
74+
# Ensure the package can actually be built for IA32 or X64
75+
for package in list(packages):
76+
dsc = [os.path.join(package, f) for f in os.listdir(package) if f.endswith('.dsc')]
77+
if not any('IA32' in l or 'X64' in l for d in dsc for l in open(d) if 'SUPPORTED_ARCHITECTURES' in l):
7778
packages.remove(package)
7879
7980
packages.sort()

0 commit comments

Comments
 (0)