]> git.proxmox.com Git - mirror_edk2.git/commitdiff
DynamicTablesPkg: Add EDK2 Core CI support
authorSami Mujawar <sami.mujawar@arm.com>
Sat, 27 Jun 2020 21:11:35 +0000 (22:11 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 7 Aug 2020 16:17:25 +0000 (16:17 +0000)
The TianoCore EDKII project has introduced a Core CI infrastructure
using TianoCore EDKII Tools PIP modules:
  * https://pypi.org/project/edk2-pytool-library/
  * https://pypi.org/project/edk2-pytool-extensions/

The edk2\.pytool\Readme.md provides information to configure the
environment and to run local builds.

This patch defines the necessary settings for enabling the Core CI
builds for DynamicTablesPkg.
 - Add DynamicTablesPkg.ci.yaml for Core CI
 - Update ReadMe.md for details and instructions

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
DynamicTablesPkg/DynamicTablesPkg.ci.yaml [new file with mode: 0644]
DynamicTablesPkg/Readme.md

diff --git a/DynamicTablesPkg/DynamicTablesPkg.ci.yaml b/DynamicTablesPkg/DynamicTablesPkg.ci.yaml
new file mode 100644 (file)
index 0000000..f39b801
--- /dev/null
@@ -0,0 +1,92 @@
+## @file\r
+# CI configuration for DynamicTablesPkg\r
+#\r
+# Copyright (c) 2020, ARM Limited. All rights reserved.<BR>\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+##\r
+{\r
+    ## options defined .pytool/Plugin/CompilerPlugin\r
+    "CompilerPlugin": {\r
+        "DscPath": "DynamicTablesPkg.dsc"\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/HostUnitTestCompilerPlugin\r
+    "HostUnitTestCompilerPlugin": {\r
+        "DscPath": "" # Don't support this test\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/CharEncodingCheck\r
+    "CharEncodingCheck": {\r
+        "IgnoreFiles": []\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/DependencyCheck\r
+    "DependencyCheck": {\r
+        "AcceptableDependencies": [\r
+            "ArmPlatformPkg/ArmPlatformPkg.dec",\r
+            "EmbeddedPkg/EmbeddedPkg.dec",\r
+            "DynamicTablesPkg/DynamicTablesPkg.dec",\r
+            "MdeModulePkg/MdeModulePkg.dec",\r
+            "MdePkg/MdePkg.dec"\r
+        ],\r
+        # For host based unit tests\r
+        "AcceptableDependencies-HOST_APPLICATION":[\r
+            "UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec"\r
+        ],\r
+        # For UEFI shell based apps\r
+        "AcceptableDependencies-UEFI_APPLICATION":[],\r
+        "IgnoreInf": []\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/DscCompleteCheck\r
+    "DscCompleteCheck": {\r
+        "IgnoreInf": [],\r
+        "DscPath": "DynamicTablesPkg.dsc"\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/HostUnitTestDscCompleteCheck\r
+    "HostUnitTestDscCompleteCheck": {\r
+        "IgnoreInf": [""],\r
+        "DscPath": "" # Don't support this test\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/GuidCheck\r
+    "GuidCheck": {\r
+        "IgnoreGuidName": [],\r
+        "IgnoreGuidValue": [],\r
+        "IgnoreFoldersAndFiles": [],\r
+        "IgnoreDuplicates": [],\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/LibraryClassCheck\r
+    "LibraryClassCheck": {\r
+        "IgnoreHeaderFile": []\r
+    },\r
+\r
+    ## options defined .pytool/Plugin/SpellCheck\r
+    "SpellCheck": {\r
+        "AuditOnly": False,\r
+        "IgnoreFiles": [],           # use gitignore syntax to ignore errors\r
+                                     # in matching files\r
+        "ExtendWords": [\r
+           "CCIDX",\r
+           "CCSIDR",\r
+           "countof",\r
+           "EOBJECT",\r
+           "GTBLOCK",\r
+           "MPIDR",\r
+           "pytool",\r
+           "Roadmap",\r
+           "SMMUV",\r
+           "standardised",\r
+           "TABLEEX",\r
+           "TNSID",\r
+           "Vatos",\r
+           "WBINVD"\r
+           ],           # words to extend to the dictionary for this package\r
+        "IgnoreStandardPaths": [],   # Standard Plugin defined paths that\r
+                                     # should be ignore\r
+        "AdditionalIncludePaths": [] # Additional paths to spell check\r
+                                     # (wildcards supported)\r
+    }\r
+}\r
index bcaae6daa5fff24d9f62639149e9f82c2665c682..e17ed3ac6fd2fbcaced7d64393b316d4d6f75283 100644 (file)
@@ -131,9 +131,80 @@ Ensure that the iASL compiler used for building *Dynamic Tables Framework* has t
 This feature was made available in the *ACPICA Compiler update\r
 [Version 20180508](https://www.acpica.org/node/156)*, dated 8 May 2018 (2018-05-08).\r
 \r
+\r
+Running CI builds locally\r
+-------------------------\r
+\r
+The TianoCore EDKII project has introduced Core CI infrastructure using TianoCore EDKII Tools PIP modules:\r
+\r
+   -  *[edk2-pytool-library](https://pypi.org/project/edk2-pytool-library)*\r
+\r
+   - *[edk2-pytool-extensions](https://pypi.org/project/edk2-pytool-extensions)*\r
+\r
+\r
+The instructions to setup the CI environment are in *'edk2\\.pytool\\Readme.md'*\r
+\r
+## Building DynamicTablesPkg with Pytools\r
+\r
+1. [Optional] Create a Python Virtual Environment - generally once per workspace\r
+\r
+    ```\r
+        python -m venv <name of virtual environment>\r
+\r
+        e.g. python -m venv edk2-ci\r
+    ```\r
+\r
+2. [Optional] Activate Virtual Environment - each time new shell/command window is opened\r
+\r
+    ```\r
+        <name of virtual environment>/Scripts/activate\r
+\r
+        e.g. On a windows host PC run:\r
+             edk2-ci\Scripts\activate.bat\r
+    ```\r
+3. Install Pytools - generally once per virtual env or whenever pip-requirements.txt changes\r
+\r
+    ```\r
+        pip install --upgrade -r pip-requirements.txt\r
+    ```\r
+\r
+4. Initialize & Update Submodules - only when submodules updated\r
+\r
+    ```\r
+        stuart_setup -c .pytool/CISettings.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>\r
+\r
+        e.g. stuart_setup -c .pytool/CISettings.py TOOL_CHAIN_TAG=GCC5\r
+    ```\r
+\r
+5. Initialize & Update Dependencies - only as needed when ext_deps change\r
+\r
+    ```\r
+        stuart_update -c .pytool/CISettings.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>\r
+\r
+        e.g. stuart_update -c .pytool/CISettings.py TOOL_CHAIN_TAG=GCC5\r
+    ```\r
+\r
+6. Compile the basetools if necessary - only when basetools C source files change\r
+\r
+    ```\r
+        python BaseTools/Edk2ToolsBuild.py -t <ToolChainTag>\r
+    ```\r
+\r
+7. Compile DynamicTablesPkg\r
+\r
+    ```\r
+        stuart_build-c .pytool/CISettings.py TOOL_CHAIN_TAG=<TOOL_CHAIN_TAG> -a <TARGET_ARCH>\r
+\r
+        e.g. stuart_ci_build -c .pytool/CISettings.py TOOL_CHAIN_TAG=GCC5 -p DynamicTablesPkg -a AARCH64 --verbose\r
+    ```\r
+\r
+    - use `stuart_build -c .pytool/CISettings.py -h` option to see help on additional options.\r
+\r
+\r
 Documentation\r
 -------------\r
 \r
 Refer to the following presentation from *UEFI Plugfest Seattle 2018*:\r
 \r
 [Dynamic Tables Framework: A Step Towards Automatic Generation of Advanced Configuration and Power Interface (ACPI) & System Management BIOS (SMBIOS) Tables](http://www.uefi.org/sites/default/files/resources/Arm_Dynamic%20Tables%20Framework%20A%20Step%20Towards%20Automatic%20Generation%20of%20Advanced%20Configuration%20and%20Power%20Interface%20%28ACPI%29%20%26%20System%20Management%20BIOS%20%28SMBIOS%29%20Tables%20_0.pdf)\r
+\r