1 / 19

CODEINE

CODEINE. Frederic Hoguin / Andrzej Dworak / Miguel Hermo Serans / Joel Lauener BE-CO TM 28 th March 2019. Agenda. Current BE-CO C++ tooling What is Codeine How to use it Under the hood Current status A look at the future. Current BE-CO C++ tooling.

pagel
Download Presentation

CODEINE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CODEINE Frederic Hoguin / Andrzej Dworak / Miguel Hermo Serans / Joel Lauener BE-CO TM 28th March 2019

  2. Agenda • Current BE-CO C++ tooling • What is Codeine • How to use it • Under the hood • Current status • A look at the future

  3. Current BE-CO C++ tooling • Current build system uses Make.generic which is based on Make.common (originally the makefile for LynxOS FECs) SVN Make.common NFS (/acc/local) Make.generic User’s project Source files Makefile Makefile.dep

  4. Typical C++ product layout + src |--+ project-product | |--+ <source files> | + test | |--+ <source files> + Makefile + Makefile.dep + build | + bin | |--+ CPU + test | + bin | |--+ CPU Input (provided by the user) Output (generated by Make.generic)

  5. What’s wrong with Make.generic? • Using Makefile for building is fine • But we use it for EVERYTHING: • Release process (SVN tagging, NFS copy) • Dependency resolution (Makefile.dep) • Testing, static analysis, etc… • Product meta information is scattered in make variables • Little to no control over user made variables/target • Products depend on specific versions of Make.generic • The current system is hard to control, evolve and maintain • This is a pain to work with…

  6. “Codeine is typically used to treat mild to moderate degrees of pain.”

  7. What is Codeine • Codeine is NOT a drug • Codeine is NOT a build system • It is a command line tool that ease developer’s life • It is a front-end to other tools: • Build System • Repository Manager • Artifact Manager • It uses a well defined format to store product’s meta information • It is non-intrusive and can live together with Make.generic or any other in-place build system

  8. Why do it now? • C++ products have to be migrated to GIT • We need to support GIT release • Make.generic would need to be modified • Add support for GIT release • Keep support of old SVN release • Add a new make variable to choose the type of release • Developing Codeine now is a good opportunity to not do this twice

  9. How to use Codeine? usage: codeine command [parameters] commands: * clean * compile * configure * help * new-project * release * test • Usage: • Few invocation examples: $ codeine new-project –project my_project-p my_product $ codeine compile –target L867

  10. Want to give it a try? • “codeine” has a system command is not yet available • But you can try it using the full path to the binary: $ /acc/local/L867/accsoft/accsoft-codeine/PRO/bin/codeine

  11. The meta-information (product.xml) • “Compatible” with Java’s product.xml <?xml version="1.0" encoding="UTF-8"?> <products buildSystemType="makefile" repositoryType="svn"> <product name="my_product" project="my_project" version="1.0.0" type="lib"> <description>Project description</description> <repository path="test_project/test_project-test_lib-cpp"/> <targets> <target name="L866"/> <target name="L867"/> </targets> </product> </products>

  12. Migrating to Codeine • Create a product.xml with the new-project command • Content of Makefile must either go into: • product.xml: Meta-information (project/product name, version, etc…) • Makefile.user: Specific targets/variables • The src directory stays as it is, Codeine use the same structure • Currently Codeine as nothing for dependency management • Makefile.depis still used to store dependencies • No changes at all • Dependency management will be implemented later

  13. Under the hood • Codeine is written in C++ 11 (ish) • It has very little dependencies • accsoft-commons-utils • Functional tests are written in Python • Why not write Codeine itself in Python? • Eat your own food • Improve usability of the tool • Make sure Codeine is available on all its supported platforms • Codeine is a system tool and should depend solely on the OS, and the tools it integrates

  14. A simple architecture ArtifactManager N BuildSystem Codeine CLI RepositoryManager 1 1 N Command

  15. NFS ArtifactManager Make.generic SVN N BuildSystem Codeine CLI RepositoryManager 1 1 N test Command release compile

  16. Current status • Codeine version 0.1.0 is released • It has been released with… Codeine! • It supports the current BE-CO C++ tooling: • Can build binaries, libraries and/or test suites using Make.generic • Can release product in SVN + NFS • SVN projects can already be migrated to Codeine

  17. A look at the future • Milestone 1 (April 2019): GIT migration • Add GIT support (it is just about creating a new RepositoryManager!) • Add a command to migrate Make.generic products to Codeine • Milestone 2 (Q3/Q4 2019): Dependency management • Extend product.xml to support dependencies specification • Investigation of CMake, conan.io, pkg-config • Eradication of Makefile.dep and Makefile.user • 2020 onwards: Icing on the cake • Integration with ABI checker and static analysis tools • Add support for shared libraries • Integration with CMake, BE-CO deploy script, RPMs..

  18. NFS conan RPM ArtifactManager CMake Make.generic SVN GIT N RepositoryManager BuildSystem Codeine CLI 1 1 N test Command release compile

  19. Thank you!

More Related