]>
Commit | Line | Data |
---|---|---|
4fcfd089 SB |
1 | # CI Templates\r |
2 | \r | |
3 | This folder contains azure pipeline yml templates for "Core" and "Platform" Continuous Integration and PR validation.\r | |
4 | \r | |
5 | ## Common CI templates\r | |
6 | \r | |
7 | ### basetools-build-steps.yml\r | |
8 | \r | |
9 | This template compiles the Edk2 basetools from source. The steps in this template are\r | |
10 | conditional and will only run if variable `pkg_count` is greater than 0.\r | |
11 | \r | |
12 | It also has two conditional steps only used when the toolchain contains GCC. These two steps\r | |
13 | use `apt` to update the system packages and add those necessary for Edk2 builds.\r | |
14 | \r | |
15 | ## Core CI templates\r | |
16 | \r | |
17 | ### pr-gate-build-job.yml\r | |
18 | \r | |
19 | This templates contains the jobs and most importantly the matrix of which packages and\r | |
20 | targets to run for Core CI.\r | |
21 | \r | |
22 | ### pr-gate-steps.yml\r | |
23 | \r | |
24 | This template is the main Core CI template. It controls all the steps run and is responsible for most functionality of the Core CI process. This template sets\r | |
25 | the `pkg_count` variable using the `stuart_pr_eval` tool when the\r | |
26 | build type is "pull request"\r | |
27 | \r | |
28 | ### spell-check-prereq-steps.yml\r | |
29 | \r | |
30 | This template installs the node based tools used by the spell checker plugin. The steps\r | |
31 | in this template are conditional and will only run if variable `pkg_count` is greater than 0.\r | |
32 | \r | |
33 | ## Platform CI templates\r | |
34 | \r | |
35 | ### platform-build-run-steps.yml\r | |
36 | \r | |
37 | This template makes heavy use of pytools to build and run a platform in the Edk2 repo\r | |
38 | \r | |
39 | Also uses basetools-build-steps.yml to compile basetools\r | |
40 | \r | |
41 | #### Special Notes\r | |
42 | \r | |
43 | * For a build type of pull request it will conditionally build if the patches change files that impact the platform.\r | |
44 | * uses `stuart_pr_eval` to determine impact\r | |
45 | * For manual builds or CI builds it will always build the platform\r | |
46 | * It compiles basetools from source\r | |
47 | * Will use `stuart_build --FlashOnly` to attempt to run the built image if the `Run` parameter is set.\r | |
48 | * See the parameters block for expected configuration options\r | |
49 | * Parameter `extra_install_step` allows the caller to insert extra steps. This is useful if additional dependencies, tools, or other things need to be installed. Here is an example of installing qemu on Windows.\r | |
50 | \r | |
51 | ``` yaml\r | |
52 | steps:\r | |
53 | - template: ../../.azurepipelines/templates/build-run-steps.yml\r | |
54 | parameters:\r | |
55 | extra_install_step:\r | |
56 | - powershell: choco install qemu; Write-Host "##vso[task.prependpath]c:\Program Files\qemu"\r | |
57 | displayName: Install QEMU and Set QEMU on path # friendly name displayed in the UI\r | |
58 | condition: and(gt(variables.pkg_count, 0), succeeded())\r | |
59 | ```\r |