8000 Speed up Travis by tannewt · Pull Request #440 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Speed up Travis #440

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

Merged
merged 1 commit into from
Nov 16, 2017
Merged

Speed up Travis #440

merged 1 commit into from
Nov 16, 2017

Conversation

tannewt
Copy link
Member
@tannewt tannewt commented Nov 16, 2017

This does two major things:

  1. It stores the arm gcc in the repo. The download from the PPA was taking between 2 and 7 minutes.
  2. It splits each board into a separate job so they are built in parallel.

@tannewt tannewt requested a review from dhalbert November 16, 2017 03:33
Copy link
Collaborator
@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

The parallel stuff is great!

But I would really rather not add a 62MB file to the repo, and have each and every clone of the repo now be forced to download this. Right now the whole download is only about 40MB. Every time we update the toolchain, it will be another 60MB unless you wipe out the history.

If the ppa fetching is slow (maybe it's throttled), could you keep the deb on AWS or the Adafruit CDN or somewhere like that?

Copy link
Collaborator
@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

AWS is good! The .deb is still in the commit - I think you'l need to redo that and push -f

@dhalbert
Copy link
Collaborator
dhalbert commented Nov 16, 2017

The qemu and unix sub-jobs failed. Does the elapsed time per sub-job look better or worse than with the .deb in the repo?

@dhalbert
Copy link
Collaborator

restarting .10 and .11. The AWS fetches failed (?).

@dhalbert
Copy link
Collaborator

Well, the fetch is plenty fast:

Resolving s3.amazonaws.com (s3.amazonaws.com)... 54.231.81.244
Connecting to s3.amazonaws.com (s3.amazonaws.com)|54.231.81.244|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 65011116 (62M) [application/x-www-form-urlencoded]
Saving to: ‘gcc-arm-embedded_6-2017q2-2~trusty1_amd64.deb’
100%[======================================>] 65,011,116  23.2MB/s   in 2.7s   

2.7s !

This does two major things:

1. It stores the arm gcc in the repo. The download from the PPA was taking between 2 and 7 minutes.
2. It splits each board into a separate job so they are built in parallel.
@dhalbert dhalbert merged commit 2d34450 into adafruit:master Nov 16, 2017
@tdicola
Copy link
tdicola commented Nov 16, 2017

What about building a docker image that's already setup with the PPAs and ARM GCC, etc. image for travis to use? More details here: https://docs.travis-ci.com/user/docker/ Build the docker image ahead of time and it can be populated and published to docker's universe with all the necessary build tools installed and no time waiting for Travis' servers to set it up. It could be faster and also has no cost from AWS (it's not huge but quick back of envelope is 60mb * 10 pulls a day * 20 days a month = 12GB of transfer, about $1 in bandwidth and storage costs). Also I'd double check travis CI config won't start jobs unless something very important happens like a pull is accepted from a core contributor--if it's triggered by opening issues or something anyone could do it could be an 'attack' vector that raises costs.

@tannewt
Copy link
Member Author
tannewt commented Nov 16, 2017

@tdicola I glanced at that Docker doc but don't have a lot of experience with Docker. I can't imagine it starts up faster than the Ubuntu VM.

I think the few dollar bandwidth cost per month is worth paying to have continuous testing for everyone. Having it run early on pull requests reduces our load of checking that it works later on. Also, if it became exorbitant we could use Travis' persist cache to persist it locally.

The ARM GCC PPA is also being requested as a whitelisted source for Travis here which would make it usable in container based builds.

For now, I think this is a good first step and we can evolve it later as needed.

@tdicola
Copy link
tdicola commented Nov 16, 2017

Yeah totally agree it's worth having fast builds for good continuous integration tests. A docker or other pre-built image is handy because it can be used by anyone, i.e. both the CI system and users who want to build circuitpython. It becomes the canonical way to install and build circuitpython regardless of platform. In my testing docker is super fast to startup and definitely worth benchmarking vs. an ubuntu VM that's installing everything from scratch. Putting apt packages on AWS is a smart idea and easy step for now but maybe worth keeping this issue open to explore more options for speeding up the build and making the build 'portable'?

@tannewt
Copy link
Member Author
tannewt commented Nov 16, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0