Skip to content

Add root build definition which builds the entire repo #98

Closed

Description

@ViktorHofer

Ported from @jashook's doc: https://github.com/dotnet/consolidation/pull/30

Overview

The purpose of this comment is to give a design of the CI build of dontet/runtime using the live builds of each folder under src. This replace the old package restore dependency flow between what used to be dotnet/coreclr, dotnet/corefx and dotnet/core-setup.

It is important to note that this focuses on the CI build of the dotnet/runtime product. This distinction is required because the developer worklow for the repository is different and is being added here: #55.

Goal

We want to have a single pipeline that builds a minimum matrix of coreclr, libraries and installer for all paths in the repository excluding docs/*.

The simple justification is that our setup already mostly requires this. Coreclr changes have to build libraries to run tests. Libraries has to build CoreCLR to build and to run tests once we're live / live. The only real delta here is whether or not to build installers. That can be done in parallel with testing though hence it doesn't affect throughput.

The approach would be to condition a full platform matrix and condition test runs based on changed paths. There would be an early job which defines variables (i.e changedLibraries, changedCoreClr) and then we would condition build and test jobs based on those variables.

The downside to this approach is that a bunch of jobs will be shown as skipped when the path doesn't applies, but long-term we can request a feature that defines a variable at compile time with the changed paths and then we can condition at compile time rather than run time.

The advantages is that now we have less .yml entry-points to maintain and we avoid a lot of build duplication on our CI when a change touches multiple subsets.

Building

runtime/src/coreclr and runtime/src/corefx should each have templates which allow the following parameters, platforms: [<OS>_<Arch>], buildConfig [debug, checked, release], jobTemplate.

Sample yml:

- template: templates/platform-matrix.yml
  parameters:
    jobTemplate: coreclr/build-job.yml
    buildConfig: debug
    platforms:
    - Windows_NT_x64
    - Windows_NT_x86

    # Job parameters is a grab bag of extra properties.
    jobParameters:
      testGroup: innerloop

This will allow us to re-use the platform fan out template logic for the coreclr and libraries steps build.

This is about to be done for coreclr and libraries (#294 and #274).

Pipeline mock up

  1. Official Build:
    build coreclr -> build libraries -> build installer -> sign -> publish
  2. changedCoreClr == true:
    build coreclr (full matrix including checked builds) -> build libraries -> build libraries tests, build coreclr managed tests, build coreclr native tests -> run tests
  3. changedLibraries == true:
    build coreclr -> build libraries -> build libraries tests -> run libraries tests
  4. changedInstaller == true:
    build coreclr -> build libraries -> build installer -> build installer tests -> run installer tests

cc @dotnet/runtime-infrastructure

Activity

  1. added this to the 5.0 milestone on Nov 18, 2019
  2. self-assigned this
    on Nov 18, 2019
  3. trylek commented on Nov 18, 2019

    @trylek
    Member

    Adding @jkoritzinsky who is currently making progress on "live live build" as there seems to be quite a bit of overlap to prevent duplication of efforts.

  4. safern commented on Nov 18, 2019

    @safern
    Member

    Assigning to me as I already started with this work.

    Just wanted to make sure we're all in the same page as we've had super long discussions on Friday on what the plan is for this.  (You guys were OOF).

    @jashook @sbomer and I, discussed on the structure for this and we think we shouldn't put an effort to put up a pipeline that builds the entire repo just yet as we should try and re-use as much as possible from the CI builds in order to parallelyze. Also @dagood was going to put a pipeline that uses the local live live logic that @jkoritzinsky put up together for one configuration in order to start the signing work and then the signing work should just be ported over to the "libraries" live live CI build as part of the official build.

    As a result of that @jashook put up together this file: https://github.com/dotnet/consolidation/pull/30

  5. ViktorHofer commented on Nov 18, 2019

    @ViktorHofer
    MemberAuthor

    Thanks for summarizing the status. Removing my assignment as work is already in progress here.

  6. safern commented on Dec 2, 2019

    @safern
    Member

    I've updated the description to summarize the last plan that we discussed today in the morning.

    Please feel free to update and comment with thoughts and opinions if you agree or disagree with something on that plan.

  7. trylek commented on Dec 2, 2019

    @trylek
    Member

    Sounds great to me. As to the nearest sequencing, my expectations are the following:

    1. I'll rename the live-live pipeline from eng/pipelines/coreclr/pr.yml to a new name (my current plan is eng/pipelines/root.yml but it's certainly up to further discussion) and I'll put back the pre-existing CoreCLR pr.yml - this is also important to verify that my changes haven't broken the "legacy" runtime-coreclr pipeline;
    2. I'll make my best to address the rest of PR feedback and merge the change in ASAP, ideally before EOD today;
    3. Once the change is in, @dagood can start working on wiring up the installer logic;
    4. In parallel, we can work on finalizing the test coverage extent and other details regarding switch-over of innerloop testing in the individual subrepos and an overall outerloop testing of the entire runtime repo to the live-live logic.
  8. ViktorHofer commented on Dec 4, 2019

    @ViktorHofer
    MemberAuthor

    and an overall outerloop testing of the entire runtime repo

    Hearing of that the first time. Do we actually want that?

  9. 1 remaining item

  10. ViktorHofer commented on Dec 4, 2019

    @ViktorHofer
    MemberAuthor

    I wanted to summarize what we just discussed in the infra standup:

    We should have four layers of builds:

    • PR builds which run per PR commit against an agreed set of configurations, a trade-off between coverage and machine utilization.
    • Rolling builds (CI runs) which run per commit in master. To keep the volume low, we should batch these together. We run/test on/against the full platform matrix.
    • Internal builds which run per commit in dnceng/internal/dotnet-runtime master. We can probably batch those together as well. Here we don't run any tests but do signing and publishing.
    • Outerloop builds (stress runs): These builds can be triggered in PRs (with /azp run ...) and are scheduled as well (interval is different per build definition) to provide continuous coverage. Every outerloop build defintion runs a different set of tests, ie libraries-http-stress vs coreclr-gc-stress.
  11. dagood commented on Dec 18, 2019

    @dagood
    Member

    I have a PR open for signed/official builds: #1016. Still doing a little more validation on publish.

  12. dagood commented on Dec 19, 2019

    @dagood
    Member

    #1016 is merged, and the first build is running here: https://dev.azure.com/dnceng/internal/_build/results?buildId=461841&view=results. 🎉

    Now monitoring for publish results, and we'll be working on pushing them downstream.

  13. dagood commented on Dec 19, 2019

    @dagood
    Member

    Succeeded, but didn't publish to dotnetcli, only the blob feed (https://dotnetfeed.blob.core.windows.net/dotnet-core/assets/core-setup/Runtime/5.0.0-alpha.1.19618.2/dotnet-runtime-5.0.0-alpha.1.19618.2-win-x64.exe). Looks like dotnet/core-setup#8426 never got ported to master. At least it's clear what to do from that PR.

    On the other hand, even though publishing didn't include all the endpoints, I would have expected auto-update PRs anyway... will look into why I'm not seeing any tomorrow. (I haven't reviewed the list of subscriptions yet or confirmed the build actually got on the right channel in BAR--not at my work machine.) We have auto-PRs going, just need to make publishing complete.

    /cc @mmitche

  14. dagood commented on Dec 19, 2019

    @dagood
    Member

    It also looks like CoreCLR packages weren't published, seeing dotnet/winforms#2533.

  15. dagood commented on Dec 20, 2019

    @dagood
    Member

    Fixes for dotnetcli publish (#1092) and CoreCLR publish (#1090) are now both merged. https://dev.azure.com/dnceng/internal/_build/results?buildId=463477&view=results is running with the fixes. I'm monitoring and will post an update once it's done. ~3-4 hours seems to be the norm.

  16. dagood commented on Dec 21, 2019

    @dagood
    Member

    Looks like it worked, for example this got published:

    https://dotnetcli.blob.core.windows.net/dotnet/Runtime/5.0.0-alpha.1.19620.3/dotnet-runtime-5.0.0-alpha.1.19620.3-win-x64.exe

    and Microsoft.NET.Sdk.IL@5.0.0-alpha.1.19620.3 was pushed to the dotnet-core feed.

    But auto-update PRs weren't updated with this new build, not sure why. Will look into that when I have a chance.

  17. dagood commented on Dec 23, 2019

    @dagood
    Member

    Auto-update PRs were updated, but are in a bad state.

    Filed #1129 for aspnet/extensions and dotnet/toolset. Some native crypto issue.

    dotnet/winforms is waiting for an update from repo maintainers. dotnet/winforms#2533

  18. RussKie commented on Dec 29, 2019

    @RussKie
    Contributor

    dotnet/winforms is waiting for an update from repo maintainers. dotnet/winforms#2533

    The PR is still failing to build:

    ##[error]src\Accessibility\src\Accessibility.ilproj(0,0): error NU1102: Unable to find package runtime.win-x64.microsoft.netcore.ilasm with version (>= 5.0.0)
      - Found 1164 version(s) in dotnet-core [ Nearest version: 5.0.0-alpha.1.19627.5 ]
      - Found 792 version(s) in dotnet-coreclr [ Nearest version: 5.0.0-alpha1.19564.1 ]
      - Found 9 version(s) in nuget.org [ Nearest version: 2.0.8 ]
      - Found 0 version(s) in arcade
      - Found 0 version(s) in dotnet-eng
    
  19. dagood commented on Jan 6, 2020

    @dagood
    Member

    See dotnet/winforms#2533 (comment) about the WinForms issue.

  20. dagood commented on Jan 6, 2020

    @dagood
    Member
  21. safern commented on Jan 16, 2020

    @safern
    Member

    Done by: #1473

  22. ghost locked as resolved and limited conversation to collaborators on Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions