Repo File Sync: synced file(s) with microsoft/mu_devops (#576)
synced local file(s) with [microsoft/mu_devops](https://github.com/microsoft/mu_devops). 🤖: View the [Repo File Sync Configuration File](https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml) to see how files are synced. --- This PR was created automatically by the [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) workflow run [#6315415760](https://github.com/microsoft/mu_devops/actions/runs/6315415760) Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
This commit is contained in:
Родитель
90da51d509
Коммит
6e5a984096
|
@ -17,7 +17,7 @@ resources:
|
|||
type: github
|
||||
endpoint: microsoft
|
||||
name: microsoft/mu_devops
|
||||
ref: refs/tags/v6.1.0
|
||||
ref: refs/tags/v6.5.1
|
||||
|
||||
parameters:
|
||||
- name: do_ci_build
|
||||
|
@ -83,8 +83,6 @@ jobs:
|
|||
linux_container_image: ghcr.io/microsoft/mu_devops/ubuntu-22-build:9ab29bc
|
||||
${{ if eq(parameters.rust_build, true) }}:
|
||||
linux_container_options: --security-opt seccomp=unconfined
|
||||
extra_steps:
|
||||
- template: Steps/RustSetupSteps.yml@mu_devops
|
||||
do_ci_build: ${{ parameters.do_ci_build }}
|
||||
do_ci_setup: ${{ parameters.do_ci_setup }}
|
||||
do_pr_eval: ${{ parameters.do_pr_eval }}
|
||||
|
@ -97,6 +95,7 @@ jobs:
|
|||
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
|
||||
|
@ -113,6 +112,8 @@ jobs:
|
|||
clean: true
|
||||
- ${{ parameters.extra_cargo_steps }}
|
||||
- template: Steps/RustCargoSteps.yml@mu_devops
|
||||
parameters:
|
||||
container_build: true
|
||||
|
||||
- ${{ parameters.extra_jobs }}
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ 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/AutoApprover.yml@v6.1.0
|
||||
uses: microsoft/mu_devops/.github/workflows/AutoApprover.yml@v6.5.1
|
||||
secrets: inherit
|
||||
|
|
|
@ -26,5 +26,5 @@ 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/AutoMerger.yml@v6.1.0
|
||||
uses: microsoft/mu_devops/.github/workflows/AutoMerger.yml@v6.5.1
|
||||
secrets: inherit
|
||||
|
|
|
@ -18,4 +18,4 @@ on:
|
|||
|
||||
jobs:
|
||||
apply:
|
||||
uses: microsoft/mu_devops/.github/workflows/IssueAssignment.yml@v6.1.0
|
||||
uses: microsoft/mu_devops/.github/workflows/IssueAssignment.yml@v6.5.1
|
||||
|
|
|
@ -31,4 +31,4 @@ on:
|
|||
|
||||
jobs:
|
||||
apply:
|
||||
uses: microsoft/mu_devops/.github/workflows/Labeler.yml@v6.1.0
|
||||
uses: microsoft/mu_devops/.github/workflows/Labeler.yml@v6.5.1
|
||||
|
|
|
@ -24,4 +24,4 @@ on:
|
|||
|
||||
jobs:
|
||||
sync:
|
||||
uses: microsoft/mu_devops/.github/workflows/LabelSyncer.yml@v6.1.0
|
||||
uses: microsoft/mu_devops/.github/workflows/LabelSyncer.yml@v6.5.1
|
||||
|
|
|
@ -27,5 +27,5 @@ on:
|
|||
|
||||
jobs:
|
||||
draft:
|
||||
uses: microsoft/mu_devops/.github/workflows/ReleaseDrafter.yml@v6.1.0
|
||||
uses: microsoft/mu_devops/.github/workflows/ReleaseDrafter.yml@v6.5.1
|
||||
secrets: inherit
|
||||
|
|
|
@ -24,4 +24,4 @@ on:
|
|||
|
||||
jobs:
|
||||
check:
|
||||
uses: microsoft/mu_devops/.github/workflows/Stale.yml@v6.1.0
|
||||
uses: microsoft/mu_devops/.github/workflows/Stale.yml@v6.5.1
|
||||
|
|
|
@ -19,4 +19,4 @@ on:
|
|||
|
||||
jobs:
|
||||
triage:
|
||||
uses: microsoft/mu_devops/.github/workflows/IssueTriager.yml@v6.1.0
|
||||
uses: microsoft/mu_devops/.github/workflows/IssueTriager.yml@v6.5.1
|
||||
|
|
|
@ -6,11 +6,10 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
|
|||
RUSTC_BOOTSTRAP = 1
|
||||
ARCH = "X64"
|
||||
TARGET_TRIPLE = { source = "${ARCH}", mapping = { "X64" = "x86_64-unknown-uefi", "IA32" = "i686-unknown-uefi", "AARCH64" = "aarch64-unknown-uefi", "LOCAL" = "${CARGO_MAKE_RUST_TARGET_TRIPLE}" }, condition = { env_not_set = [ "TARGET_TRIPLE" ] } }
|
||||
PACKAGE_TARGET = {value = "-p ${CARGO_MAKE_TASK_ARGS}",condition = { env_true = [ "CARGO_MAKE_TASK_ARGS", ] } }
|
||||
|
||||
BUILD_FLAGS = "--profile ${RUSTC_PROFILE} --target ${TARGET_TRIPLE} -Zbuild-std=core,compiler_builtins,alloc -Zbuild-std-features=compiler-builtins-mem -Zunstable-options --timings=html"
|
||||
TEST_FLAGS = { value = "", condition = { env_not_set = ["TEST_FLAGS"] } }
|
||||
COV_FLAGS = { value = "--out Html --exclude-files **/tests/*", condition = { env_not_set = ["COV_FLAGS"] } }
|
||||
COV_FLAGS = { value = "--out html --exclude-files **/tests/*", condition = { env_not_set = ["COV_FLAGS"] } }
|
||||
|
||||
[env.development]
|
||||
RUSTC_PROFILE = "dev"
|
||||
|
@ -20,6 +19,28 @@ RUSTC_TARGET = "debug"
|
|||
RUSTC_PROFILE = "release"
|
||||
RUSTC_TARGET = "release"
|
||||
|
||||
[tasks.individual-package-targets]
|
||||
script_runner = "@duckscript"
|
||||
script = '''
|
||||
args = get_env CARGO_MAKE_TASK_ARGS
|
||||
|
||||
if is_empty ${args}
|
||||
exit
|
||||
end
|
||||
|
||||
1 = array ""
|
||||
2 = split ${args} ,
|
||||
3 = array_concat ${1} ${2}
|
||||
joined_args = array_join ${3} " -p "
|
||||
release ${1}
|
||||
release ${2}
|
||||
release ${3}
|
||||
|
||||
joined_args = trim ${joined_args}
|
||||
set_env INDIVIDUAL_PACKAGE_TARGETS ${joined_args}
|
||||
release ${joined_args}
|
||||
'''
|
||||
|
||||
[tasks.build]
|
||||
description = """Builds a single rust package.
|
||||
|
||||
|
@ -34,28 +55,33 @@ Example:
|
|||
"""
|
||||
clear = true
|
||||
command = "cargo"
|
||||
args = ["build", "@@split(PACKAGE_TARGET, )", "@@split(BUILD_FLAGS, )"]
|
||||
args = ["build", "@@split(INDIVIDUAL_PACKAGE_TARGETS, )", "@@split(BUILD_FLAGS, )"]
|
||||
dependencies = ["individual-package-targets"]
|
||||
|
||||
[tasks.check]
|
||||
description = "Checks rust code for errors. Example `cargo make check`"
|
||||
clear = true
|
||||
command = "cargo"
|
||||
args = ["check", "@@split(PACKAGE_TARGET, )", "@@split(BUILD_FLAGS, )"]
|
||||
args = ["check", "@@split(INDIVIDUAL_PACKAGE_TARGETS, )", "@@split(BUILD_FLAGS, )"]
|
||||
dependencies = ["individual-package-targets"]
|
||||
|
||||
[tasks.check_json]
|
||||
description = "Checks rust code for errors with results in JSON. Example `cargo make check_json`"
|
||||
clear = true
|
||||
command = "cargo"
|
||||
args = ["check", "@@split(PACKAGE_TARGET, )", "@@split(BUILD_FLAGS, )", "--message-format=json"]
|
||||
args = ["check", "@@split(INDIVIDUAL_PACKAGE_TARGETS, )", "@@split(BUILD_FLAGS, )", "--message-format=json"]
|
||||
dependencies = ["individual-package-targets"]
|
||||
|
||||
[tasks.test]
|
||||
description = "Builds all rust tests in the workspace. Example `cargo make test`"
|
||||
clear = true
|
||||
command = "cargo"
|
||||
args = ["test", "@@split(PACKAGE_TARGET, )", "@@split(TEST_FLAGS, )"]
|
||||
args = ["test", "@@split(INDIVIDUAL_PACKAGE_TARGETS, )", "@@split(TEST_FLAGS, )"]
|
||||
dependencies = ["individual-package-targets"]
|
||||
|
||||
[tasks.coverage]
|
||||
description = "Build and run all tests and calculate coverage."
|
||||
clear = true
|
||||
command = "cargo"
|
||||
args = ["tarpaulin", "@@split(PACKAGE_TARGET, )", "@@split(COV_FLAGS, )", "--output-dir", "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target"]
|
||||
args = ["tarpaulin", "@@split(INDIVIDUAL_PACKAGE_TARGETS, )", "@@split(COV_FLAGS, )", "--output-dir", "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target"]
|
||||
dependencies = ["individual-package-targets"]
|
||||
|
|
Загрузка…
Ссылка в новой задаче