]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg: Add YAML files for CI builds
authorMichael D Kinney <michael.d.kinney@intel.com>
Mon, 28 Oct 2019 20:21:26 +0000 (13:21 -0700)
committerMichael D Kinney <michael.d.kinney@intel.com>
Mon, 11 Nov 2019 21:02:30 +0000 (13:02 -0800)
https://bugzilla.tianocore.org/show_bug.cgi?id=2315

Add YAML file to the package directory with the
configuration of the checks to perform during a
CI build.

Use BaseCryptLibNull for package CI builds to reduce package
build times.  Enabled with CONTINUOUS_INTEGRATION in YAML
files.  By default CONTINUOUS_INTEGRATION is not defined,
and the original lib mappings are preserved.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
SecurityPkg/SecurityPkg.ci.yaml [new file with mode: 0644]
SecurityPkg/SecurityPkg.dsc

diff --git a/SecurityPkg/SecurityPkg.ci.yaml b/SecurityPkg/SecurityPkg.ci.yaml
new file mode 100644 (file)
index 0000000..9532190
--- /dev/null
@@ -0,0 +1,80 @@
+## @file\r
+# CI configuration for SecurityPkg\r
+#\r
+# Copyright (c) Microsoft Corporation\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+##\r
+{\r
+    "CompilerPlugin": {\r
+        "DscPath": "SecurityPkg.dsc"\r
+    },\r
+    "CharEncodingCheck": {\r
+        "IgnoreFiles": []\r
+    },\r
+    "DependencyCheck": {\r
+        "AcceptableDependencies": [\r
+            "MdePkg/MdePkg.dec",\r
+            "MdeModulePkg/MdeModulePkg.dec",\r
+            "SecurityPkg/SecurityPkg.dec",\r
+            "CryptoPkg/CryptoPkg.dec"\r
+        ],\r
+        # For host based unit tests\r
+        "AcceptableDependencies-HOST_APPLICATION":[],\r
+        # For UEFI shell based apps\r
+        "AcceptableDependencies-UEFI_APPLICATION":[],\r
+        "IgnoreInf": []\r
+    },\r
+    "DscCompleteCheck": {\r
+        "DscPath": "SecurityPkg.dsc",\r
+        "IgnoreInf": []\r
+    },\r
+    "GuidCheck": {\r
+        "IgnoreGuidName": [],\r
+        "IgnoreGuidValue": ["00000000-0000-0000-0000-000000000000"],\r
+        "IgnoreFoldersAndFiles": [],\r
+        "IgnoreDuplicates": [\r
+            "Tpm2InstanceLibDTpm=gEfiTpmDeviceInstanceTpm20DtpmGuid", #  by design\r
+        ]\r
+    },\r
+    "LibraryClassCheck": {\r
+        "IgnoreHeaderFile": []\r
+    },\r
+\r
+    ## options defined ci/Plugin/SpellCheck\r
+    "SpellCheck": {\r
+        "AuditOnly": True,           # Fails test but run in AuditOnly mode to collect log\r
+        "ExtendWords": [             # words to extend to the dictionary for this package\r
+            "shortformed", # tpm acpi\r
+            "autodetect",\r
+            "blocksid",\r
+            "comid",\r
+            "cpinsidpin", #OpalSScV2\r
+            "ecdsa", # TPM\r
+            "ecschnorr", # TPM\r
+            "eisaid", # ACPI\r
+            "harddisk",\r
+            "hashall",\r
+            "hashto",\r
+            "kek's",\r
+            "lfanew", # PE/COFF\r
+            "pcrindex",\r
+            "pkglength",\r
+            "ppuser",\r
+            "preos",\r
+            "stclear",\r
+            "toctou",\r
+            "tpm's",\r
+            "tpmcmdbuflength",\r
+            "tpmcommlib",\r
+            "tpmnvvaluelength",\r
+            "wrlocked",\r
+            "xored"\r
+        ],\r
+        "IgnoreStandardPaths": [],   # Standard Plugin defined paths that should be ignore\r
+        "AdditionalIncludePaths": [] # Additional paths to spell check (wildcards supported)\r
+    },\r
+\r
+    "Defines": {\r
+        "BLD_*_CONTINUOUS_INTEGRATION": "TRUE",\r
+    }\r
+}\r
index 9a254087a34a13a0ef9e698d6235c99cdff1bdba..a2eeadda7a7eb489f00a6c261bd62cccecbb1eb0 100644 (file)
@@ -44,8 +44,6 @@
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
   UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf\r
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
-  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
-  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
   TpmCommLib|SecurityPkg/Library/TpmCommLib/TpmCommLib.inf\r
   PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf\r
   PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf\r
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf\r
   MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf\r
+!ifdef CONTINUOUS_INTEGRATION\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf\r
+!else\r
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf\r
+!endif\r
   HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf\r
   ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf\r
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf\r
 [LibraryClasses.common.DXE_DRIVER]\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
+!ifdef CONTINUOUS_INTEGRATION\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf\r
+!else\r
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
+!endif\r
   HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf\r
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
 \r
 [LibraryClasses.common.DXE_RUNTIME_DRIVER]\r
   ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf\r
+!ifdef CONTINUOUS_INTEGRATION\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf\r
+!else\r
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf\r
+!endif\r
   HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf\r
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
 \r
 [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION]\r
+!ifdef CONTINUOUS_INTEGRATION\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf\r
+!else\r
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
+!endif\r
   HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf\r
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
   MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf\r
   ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLib.inf\r
   SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf\r
+!ifdef CONTINUOUS_INTEGRATION\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf\r
+!else\r
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf\r
+!endif\r
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
   Tcg2PhysicalPresenceLib|SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.inf\r