Skip to content

Parallelize the windows CI to enable us to run all tests all the time#8868

Merged
TravisEz13 merged 9 commits intoPowerShell:masterfrom
TravisEz13:split_package_CI
Feb 15, 2019
Merged

Parallelize the windows CI to enable us to run all tests all the time#8868
TravisEz13 merged 9 commits intoPowerShell:masterfrom
TravisEz13:split_package_CI

Conversation

@TravisEz13
Copy link
Copy Markdown
Member

@TravisEz13 TravisEz13 commented Feb 12, 2019

PR Summary

Split Windows CI into the following Jobs

  1. Combine Build and xUnit, which published build artifact
  2. Elevated CI tests
  3. Unelevated CI test
  4. Elevated everything else tests
  5. Unelevated everything else tests
  6. Package build and test
  7. Verify xUnit result

PR Context

Before this test:

  • A CI run would take ~14 minutes
  • A Feature run would take ~30 minutes

After this change, it always runs all tests and takes ~20 minutes.
Job Unelevated everything else tests is the long poll, taking ~4 minutes longer than the next shortest job. We should be able to get this back down to ~15 if we split that test job somehow.

PR Checklist

@TravisEz13 TravisEz13 changed the title Split package ci Parallelize the windows CI to enable us to run all tests all the time Feb 12, 2019
@iSazonov
Copy link
Copy Markdown
Collaborator

We should be able to get this back down to ~15 if we split that test job somehow.

By projects?

@TravisEz13
Copy link
Copy Markdown
Member Author

TravisEz13 commented Feb 12, 2019

@iSazonov I don't want to design the solution right now. By project, would be a possibility, but optimally, we should try to find a way that makes sense and divides the time close to evenly.

I think our first goal would be to do a similar refactoring of the non-windows CI system.

@iSazonov
Copy link
Copy Markdown
Collaborator

iSazonov commented Feb 13, 2019

@TravisEz13 Why we do not select Build in a separate job to use the result for the rest jobs?

Also perhaps we could use strategy-matrix to unify process.

@TravisEz13
Copy link
Copy Markdown
Member Author

TravisEz13 commented Feb 13, 2019

@iSazonov Review the change. We do the build as a separate job and use the results (artifacts) for the rest of the jobs.

Matrix is less flexible that designing the pipeline yourself. We would not be able to do the build is a separate job and use the artifacts for the rest of the jobs.

Using templates gets you all the advantages of a matrix (not having to restate the job multiple times, only declare how many times you want to run it), with the added ability to depend on previous jobs.

$SkipFailing
)
$env:CoreOutput = Split-Path -Parent (Get-PSOutput -Options (Get-PSOptions))
if(!(Test-Path "$env:CoreOutput\pwsh.exe"))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change this to work on Linux and macOS

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the PR xUnit tests run only on Windows. Previously we run the tests on Unix-s too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR doesn't change Linux or macOS. I'll deal with this issue when refactoring macOS and Linux

@iSazonov
Copy link
Copy Markdown
Collaborator

@TravisEz13 Thanks for clarify! I see now how this works.

For reference Setting up parallel jobs, Slicing the test suite
https://docs.microsoft.com/en-us/azure/devops/pipelines/test/parallel-testing-any-test-runner?view=azure-devops#setting-up-parallel-jobs

@TravisEz13 TravisEz13 merged commit a7f7985 into PowerShell:master Feb 15, 2019
@TravisEz13 TravisEz13 deleted the split_package_CI branch February 15, 2019 00:33
@TravisEz13 TravisEz13 added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Test Indicates that a PR should be marked as a test change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants