thin-edge / meta-tedge

OpenEmbedded/Yocto layer for thin-edge.io
Apache License 2.0
9 stars 2 forks source link

Add github action builds #10

Closed Ruadhri17 closed 5 months ago

Ruadhri17 commented 2 years ago

Add github action build that test if layer compiles and works as intended.

Bravo555 commented 1 year ago

To add Github Action builds, I think I'd be necessary to research the following:

  1. What CI processes are the other layer repositories using, if they do at all, the ones hosted on Github as well as elsewhere. Examples: poky, meta-openembedded, meta-rust, meta-rust-bin.
  2. How to handle the space and compute requirements of building thin-edge in a Yocto environment. Proposed solutions are:
    1. build only the required package (thin-edge)
    2. cache the dependencies (build output of rust, cargo, and others)
    3. use meta-rust-bin to sidestep building of Rust completely
Ruadhri17 commented 1 year ago

On Yocto Project summit from May 2022, There was a presentation on using Github Actions in Yocto layers. Here is link to the video and theirs solution. I think we can create something similar. I noticed that if the dependencies are cached, next builds will be much faster. However, it will require some space and I don't know if we are allowed to use so much.

Ruadhri17 commented 1 year ago

I have prepared exemplary workflow for building Yocto that is available in my forked repository. It seems to work properly, however due to a disc space limit for basic GitHub plan I cannot finish the build. I think we don't want to use paid options so the only solution is self-hosted runner. I have seen some combinations in other layers that use docker containers on self-hosted runners to build several distros on different architectures. Then we could also load thin-edge tests and run them after successful builds.

reubenmiller commented 6 months ago

Builds will be covered by the meta-tedge-project repository: https://github.com/thin-edge/meta-tedge-project/actions.

A dedicated github runner will be used due to the builds taking such as long time (and requiring a large cache)

reubenmiller commented 5 months ago

The meta-tedge-project github actions are in place and build projects which use this layer now.