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

[example tests] Adding a clone and a deploy step to allow optimizations in CI. #3208

Merged
merged 1 commit into from
Nov 7, 2016

Conversation

bridadan
Copy link
Contributor

@bridadan bridadan commented Nov 4, 2016

Description

This adds an example clone and deploy step that allows you to modify
each top level repository before pulling in the rest of the example's
dependencies. This allows us to not pull in a copy of mbed-os for each
example in CI and instead symbolic link the already cloned copy, saving
valuable time and disk space

Status

READY

Migrations

If this PR changes any APIs or behaviors, give a short description of what API users should do when this PR is merged.

NO

Todos

How to use

These changes are intended mostly for use in CI. Currently importing the examples and their dependencies (including mbed-os for every example) takes upwards of 10 minutes and multiple GBs of disk space. This will both reduce the time and disk space for testing with one common mbed-os revision by allowing you to symbolic link to one specific repository. The flow would look like the following.

  1. Clone mbed-os into "mbed-os"
  2. In the same directory, create a directory called "examples"
  3. cd examples
  4. Execute the clone command: python ../mbed-os/tools/examples/examples.py clone
    1. This will do the appropriate git or hg command to clone just the top level example repo
  5. For each cloned example, symbolic link your already cloned "mbed-os" repo: ln -s ../../mbed-os mbed-os or use the equivalent command on your OS
  6. Execute the deploy command to finish pulling in each examples' dependencies (in this case, mbed-os is already present so it is not cloned): python ../mbed-os/tools/examples/examples.py deploy

At this point, the examples are fully cloned. You can now use the rest of examples.py as you normally would.

This adds an example clone and deploy step that allows you to modify
each top level repository before pulling in the rest of the example's
dependencies. This allows us to not pull in a copy of mbed-os for each
example in CI and instead symbolic link the already cloned copy, saving
valuable time and disk space
@bridadan
Copy link
Contributor Author

bridadan commented Nov 4, 2016

/morph test

@mbed-bot
Copy link

mbed-bot commented Nov 5, 2016

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1006

All builds and test passed!

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 7, 2016

@adbridge review?

@adbridge
Copy link
Contributor

adbridge commented Nov 7, 2016

@bridadan Please add a section to the description showing an example of how you would use the new commands.

@adbridge
Copy link
Contributor

adbridge commented Nov 7, 2016

Otherwise code changes LGTM 👍

@bridadan
Copy link
Contributor Author

bridadan commented Nov 7, 2016

Thanks @adbridge, I've added a description to the PR detailing how these changes are intended to use. @0xc0170 or @sg- this should be ready to go now! This will allow us to speed up CI significantly!

@adbridge
Copy link
Contributor

adbridge commented Nov 7, 2016

@bridadan thanks for the description update, very useful. LGTM

@sg- sg- merged commit 79abaab into ARMmbed:master Nov 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants