Skip to content

Speed up AppVeyor builds by using build matrix to split into separate, parallel tasks such as unit tests, system tests and full build of artifacts #6944

@bergmeister

Description

@bergmeister

In the early days when PowerShell was still in Alpha state, the AppVeyor build took only 10 minutes, now it is nearly half an hour. This was very convenient for me as an early contributor where I could make minor changes without having to setup a dev environment locally and just download the MSI.
image

The free version of AppVeyor can run only 1 job at a time, but using the paid account that is used for PR builds, we can run multiple jobs in parallel when using a build matrix. They were originally designed for easy building and testing against different configurations and platforms (PSScriptAnalyzer uses them as well here) but we could still leverage that by splitting the whole build into independent chunks that will then run in parallel on separate AppVeyor VMs:

  • Quick build and running the Pester unit test suite
  • Running the XUnit tests
  • Running the Pester system tests (e.g. JEA, Admin tests, etc.) that take quite a while
  • Running the expensive feature tests
  • Full Build (CrossGen, MSI , etc) that produces artifacts.

Using this approach, I guess we should be able to go back to times of 10-15 minutes and also receive more test/artifact results faster due to the parallel nature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Maintainers-Buildspecific to affecting the buildIssue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions