-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REBASE&FF] Repo File Sync: Enable code coverage uploads to codecov (#…
…214)
- Loading branch information
1 parent
acb00a1
commit 98cf65d
Showing
14 changed files
with
359 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
## @file | ||
# Azure Pipeline build file for a build using mu_devops. | ||
# | ||
# To upload coverage results, set `coverage_upload_target` to `ado` or `codecov`. | ||
# | ||
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there | ||
# instead of the file in this repo. | ||
# | ||
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops | ||
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml | ||
# | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
## | ||
|
||
resources: | ||
repositories: | ||
- repository: mu_devops | ||
type: github | ||
endpoint: microsoft | ||
name: microsoft/mu_devops | ||
ref: refs/tags/v9.0.1 | ||
|
||
parameters: | ||
- name: do_ci_build | ||
displayName: Perform Stuart CI Build | ||
type: boolean | ||
default: true | ||
- name: do_ci_setup | ||
displayName: Perform Stuart CI Setup | ||
type: boolean | ||
default: true | ||
- name: do_non_ci_build | ||
displayName: Perform non-CI Stuart Build | ||
type: boolean | ||
default: false | ||
- name: do_non_ci_setup | ||
displayName: Perform non-CI Stuart Setup | ||
type: boolean | ||
default: false | ||
- name: do_pr_eval | ||
displayName: Perform Stuart PR Evaluation | ||
type: boolean | ||
default: true | ||
- name: container_build | ||
displayName: Flag for whether this repo should do stuart_setup | ||
type: boolean | ||
default: false | ||
- name: os_type | ||
displayName: OS type on the self-hosted agent pools | ||
type: string | ||
values: | ||
- Windows_NT | ||
- Linux | ||
default: Windows_NT | ||
- name: build_matrix | ||
displayName: Build matrix for this repository | ||
type: object | ||
- name: pool_name | ||
displayName: Variable name that hosts pool name to be used for self-hosted agents | ||
type: string | ||
default: pool_name | ||
- name: extra_install_step | ||
displayName: Extra Install Steps | ||
type: stepList | ||
default: | ||
- script: echo No extra steps provided | ||
- name: extra_jobs | ||
displayName: Extra Jobs to be run after build | ||
type: jobList | ||
default: [] | ||
- name: rust_build | ||
displayName: Whether Rust code is being built | ||
type: boolean | ||
default: false | ||
- name: extra_cargo_steps | ||
displayName: Extra Steps to Run Before Standard Cargo Steps | ||
type: stepList | ||
default: | ||
- script: echo No extra cargo steps provided | ||
|
||
jobs: | ||
- template: Jobs/PrGate.yml@mu_devops | ||
parameters: | ||
linux_container_image: ghcr.io/microsoft/mu_devops/ubuntu-22-build:1082f35 | ||
${{ if eq(parameters.rust_build, true) }}: | ||
linux_container_options: --security-opt seccomp=unconfined | ||
do_ci_build: ${{ parameters.do_ci_build }} | ||
do_ci_setup: ${{ parameters.do_ci_setup }} | ||
do_pr_eval: ${{ parameters.do_pr_eval }} | ||
do_non_ci_setup: ${{ parameters.do_non_ci_setup }} | ||
do_non_ci_build: ${{ parameters.do_non_ci_build }} | ||
build_matrix: ${{ parameters.build_matrix }} | ||
os_type: ${{ parameters.os_type }} | ||
pool_name: ${{ parameters.pool_name }} | ||
extra_install_step: ${{ parameters.extra_install_step }} | ||
tool_chain_tag: $(tool_chain_tag) | ||
vm_image: $(vm_image) | ||
container_build: ${{ parameters.container_build }} | ||
rust_build: ${{ parameters.rust_build }} | ||
|
||
- ${{ if eq(parameters.rust_build, true) }}: | ||
- job: CargoCmds | ||
displayName: Workspace Cargo Commands | ||
|
||
container: | ||
|
||
image: ghcr.io/microsoft/mu_devops/ubuntu-22-build:1082f35 | ||
options: --user root --name mu_devops_build_container --security-opt seccomp=unconfined | ||
|
||
steps: | ||
- checkout: self | ||
fetchDepth: 1 | ||
clean: true | ||
- ${{ parameters.extra_cargo_steps }} | ||
- template: Steps/RustCargoSteps.yml@mu_devops | ||
parameters: | ||
container_build: true | ||
|
||
- ${{ parameters.extra_jobs }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## @file | ||
# codecov upload configuration file to carryforward coverage results of | ||
# packages that do not upload coverage results for a given pull request. | ||
## | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
## | ||
flags: | ||
BoardModulePkg: | ||
carryforward: true | ||
MinPlatformPkg: | ||
carryforward: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This workflow automatically approves pull requests under certain conditions. | ||
# | ||
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there | ||
# instead of the file in this repo. | ||
# | ||
# NOTE: This file uses a reusable workflow. Do not make changes to the file that should be made | ||
# in the common/reusable workflow. | ||
# | ||
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops | ||
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml | ||
# | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
|
||
name: Auto Approve Pull Request | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- reopened | ||
|
||
jobs: | ||
approval_check: | ||
if: | | ||
github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'uefibot' | ||
uses: microsoft/mu_devops/.github/workflows/[email protected] | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# This workflow automatically merges pull requests under certain conditions. | ||
# | ||
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there | ||
# instead of the file in this repo. | ||
# | ||
# NOTE: This file uses a reusable workflow. Do not make changes to the file that should be made | ||
# in the common/reusable workflow. | ||
# | ||
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops | ||
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml | ||
# | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
|
||
name: Auto Merge Pull Request | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
merge_check: | ||
if: | | ||
github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'uefibot' | ||
uses: microsoft/mu_devops/.github/workflows/[email protected] | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# This workflow provides actions that should be applied when an issue is assigned. | ||
# | ||
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there | ||
# instead of the file in this repo. | ||
# | ||
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops | ||
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml | ||
# | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
|
||
name: React to Issue Assignment | ||
|
||
on: | ||
issues: | ||
types: assigned | ||
|
||
jobs: | ||
apply: | ||
uses: microsoft/mu_devops/.github/workflows/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This workflow automatically applies labels to GitHub issues and pull requests based on the | ||
# file paths in a pull request or content in the body of an issue or pull request. | ||
# | ||
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there | ||
# instead of the file in this repo. | ||
# | ||
# NOTE: This file uses a reusable workflow. Do not make changes to the file that should be made | ||
# in the common/reusable workflow. | ||
# | ||
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops | ||
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml | ||
# | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
|
||
name: Apply Issue and PR Labels | ||
|
||
on: | ||
issues: | ||
types: | ||
- edited | ||
- opened | ||
pull_request_target: | ||
types: | ||
- edited | ||
- opened | ||
- reopened | ||
- synchronize | ||
workflow_dispatch: | ||
|
||
jobs: | ||
apply: | ||
uses: microsoft/mu_devops/.github/workflows/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# This workflow validates basic pull request formatting requirements are met. | ||
# | ||
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there | ||
# instead of the file in this repo. | ||
# | ||
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops | ||
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml | ||
# | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
|
||
name: Validate Pull Request Formatting | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- edited | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
validate_pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
prTitle="$(gh api graphql -F owner=$OWNER -F name=$REPO -F pr_number=$PR_NUMBER -f query=' | ||
query($name: String!, $owner: String!, $pr_number: Int!) { | ||
repository(owner: $owner, name: $name) { | ||
pullRequest(number: $pr_number) { | ||
title | ||
} | ||
} | ||
}')" | ||
if [[ "${prTitle}" == *"Personal/"* ]]; then | ||
gh pr comment $PR_URL --body "⚠️ Please add a meaningful PR title (remove the 'Personal/' prefix from the title)." | ||
echo 'VALIDATION_ERROR=true' >> $GITHUB_ENV | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OWNER: ${{ github.repository_owner }} | ||
PR_NUMBER: ${{ github.event.number }} | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
REPO: ${{ github.event.repository.name }} | ||
- name: Check for Validation Errors | ||
if: env.VALIDATION_ERROR | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
core.setFailed('PR Formatting Validation Check Failed!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This workflow automatically drafts new project releases so it is obvious | ||
# what a current release will look like at any time. | ||
# | ||
# It takes advantage of the labels used in Project Mu to automatically categorize | ||
# the types of changes in a given release. In addition, the semantic version of | ||
# the code is constantly maintained based on Project Mu label conventions to ensure | ||
# semantic versioning is followed and a release version is always ready. | ||
# | ||
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there | ||
# instead of the file in this repo. | ||
# | ||
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops | ||
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml | ||
# | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
# For more information, see: | ||
# https://github.com/release-drafter/release-drafter | ||
|
||
name: Update Release Draft | ||
|
||
on: | ||
push: | ||
branches: | ||
- release/202302 | ||
|
||
jobs: | ||
draft: | ||
uses: microsoft/mu_devops/.github/workflows/[email protected] | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# This workflow assists with initial triage of new issues by applying | ||
# labels based on data provided in the issue. | ||
# | ||
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there | ||
# instead of the file in this repo. | ||
# | ||
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops | ||
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml | ||
# | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
|
||
name: Initial Triage for New Issue | ||
|
||
on: | ||
issues: | ||
types: [ opened ] | ||
|
||
jobs: | ||
triage: | ||
uses: microsoft/mu_devops/.github/workflows/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters