Skip to content

Releases: microsoft/mu_devops

v6.5.1

23 Sep 02:19
2318750
Compare
Choose a tag to compare

What's Changed

  • MuDevOpsWrapper.yml: Set container\_build parameter @makubacki (#253)
    Change Details
      Sets the parameter to true since this usage of the template is always using a container.

Full Changelog: v6.5.0...v6.5.1

v6.5.0

22 Sep 23:38
e2f5540
Compare
Choose a tag to compare

What's Changed

  • .sync/Files.yml: Drop Makefile.toml sync to mu\_rust\_hid @makubacki (#251)
    Change Details
      Do not sync the file since the repo is not planned to host UEFI rust code at this time which the makefile helps cater to.

🚀 Features & ✨ Enhancements

  • Steps/RustCargoSteps.yml: Parameterize commands @makubacki (#252)
    Change Details
      Allows the format, test, and build commands to be customized by a caller. The default values remain the same as the previous commands for backward compatibility.

    Repos that only contain pure Rust code may choose to pass conventional
    cargo commands or custom wrapper commands.




Full Changelog: v6.4.1...v6.5.0

v6.4.1

22 Sep 19:04
2402fe9
Compare
Choose a tag to compare

What's Changed

  • .sync/Files.yml: Sync files to mu\_rust\_hid [Rebase \& FF] @makubacki (#244)
    Change Details
      Adds the mu_rust_hid repo as a file sync target for relevant files.

🐛 Bug Fixes

  • Conditionalize RustSetupSteps.yml to Non-Self-Hosted Agents @kuqin12 (#246)
    Change Details
      The current rust setup script embedded for package CI build will cause failures on selfhosted agent pipelines.

    On Windows AARCH64 agents, the failure is due to the installation of toolchain is currently specified to be x86_64, which will not succeed on AARCH64 systems in the self-host pool. In addition, the update will apply to installed cargo, which could cause conflict when multiple agents run on the same host system.

    On Linux agents, the failure is due to modifications made to container permissions. Self-hosted Linux agents do not use containers.

    The change here removes the toolchain installation steps for selfhost agent matrix builds as it assumes these systems preset the needed environment properly.




Full Changelog: v6.4.0...v6.4.1

v6.4.0

22 Sep 17:22
34c6988
Compare
Choose a tag to compare

What's Changed

  • RustSetupSteps: Add target triple detection @makubacki (#247)
    Change Details
      Adds a step to determine the target triple for the host platform that can be reused by other steps. It is currently used in the `rustup component add` command issued later in the file.

🚀 Features & ✨ Enhancements

  • .sync/dependabot: Add cargo ecosystem @makubacki (#245)
    Change Details
      Allows crate dependencies to be updated by dependabot.

🐛 Bug Fixes

  • .sync/Makefile.toml: Resolve cargo-tarpaulin breaking changes @makubacki (#249)
    Change Details
      Tarpaulin 0.27 was released on September 17, 2023: https://github.com/xd009642/tarpaulin/releases/tag/0.27.0

    The clap crate (Command Line Argument Parser) dependency within
    tarpaulin was upgraded in the 0.27 release from an old version
    (v2) to the latest major version (v4):

      Upgraded from clap v2 to v4. This has a few changes, notably any
      arguments which can be specified more than once require multiple
      entries so --run-types doc test needs to be turned into
      --run-types doc --run-types test
    

    This means passing packages to a single -p parameter as a comma-
    separated list is no longer supported:

      [cargo-make] Execute Command: "cargo" "tarpaulin" "-p" \
        "HelloWorldRustDxe,RustBootServicesAllocatorDxe"
    
      cargo_tarpaulin::config: Creating config
      cargo_tarpaulin: Running Tarpaulin
      cargo_tarpaulin: Building project
      cargo_tarpaulin::cargo: Cleaning project
      error: invalid character `,` in pkgid:
        `HelloWorldRustDxe,RustBootServicesAllocatorDxe`, characters must
        be Unicode XID characters (numbers, `-`, `_`, or most letters)
    

    Providing users the ability to pass packages separated by commas to
    cargo make coverage is convenient and assumed in our documentation
    and wrapper scripts.

    This change retains the same user-facing interface to cargo make coverage
    while using a duckscript within the cargo makefile to transform the
    list to the format accepted by tarpaulin. Other commands are unchanged.

    Duckscript is useful because it is readily embedded in cargo-make so
    no additional dependencies are required and it is cross-platform.


    In addition, a minor fix is made by changing Html to html for the
    following issue:

      [cargo-make] Execute Command: "cargo" "tarpaulin" "--out" "Html"
        "--exclude-files" "**/tests/*" "--output-dir" "D:\\src\\mu_plus/target"
      error: invalid value 'Html' for '--out [<FMT>...]'
        [possible values: json, stdout, xml, html, lcov]
    
        tip: a similar value exists: 'html'
    
      </blockquote>
      <hr>
    </details>
    

Full Changelog: v6.3.0...v6.4.0

v6.3.0

18 Sep 16:25
ce52749
Compare
Choose a tag to compare

What's Changed

🚀 Features & ✨ Enhancements

  • .sync/workflows/leaf/codeql: Remove build dirs @makubacki (#242)
    Change Details
      Intermediate build files are sometimes left in build directories during CodeQL execution. This is particularly more prevalent in module directories that contain Rust files. These files have very long names, for example:
    D:\a\mu_tiano_platforms\Build\QemuQ35Pkg
      \DEBUG_VS2022\X64\MsCorePkg\HelloWorldRustDxe\HelloWorldRustDxe
      \DEBUG\x86_64-unknown-uefi\debug\incremental
      \rust_boot_services_allocator_dxe-2f5m6unckl0t8
      \s-gorl2pbwn9-18oh534-e4zntah436u40i7hceav0825j
    

    CodeQL actions have well known and unresolved issues with long paths
    when they're scanning directories for files.

    The directories where these files may be left are not needed after
    build and it takes about 3 seconds to remove them so that is done
    in this change.


    Tested on fork. Example:
    https://github.com/makubacki/mu_tiano_platforms/actions/runs/6204825673




Full Changelog: v6.2.0...v6.3.0

v6.2.0

15 Sep 21:54
bdffdb2
Compare
Choose a tag to compare

What's Changed

Read more

v6.1.1

30 Aug 23:08
Compare
Choose a tag to compare

What's Changed

  • Add mu\_tiano\_platforms to Rust Sync @makubacki (#237)
    Change Details
      Two changes:

    Add extra_cargo_steps parameter in MuDevOpsWrapper.yml

    The extra_cargo_steps parameter allows a repo extending
    MuDevOpsWrapper.yml to specify a step list that should be executed
    before running the standard set of cargo commands in the repo
    (to build and test).


    Opt mu_tiano_platforms into Rust file sync

    Syncs the normal set of workspace-level Rust files to the
    mu_tiano_platforms repo.




  • .sync/RustSetupSteps.yml: Update leaf file to match current @makubacki (#236)
    Change Details
      Updates the workflow to be able to build Rust code if present in a repo. The Rust toolchain is installed by default, so this simply installs `cargo make` and installs `rust-src`.

    cargo-make is cached so it can be reused across runs until the
    next version is published in the upstream repo.




Full Changelog: v6.1.0...v6.1.1

v6.1.0

29 Aug 22:52
5f08732
Compare
Choose a tag to compare

What's Changed

🚀 Features & ✨ Enhancements

  • .sync/codeql: Add cargo make and install rust-src @makubacki (#235)
    Change Details
      Updates the workflow to be able to build Rust code if present in a repo. The Rust toolchain is installed by default, so this simply installs `cargo make` and installs `rust-src`.

    cargo-make is cached so it can be reused across runs until the
    next version is published in the upstream repo.




Full Changelog: v6.0.1...v6.1.0

v6.0.1

28 Aug 19:32
06f7930
Compare
Choose a tag to compare

What's Changed

  • set autocrlf to false in containers @Javagedes (#232)
    Change Details
      `core.autocrlf = true` is a common pitfall when edk2 developers create a new file. It is always suggested to have this git config value turned off when developing EDKII UEFI firmware. Updates the container to have this git config set as expected.

🐛 Bug Fixes

  • steps/RustSetupSteps.yml: Use step template to download artifacts @makubacki (#233)
    Change Details
      Downloads the Cargo tools from an Azure pipeline using a YAML step template.

    This resolves a problem in commit 69f6e96 that was not found until
    after check-in due to the nature of the issue. It is summarized
    below.

    In the original check-in (69f6e96), the following succeeds and fails:

    • Downloading and Caching as an Artifact:
      • ✓ Use GitHub REST API to download release and extract the binaries
      • ✓ Publish the binaries as a pipeline artifact in the projectmu org
    • Retrieving the Artifact
      • Note: In all cases, try the DownloadPipelineArtifact@2 and
        DownloadBuildArtifacts@1 tasks
      • ✓ Access in a manually triggered pipeline
      • ✓ Access in a PR triggered pipeline from a branch in the microsoft
        org repo (i.e. not a fork)
      • ✗ Access in a PR triggered pipeline from a branch outside the
        microsoft org repo (i.e. a fork)

    To allow testing using pre-existing PR check pipelines (which have
    access to branches on the microsoft org, not forks), the last case
    was unexpected and not encountered until the PRs completed.

    Since the information is readily available using the Azure Pipelines
    REST API without authentication, this change replaces the built-in
    tasks with calls to download the binaries from the REST API.

    There's a few quirks with pipelines that are accounted for:

    1. The Python code is inline so it can directly be used as a
      template in other YAML files that are used as a repository resource.
      If in a separate Python file, the mu_devops repo would need to be
      checked out to use access the file. Checking out the repo would
      increase build times and complicate pre-existing logic.
    2. The Azure Pipeline InvokeRESTAPI@1 task is not used as it is
      limited to agentless jobs.
    3. Conditions are not allowed on templates. Therefore the OS condition
      is moved to a string parameter that is compared in the condition
      on the task in the template. By default, the task will run on all
      operating systems if not specified.

    As a follow up, I will explore the Cache@2 task which might simplify
    some logic but require changes elsewhere as an alternative to cache
    the binaries in the pipelines.

    Signed-off-by: Michael Kubacki [email protected]




Full Changelog: v6.0.0...v6.0.1

v6.0.0

24 Aug 18:47
fb1c095
Compare
Choose a tag to compare

What's Changed

  • .sync/Version.njk: Update Mu repos to Mu DevOps v6.0.0 (and container) @makubacki (#230)
    Change Details
      Changes since last release: https://github.com/microsoft/mu_devops/compare/v5.0.6...v6.0.0

    General release info: https://github.com/microsoft/mu_devops/releases

    • The ubuntu-22-build container image is also updated to the latest: 9ab29bc.
      • Note: This is the first release with Rust dev support.
    • v6.0.0 also brings some new changes in the pipelines for Project Mu repos to build rust in CI.


🚀 Features & ✨ Enhancements

  • Add Rust Support [Rebase \& FF] @makubacki (#226)
    Change Details
      This pull request adds Rust support to mu_devops with patterns that extend to Rust adoption in additional Project Mu repos.

    The changes can be grouped into three high-level parts:

    1. Sync Rust environment files to repos
    2. Add pipeline support to build and test Rust code
    3. Update the build container to incorporate Rust support

    These changes extend existing Rust efforts in Project Mu and improve user experience outside the CI environment.


    Commit/Change Overview


    .azurepipelines: Add YAML to cache Cargo tools

    These files are added so dedicated pipelines can download the latest
    release from each tools GitHub repository and push the binaries to
    the pipeline artifacts.

    Project Mu pipelines dependent on Rust tools can access the tools
    directly from the Project Mu pipeline artifacts which is faster
    than building and more reliable than depending on infrastructure
    outside the pipelines.


    .sync/Files.yml: Move dev container section

    Moves the section higher in the file to maintain alphabetic ordering
    of sections.


    .sync: Sync common Rust files

    Syncs the following files to repos that support Rust builds.

    • Makefile.toml - Cargo makefile configuration. Repos will no
      longer extend from MU_BASECORE.
    • rustfmt.toml - The Rust formatting settings for the repo.

    Jobs/PrGate.yml: Give the linux container a reliable name

    Passes the --name parameter as a container creation option in
    pipelines so steps that may need to operate on the container instance
    have a fixed name to refer to the container by.

    The name is: mu_devops_build_container


    Steps: Add Rust templates

    Adds two new step templates.

    1. RustSetupSteps.yml - Prepare Cargo for Rust builds including
      build during the edk build process and perform other actions
      available during pre-firmware build.
    2. RustCargoSteps.yml.yml - Steps to run common Cargo commands
      on the workspace. Cargo should be installed and the workspace
      source cloned before running these steps.

    .sync/azure_pipelines/MuDevOpsWrapper.yml: Add rust support

    Allows repos that extend the YAML template to pass a new parameter
    rust_build. By default, the option is false. If true, then
    the repo will be set up to build for Rust and Cargo commands will
    be run at the workspace level to build and test code.


    Dockerfile: Add Rust support

    Updates the build container image to be able to build Rust code
    (including Rust UEFI code).

    The following additional applications are installed to assist with
    setting up Rust dependencies:

    curl, jq, and unzip

    The CARGO_HOME and RUSTUP_HOME environment variables are set in
    the image and the cargo directory is added to the system path.

    The version of Rust specified in Version.njk is installed alongside
    support for other tools used in Project Mu Rust builds such as
    cargo-make and cargo-tarpaulin. The latest release binaries are
    pulled directly from their GitHub releases to minimze container
    size impact.

    The resulting container images can be used for local development and
    within pipelines.


    Notes

    • The Rust toolchain version is defined in Version.njk. The version is used in:

      • The Dockerfile to ensure the container version is in sync
      • The YAML pipeline files to ensure (Windows) pipelines are in sync
      • The rust-toolchain.toml file to ensure local builds in repos are in sync
    • The Cargo make makefile is no longer defined in MU_BASECORE and extended to repos. It is synced in whole to repos. Extending from MU_BASECORE unnecessarily complicated pipeline logic and required pulling MU_BASECORE through a submodule (or worse, an external git dependency) on an agent increasing build time.

    • The container image build is structured to provide a ready-to-go Rust dev environment while also minimizing space. The previous build container size was ~1.94GB. Adding the Rust tools initially increased size to 3.41GB. With a variety of adjustments, the size now is ~2.58GB.

    • After this PR completes, a docker container build will happen and a follow up PR will update the Version.njk file to use the new container build. After that PR is completed, repos dependent on the container will be able to access it.


    File sync tested in the following PRs:



Full Changelog: v5.0.10...v6.0.0