-
Notifications
You must be signed in to change notification settings - Fork 8.1k
AppVeyor build matrix: more efficient build job split to reduce total time by another 5 minutes #7021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AppVeyor build matrix: more efficient build job split to reduce total time by another 5 minutes #7021
Conversation
…o AppVeyor_SplitPesterAndXUnitTests
…or the rest (Admin Pester tests, XUnit, feature tests and packaging)
…o AppVeyorMoreEfficientSplit
…eister/PowerShell into AppVeyorMoreEfficientSplit
appveyor.yml
Outdated
| # Stop all jobs in the matrix if any one them fail | ||
| matrix: | ||
| fast_finish: true | ||
| Purpose: AdvancedPesterTests_xUnit_Packaging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AdvancedPesterTests
How about ElevatedPesterTests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be but keep in mind that it is not only the admin tests, when the feature keyword is specified in a commit then it it also 'Slow', 'Feature', 'Scenario' categories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it only indicates running Pester tests in an elevated process, not implying what tags of tests are run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, PesterCI part only runs a subset of PR CI tests -- it doesn't run tests with tag -Tags @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix'), or when [Feature] is sepecifed, it runs 'slow', 'feature', 'scenario' tests as long as they don't have 'RequireAdminOnWindows'. So to be precise, this purpose probably can be renamed to UnelevatePesterTests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I changed the names to UnelevatedPesterTests and ElevatedPesterTests_xUnit_Packaging
…e that feature tests only get run in 2nd job
|
@bergmeister can you push a commit with |
|
OK, it seems, when using |
|
@bergmeister thanks for investigating the results |
…o AppVeyorMoreEfficientSplit
…l and publish code coverage for both build jobs when using a daily build
|
@TravisEz13 I found the reason for the missing unelevated Pester feature tests and I fixed it. I consider the PR ready for review again now, I just pushed the last simplification commit. |
|
@bergmeister The last feature build was still 678 tests short... I'm trying to take a quick look why... |
|
With the Feature tag, the elevated tests should be 633, while only 114 were run with your PR. Update: Update-2: |
|
@TravisEz13 I pushed another |
…o AppVeyorMoreEfficientSplit
|
@bergmeister Code coverage does not use the AppVeyor workflow so this change should not be an issue. |
|
@bergmeister I was discussing the impact of FailFast with other team members. @JamesWTruher Mentioned that we would like to always have logs of tests results (even if it is that tests were canceled.) FailFast defeats this and we don't get logs to any canceled tests. Could you disable FailFast? We don't view this as a critical part of this optimization. |
|
@TravisEz13 OK. Sounds good. This PR already has |
|
@bergmeister sorry I messed that. |
|
@bergmeister |
|
@bergmeister And thanks for this work. |
|
@TravisEz13 You're welcome, I quite enjoy working with CI systems and tweaking them. I also like it now to be able to get complete results now again in 15 minutes, which is close to how it was when PowerShell was in Alpha state. If you think about always running feature tests, then I think it would be the best to do that in an optional 3rd build job that could be implemented in an easier fashion once It would be interesting if you guys could setup a Travis CI build for PSSA to get coverage for Mac (AppVeyor now officially supports Ubuntu images and I can tell from experience that they work very well, are very fast and the AppVeyor support is awesome, just a few days ago they fixed a bug in production for me in less than an hour or me raising it). You could therefore consider moving the Linux tests to AppVeyor. |
I don't think we would wait for conditional matrices. We would just add another job with no condition that would run all the time.
I have discussed with other team members moving the PowerShell Core Linux tests from Travis-CI to AppVeyor. I agree that they seem faster and I prefer the AppVeyor feature set and support over Travis-CI. If we were to move to AppVeyor, we would probably run both for some time to prove that they are reliable. Currently, I have the PowerShell-Docker tests all running in AppVeyor as testing on Linux should be equivalent of testing on macOS for what we are delivering in that repo. |
|
@TravisEz13 Yes, just running the feature tests in a 3rd job would be OK for me as well. |
|
@bergmeister We have considered VSTS. I have already reserved I plan to move PowerShell-Docker to VSTS when I get the issues worked out (the CI builds aren't running even though the webhook fires.) |
PR Summary
Closes #6944
Following PR #6945 , further reduce the total build time (without any disadvantages) by around 5 minutes by making sure there is a more even split between the 2 build jobs (the 2nd build job used to be much shorter).
Therefore this PR moves also the
xUnitandPester-Admin tests into the 2nd build job. If it is a daily/feature test commit, then the feature tests will also happen (only) in the 2nd build job. Because both jobs now run tests, thefailfastoption was removed. The final question from my side is whether running tests in 2 build jobs is OK for the daily build, which uploads code coverage results?The time to wait for the AppVeyor build results is now 15 +/- 2 minutes, which is a huge improvement to what used to be around 28 minutes before the build matrix was introduced.
In the future, we could possibly run the feature tests in an optional 3rd build job once
AppVeyorimplements conditional build matrices here: appveyor/ci#2299PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests