Skip to content
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

[ci] speed up the linux builds #1745

Merged
merged 9 commits into from
Oct 17, 2018
Merged

[ci] speed up the linux builds #1745

merged 9 commits into from
Oct 17, 2018

Conversation

guolinke
Copy link
Collaborator

No description provided.

@guolinke
Copy link
Collaborator Author

before:
image
after:
image

@guolinke
Copy link
Collaborator Author

guolinke commented Oct 12, 2018

remaining bottlenecks:

  1. GPU builds, cost about 12 mins.
  2. Windows builds, cost about 10 mins. The main costs in Windows build are the conda install. Maybe we can use docker to speed up it.

@guolinke guolinke closed this Oct 12, 2018
@guolinke guolinke reopened this Oct 12, 2018
@StrikerRUS
Copy link
Collaborator

StrikerRUS commented Oct 12, 2018

Impressive speedup!

We can overcome bottlenecks by the ordering of builds.
We have 12 build tasks but are limited by 10 concurrent agents.
At present Windows builds, which are the longest ones, start after first finished ones. So the best case is 5 min (Linux) + 10 min (Windows).

If there is a way to control the order of the builds, then we can place Windows builds at first place, and the whole CI time will be max(Linux + Linux, Windows) which is smaller than the present Linux + Windows time.

@guolinke
Copy link
Collaborator Author

@StrikerRUS
maybe I can add some self-hosted agents, for gpu and windows bulids.

@StrikerRUS
Copy link
Collaborator

StrikerRUS commented Oct 13, 2018

@guolinke In my opinion, it doesn't value to complicate CI for the 2-3 min speedup (in case we are able to reorder the builds).

@guolinke
Copy link
Collaborator Author

@StrikerRUS can we merge this first?

@chivee
Copy link
Collaborator

chivee commented Oct 16, 2018

@StrikerRUS , the build time varies from time to time. it depends on whether CI/AppVeyor is busy or not. and the O(Build) was same if there are few PR was build at the same time.

I think another opinion is that could the build logic of Push & PR was trigger at different phase?

@chivee
Copy link
Collaborator

chivee commented Oct 16, 2018

I'm not sure whether CI will optimize for the same source code build, considering there will be two times build (appveyor/branch v.s appveyor/pr and travis-ci/pr v.s travis-ci/push) for every code commit.

@StrikerRUS
Copy link
Collaborator

@chivee As I know, the only way to optimize this is creating PR at later time, when all code changes have been done 😢 .

Also, there will be useful to enable the option on Azure (if exists) similar to Appveyor's Rolling Builds and Travis' Auto-Cancellation.

Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

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

@guolinke Please take a look: I left some comments/questions below.

.ci/setup.sh Outdated
sudo apt-get install --no-install-recommends -y g++-4.8 || exit -1
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 100
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 100
# elif [[ $AZURE == "true" ]] && [[ $COMPILER == "gcc" ]] && [[ $TASK != "gpu" ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you want to leave this commented?

.ci/setup.sh Show resolved Hide resolved
.ci/test.sh Show resolved Hide resolved
.travis.yml Outdated
addons:
apt:
sources:
- sourceline: 'ppa:kzemek/boost'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe move this to the shell script:

if [[ $TRAVIS == "true" ]]; then
    sudo add-apt-repository ppa:kzemek/boost -y
fi

somewhere here
https://github.com/Microsoft/LightGBM/blob/d852716c21e52fda47d7eccee7e6b674c1e9e35d/.ci/setup.sh#L44
for not bothering other tasks, except gpu?

@guolinke guolinke merged commit 1a1255a into master Oct 17, 2018
@guolinke guolinke deleted the vsts-windows branch October 17, 2018 12:09
@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants