diff --git a/.azurepipelines/MuDevOpsWrapper.yml b/.azurepipelines/MuDevOpsWrapper.yml index 02ad14882a..e16e59919a 100644 --- a/.azurepipelines/MuDevOpsWrapper.yml +++ b/.azurepipelines/MuDevOpsWrapper.yml @@ -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 }} diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index d193b36e1b..77928eaeb5 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -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 diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index b0f35aef9d..b3c0bba446 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -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 diff --git a/.github/workflows/issue-assignment.yml b/.github/workflows/issue-assignment.yml index ed6607b766..f6e32cd987 100644 --- a/.github/workflows/issue-assignment.yml +++ b/.github/workflows/issue-assignment.yml @@ -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 diff --git a/.github/workflows/label-issues.yml b/.github/workflows/label-issues.yml index 882956dd58..6490ecdc11 100644 --- a/.github/workflows/label-issues.yml +++ b/.github/workflows/label-issues.yml @@ -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 diff --git a/.github/workflows/label-sync.yml b/.github/workflows/label-sync.yml index e3c8c750e2..79de1ec6fc 100644 --- a/.github/workflows/label-sync.yml +++ b/.github/workflows/label-sync.yml @@ -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 diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml index 4005c4dafe..afbff8a8c8 100644 --- a/.github/workflows/release-draft.yml +++ b/.github/workflows/release-draft.yml @@ -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 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index a6c530e771..6c1c733037 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -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 diff --git a/.github/workflows/triage-issues.yml b/.github/workflows/triage-issues.yml index 940c46849d..e226281334 100644 --- a/.github/workflows/triage-issues.yml +++ b/.github/workflows/triage-issues.yml @@ -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 diff --git a/Makefile.toml b/Makefile.toml index d85b4fbdc5..3019bc956b 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -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"]