Code Monkey home page Code Monkey logo

ci-build-template's Introduction

ci-build-template


⚠️ REPOSITORY UNDER DEVELOPMENT ⚠️


Template for build workflows.

The template provides with features described below:

Caching conda-based and source dependencies

The example workflows make use of the different strategies to manage the cache.

  1. Conda-based dependencies are managed via a .yml file, whose hashcode is used as part of the cache key. In this way, whenever some dependency changes, the cache key changes and it is not restored.

  2. Source-compiled dependencies are managed via a .yml and a .meta file that list all of the desired tags/commits and build configurations. As per the previous point, whenever these file change, the related cache is not restored. In the example case, the related cache is also not restored if the conda-based one is invalidated since the result would be inconsistent.

  3. Use of the date as part of the key allows for invalidating the caches based on a fixed period. In the example case, the cache is invalidated every day. If someone wants to save some minutes, they just need to override the step which sets the corresponding variable.

  4. Environment variables to explicitly restore and save cache.

Configurable build system for source-installed dependencies

We use the following tools for the versioning and compiling of the source-installed dependencies:

  • vcstool lets you specify the list of repositories with the related tag using a .yml configuration file.
  • colcon allows you to build sets of packages and to specify build configurations via a dedicated .meta file.

⚠️ These tools are installed via conda. If you don't want to use conda in your workflows, you will need to install them in some other way.

Cross-OS configure step

Making use of ilammy/msvc-dev-cmd action we setup some variables that allows for having a single os-independent CMake configuration step using the default compilers of the ubuntu, macos and windows runners.

The used generator is Ninja

Show cache and log on error

If the libraries from source build fails, the colcon log is printed out. If the build step fails, the CMake cache and log and printed out, along with the directory tree.

All the information above are also saved as artifacts

ci-build-template's People

Contributors

riccardogrieco avatar

Stargazers

Nicola Piga avatar Baljinder Singh Bal avatar Giulio Romualdi avatar Silvio Traversaro avatar

Watchers

Silvio Traversaro avatar  avatar

ci-build-template's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.