--- /dev/null
+## @file\r
+# Azure Pipeline build file for a build using ubuntu and GCC5\r
+#\r
+# Copyright (c) Microsoft Corporation.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+##\r
+trigger:\r
+- master\r
+pr:\r
+- master\r
+\r
+jobs:\r
+- template: templates/pr-gate-build-job.yml\r
+ parameters:\r
+ tool_chain_tag: 'GCC5'\r
+ vm_image: 'ubuntu-latest'\r
+ arch_list: "IA32,X64,ARM,AARCH64"\r
+\r
--- /dev/null
+## @file\r
+# Azure Pipielines YML file that evalues the patch series in a PR using the\r
+# python script BaseTools/Scripts/PatchCheck.py.\r
+#\r
+# NOTE: This example monitors pull requests against the edk2-ci branch. Most\r
+# environments would replace 'edk2-ci' with 'master'.\r
+#\r
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+# https://github.com/tianocore\r
+#\r
+##\r
+\r
+trigger: none\r
+\r
+pr:\r
+- master\r
+\r
+pool:\r
+ vmImage: 'ubuntu-latest'\r
+\r
+steps:\r
+- checkout: self\r
+ clean: true\r
+\r
+- task: UsePythonVersion@0\r
+ inputs:\r
+ versionSpec: '3.7.x'\r
+ architecture: 'x64'\r
+\r
+- script: |\r
+ git fetch origin $(System.PullRequest.TargetBranch):$(System.PullRequest.TargetBranch)\r
+ python BaseTools/Scripts/PatchCheck.py $(System.PullRequest.TargetBranch)..$(System.PullRequest.SourceCommitId)\r
+ displayName: 'Use PatchCheck.py to verify patch series in pull request'\r
--- /dev/null
+## @file\r
+# Azure Pipeline build file for a build using Windows and VS2019\r
+#\r
+# Copyright (c) Microsoft Corporation.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+##\r
+trigger:\r
+- master\r
+\r
+pr:\r
+- master\r
+\r
+jobs:\r
+- template: templates/pr-gate-build-job.yml\r
+ parameters:\r
+ tool_chain_tag: 'VS2019'\r
+ vm_image: 'windows-latest'\r
+ arch_list: "IA32,X64"\r
--- /dev/null
+## @file\r
+# File templates/basetools-build-job.yml\r
+#\r
+# template file to build basetools\r
+#\r
+# Copyright (c) Microsoft Corporation.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+##\r
+parameters:\r
+ tool_chain_tag: ''\r
+\r
+steps:\r
+- ${{ if contains(parameters.tool_chain_tag, 'GCC') }}:\r
+ - bash: sudo apt-get update\r
+ displayName: Update apt\r
+ condition: and(gt(variables.pkg_count, 0), succeeded())\r
+\r
+ - bash: sudo apt-get install gcc g++ make uuid-dev\r
+ displayName: Install required tools\r
+ condition: and(gt(variables.pkg_count, 0), succeeded())\r
+\r
+- task: CmdLine@1\r
+ displayName: Build Base Tools from source\r
+ inputs:\r
+ filename: python\r
+ arguments: BaseTools/Edk2ToolsBuild.py -t ${{ parameters.tool_chain_tag }}\r
+ condition: and(gt(variables.pkg_count, 0), succeeded())\r
+\r
+- task: CopyFiles@2\r
+ displayName: "Copy base tools build log"\r
+ inputs:\r
+ targetFolder: '$(Build.ArtifactStagingDirectory)'\r
+ SourceFolder: 'BaseTools/BaseToolsBuild'\r
+ contents: |\r
+ BASETOOLS_BUILD*.*\r
+ flattenFolders: true\r
+ condition: and(gt(variables.pkg_count, 0), succeededOrFailed())\r
--- /dev/null
+## @file\r
+# File templates/pr-gate-build-job.yml\r
+#\r
+# template file used to build supported packages.\r
+#\r
+# Copyright (c) Microsoft Corporation.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+##\r
+\r
+parameters:\r
+ tool_chain_tag: ''\r
+ vm_image: ''\r
+ arch_list: ''\r
+\r
+# Build step\r
+jobs:\r
+\r
+- job: Build_${{ parameters.tool_chain_tag }}\r
+\r
+ #Use matrix to speed up the build process\r
+ strategy:\r
+ matrix:\r
+ TARGET_MDE_CPU:\r
+ Build.Pkgs: 'MdePkg,UefiCpuPkg'\r
+ Build.Targets: 'DEBUG,RELEASE,NO-TARGET'\r
+ TARGET_MDEMODULE_DEBUG:\r
+ Build.Pkgs: 'MdeModulePkg'\r
+ Build.Targets: 'DEBUG'\r
+ TARGET_MDEMODULE_RELEASE:\r
+ Build.Pkgs: 'MdeModulePkg'\r
+ Build.Targets: 'RELEASE,NO-TARGET'\r
+ TARGET_NETWORK:\r
+ Build.Pkgs: 'NetworkPkg'\r
+ Build.Targets: 'DEBUG,RELEASE,NO-TARGET'\r
+ TARGET_OTHER:\r
+ Build.Pkgs: 'PcAtChipsetPkg,ShellPkg'\r
+ Build.Targets: 'DEBUG,RELEASE,NO-TARGET'\r
+ TARGET_FMP:\r
+ Build.Pkgs: 'FmpDevicePkg,FatPkg'\r
+ Build.Targets: 'DEBUG,RELEASE,NO-TARGET'\r
+ TARGET_CRYPTO:\r
+ Build.Pkgs: 'CryptoPkg'\r
+ Build.Targets: 'DEBUG,RELEASE,NO-TARGET'\r
+ TARGET_SECURITY:\r
+ Build.Pkgs: 'SecurityPkg'\r
+ Build.Targets: 'DEBUG,RELEASE,NO-TARGET'\r
+\r
+ workspace:\r
+ clean: all\r
+\r
+ pool:\r
+ vmImage: ${{ parameters.vm_image }}\r
+\r
+ steps:\r
+ - template: pr-gate-steps.yml\r
+ parameters:\r
+ tool_chain_tag: ${{ parameters.tool_chain_tag }}\r
+ build_pkgs: $(Build.Pkgs)\r
+ build_targets: $(Build.Targets)\r
+ build_archs: ${{ parameters.arch_list }}\r
+\r
+- job: FINISHED\r
+ dependsOn: Build_${{ parameters.tool_chain_tag }}\r
+ condition: succeeded()\r
+ steps:\r
+ - checkout: none\r
+ - script: |\r
+ echo FINISHED\r
+ sleep 10\r
+ displayName: FINISHED\r
+\r
+- job: FAILED\r
+ dependsOn: Build_${{ parameters.tool_chain_tag }}\r
+ condition: failed()\r
+ steps:\r
+ - checkout: none\r
+ - script: |\r
+ echo FAILED\r
+ sleep 10\r
+ displayName: FAILED\r
--- /dev/null
+## @file\r
+# File templates/pr-gate-steps.yml\r
+#\r
+# template file containing the steps to build\r
+#\r
+# Copyright (c) Microsoft Corporation.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+##\r
+\r
+parameters:\r
+ tool_chain_tag: ''\r
+ build_pkgs: ''\r
+ build_targets: ''\r
+ build_archs: ''\r
+\r
+steps:\r
+- checkout: self\r
+ clean: true\r
+ fetchDepth: 1\r
+\r
+- task: UsePythonVersion@0\r
+ inputs:\r
+ versionSpec: '3.7.x'\r
+ architecture: 'x64'\r
+\r
+- script: pip install -r pip-requirements.txt --upgrade\r
+ displayName: 'Install/Upgrade pip modules'\r
+\r
+# Set default\r
+- bash: |\r
+ echo "##vso[task.setvariable variable=pkgs_to_build]${{ parameters.build_pkgs }}"\r
+ echo "##vso[task.setvariable variable=pkg_count]${{ 1 }}"\r
+\r
+# trim the package list if this is a PR\r
+- task: CmdLine@1\r
+ displayName: Check if ${{ parameters.build_pkgs }} need testing\r
+ inputs:\r
+ filename: stuart_pr_eval\r
+ arguments: -c .pytool/CISettings.py -p ${{ parameters.build_pkgs }} --pr-target origin/$(System.PullRequest.targetBranch) --output-csv-format-string "##vso[task.setvariable variable=pkgs_to_build;isOutpout=true]{pkgcsv}" --output-count-format-string "##vso[task.setvariable variable=pkg_count;isOutpout=true]{pkgcount}"\r
+ condition: eq(variables['Build.Reason'], 'PullRequest')\r
+\r
+# build basetools\r
+- template: basetools-build-steps.yml\r
+ parameters:\r
+ tool_chain_tag: ${{ parameters.tool_chain_tag }}\r
+\r
+# install spell check prereqs\r
+- template: spell-check-prereq-steps.yml\r
+\r
+# Build repo\r
+- task: CmdLine@1\r
+ displayName: Setup ${{ parameters.build_pkgs }} ${{ parameters.build_archs}}\r
+ inputs:\r
+ filename: stuart_setup\r
+ arguments: -c .pytool/CISettings.py -p $(pkgs_to_build) -t ${{ parameters.build_targets}} -a ${{ parameters.build_archs}} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}}\r
+ condition: and(gt(variables.pkg_count, 0), succeeded())\r
+\r
+- task: CmdLine@1\r
+ displayName: Update ${{ parameters.build_pkgs }} ${{ parameters.build_archs}}\r
+ inputs:\r
+ filename: stuart_update\r
+ arguments: -c .pytool/CISettings.py -p $(pkgs_to_build) -t ${{ parameters.build_targets}} -a ${{ parameters.build_archs}} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}}\r
+ condition: and(gt(variables.pkg_count, 0), succeeded())\r
+\r
+- task: CmdLine@1\r
+ displayName: Build and Test ${{ parameters.build_pkgs }} ${{ parameters.build_archs}}\r
+ inputs:\r
+ filename: stuart_ci_build\r
+ arguments: -c .pytool/CISettings.py -p $(pkgs_to_build) -t ${{ parameters.build_targets}} -a ${{ parameters.build_archs}} TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}}\r
+ condition: and(gt(variables.pkg_count, 0), succeeded())\r
+\r
+# Publish Test Results to Azure Pipelines/TFS\r
+- task: PublishTestResults@2\r
+ displayName: 'Publish junit test results'\r
+ continueOnError: true\r
+ condition: and( succeededOrFailed(),gt(variables.pkg_count, 0))\r
+ inputs:\r
+ testResultsFormat: 'JUnit' # Options: JUnit, NUnit, VSTest, xUnit\r
+ testResultsFiles: 'Build/TestSuites.xml'\r
+ #searchFolder: '$(System.DefaultWorkingDirectory)' # Optional\r
+ mergeTestResults: true # Optional\r
+ testRunTitle: $(System.JobName) # Optional\r
+ #buildPlatform: # Optional\r
+ #buildConfiguration: # Optional\r
+ publishRunAttachments: true # Optional\r
+\r
+# Publish Test Results to Azure Pipelines/TFS\r
+- task: PublishTestResults@2\r
+ displayName: 'Publish host based test results for $(System.JobName)'\r
+ continueOnError: true\r
+ condition: and( succeededOrFailed(), gt(variables.pkg_count, 0))\r
+ inputs:\r
+ testResultsFormat: 'JUnit' # Options: JUnit, NUnit, VSTest, xUnit\r
+ testResultsFiles: 'Build/**/*.result.xml'\r
+ #searchFolder: '$(System.DefaultWorkingDirectory)' # Optional\r
+ mergeTestResults: false # Optional\r
+ testRunTitle: ${{ parameters.build_pkgs }} # Optional\r
+ #buildPlatform: # Optional\r
+ #buildConfiguration: # Optional\r
+ publishRunAttachments: true # Optional\r
+\r
+# Copy the build logs to the artifact staging directory\r
+- task: CopyFiles@2\r
+ displayName: "Copy build logs"\r
+ inputs:\r
+ targetFolder: '$(Build.ArtifactStagingDirectory)'\r
+ SourceFolder: 'Build'\r
+ contents: |\r
+ BUILDLOG_*.txt\r
+ BUILDLOG_*.md\r
+ CI_*.txt\r
+ CI_*.md\r
+ CISETUP.txt\r
+ SETUPLOG.txt\r
+ UPDATE_LOG.txt\r
+ PREVALLOG.txt\r
+ TestSuites.xml\r
+ **/BUILD_TOOLS_REPORT.html\r
+ **/OVERRIDELOG.TXT\r
+ flattenFolders: true\r
+ condition: succeededOrFailed()\r
+\r
+# Publish build artifacts to Azure Artifacts/TFS or a file share\r
+- task: PublishBuildArtifacts@1\r
+ continueOnError: true\r
+ displayName: "Publish build logs"\r
+ inputs:\r
+ pathtoPublish: '$(Build.ArtifactStagingDirectory)'\r
+ artifactName: 'Build Logs $(System.JobName)'\r
+ condition: succeededOrFailed()\r
--- /dev/null
+## @file\r
+# File templates/spell-check-prereq-steps.yml\r
+#\r
+# template file used to install spell checking prerequisits\r
+#\r
+# Copyright (c) Microsoft Corporation.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+##\r
+\r
+parameters:\r
+ none: ''\r
+\r
+steps:\r
+- task: NodeTool@0\r
+ inputs:\r
+ versionSpec: '10.x'\r
+ #checkLatest: false # Optional\r
+ condition: and(gt(variables.pkg_count, 0), succeeded())\r
+\r
+- script: npm install -g cspell\r
+ displayName: 'Install cspell npm'\r
+ condition: and(gt(variables.pkg_count, 0), succeeded())\r