[ci] speed up conda setup for some jobs #5668
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In #5648 , I saw that
conda create
-ing an environment in one shot was significantly faster in some situations thanconda create
-ing an environment and then updating it withconda install
orconda update
(#5647 (comment)).That PR was for Windows CI jobs.
This PR proposes similar changes to some of the macOS and Linux jobs.
lint
,if-else
, andswig
job code up earlier in.ci/test.sh
swig
job doesn't need a conda environment, so time in that job spent waiting forconda create
is wasted timelint
andif-else
have very differentconda
-installed dependencies than the other jobs, so they can be totally self-contained and justconda create
their own environment with everything they needbenefits of this change
I observed the following timing differences in these jobs on this PR, compared to
master
:master
this PR:
latest
master
build:Notes for Reviewers
Given all the things that can change from run-to-run, it's hard to trust small differences in the timings based on 1 or even a few of runs. But I'm still pretty confident that these changes make these CI jobs at least a small amount faster, without reducing their stability.
If this PR is accepted, I'll propose another one after that consolidates these into a single
conda create
for the remaining tasks:LightGBM/.ci/test.sh
Line 37 in 61e464b
LightGBM/.ci/test.sh
Lines 126 to 140 in 61e464b