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

Windows CI on Appveyor #10051

Merged
merged 4 commits into from
Jul 26, 2018
Merged

Windows CI on Appveyor #10051

merged 4 commits into from
Jul 26, 2018

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Jul 26, 2018

This PR is based on my initiative to support PX4 developent under Windows and @dagar 's request to have CI to inform everyone automatically when a change breaks that support.
Reference: #10002

Solution:
I created an appveyor.yml CI script that when enabling the Appveyor CI service for the PX4 Firmware repository automatically builds it under Windows. Appveyor in particular is used because it's a convenient cloud service host supporting Windows builds and it offers a free service usage with a certain amount of resources to open source projects.

Details:

  • It downloads and uses the latest Cygwin Toolchain installer which is described in the Devguide here:
    http://dev.px4.io/en/setup/dev_env_windows_cygwin.html
    Hence it exactly reproduces the recommended way to build natively under Windows.
  • It caches the MSI installer file (496MB) on the Appveyor server to prevent huge amounts of duplicate downloading from AWS S3.
  • It sets up the environmental variables exactly as the scripts do for your local usage without using any Appveyor specific feature other than the bare metal Windows 10 machine.
  • It builds the posix (SITL) and px4fmu-v4 (to test NuttX build) targets with a complete execution time of ~13 min. Other tests can be added in the future.
  • The installer itself uses ~3.5 min but has to be executed everytime because the free build cache is 1GB which the complete toolchain folder exceeds. Also I'm not if the Appveyor cache extracting of that many files would be actually any faster.

Conclusion:
I suggest to enable this CI even if we might find any better solution. As stated the process itself is not dependend on Appveyor and the gained experience setting this up could be used on any CI automated Windows machine e.g. a jenkins slave. I'm happy to look into that later on if I get some support to integrate it with ci.px4.io.

The output of the successful build of this pr (and hence currently latest master) is available here: https://ci.appveyor.com/project/MaEtUgR/firmware-b5mk6/build/25

closes #10002

@dagar
Copy link
Member

dagar commented Jul 26, 2018

This looks great so far.

Any ideas for getting the installer size down (overall build time)? Does appveyor already have some of these packages that we could use?

Copy link
Contributor

@julianoes julianoes left a comment

Choose a reason for hiding this comment

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

Nicely documented!

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jul 26, 2018

@dagar Thanks
I optimized the installer size now (compared to 0.2) and it's quite at the limit with 496MB if you want to build autopilot posix and nuttx and run jmavsim simulation without additional downloads or cutting parts of packages out in an unsupported way. You can even build the DronecodeSDK on it. I think that's actually a good size given you can use the installer on any bare metal Windows. No PX4 Toolchain for Windows ever was that small even with less functionality.

Appveyor has Cygwin but:

  1. As you wrote here we want to test what the developer downloads from our documentation page.
  2. I spent enough time to make Appveyor to do what I want. I would see me potentially adjusting a lot of stuff just to make the whole build completely Appveyor dependent instead of just adding a slave to the existing nice PX4 CI setup which will anyways have the newest toolchain readily installed on the SSD all the time and will very likely have a lot less build time.

@julianoes Thanks

@LorenzMeier LorenzMeier merged commit 83c0888 into PX4:master Jul 26, 2018
@MaEtUgR MaEtUgR deleted the pr-cygwin-ci branch July 27, 2018 05:18
@MaEtUgR MaEtUgR mentioned this pull request Jul 27, 2018
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.

Windows CI: Appveyor based SITL build using Cygwin Toolchain
4 participants