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

Add github cache actions for build dependencies #614

Open
pnoltes opened this issue Aug 14, 2023 · 2 comments
Open

Add github cache actions for build dependencies #614

pnoltes opened this issue Aug 14, 2023 · 2 comments
Labels
build/environment Categorizes an issue or PR relevant to the build environment. good first issue Denotes an issue ready for a new contributor kind/wish Categorizes issue or PR as a wish.

Comments

@pnoltes
Copy link
Contributor

pnoltes commented Aug 14, 2023

Add github cache actions for build dependencies

Add github cache actions to speed up build and possible test times when pushing changes to Apache Celix.

Background

Workflow runs often reuse the same outputs or downloaded dependencies from one run to another. For example, package and dependency management tools such as Maven, Gradle, npm, and Yarn keep a local cache of downloaded dependencies.

Jobs on GitHub-hosted runners start in a clean runner image and must download dependencies each time, causing increased network utilization, longer runtime, and increased cost. To help speed up the time it takes to recreate files like dependencies, GitHub can cache files you frequently use in workflows.

To cache dependencies for a job, you can use GitHub's cache action. The action creates and restores a cache identified by a unique key. Alternatively, if you are caching the package managers listed below, using their respective setup-* actions requires minimal configuration and will create and restore dependency caches for you.

Source: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows

Implementation hints

Try to add cache actions for the following build results:

Maybe there is already some existing actions for this and if not try to store and recover the apt, brew and conan cache dirs.

@pnoltes pnoltes added build/environment Categorizes an issue or PR relevant to the build environment. good first issue Denotes an issue ready for a new contributor kind/wish Categorizes issue or PR as a wish. labels Aug 14, 2023
@rlenferink
Copy link
Member

Next to caching, could it maybe help to offer a apache/celix-build container image where all the dependencies are already preinstalled? This can be used during the CI build of Celix (where dependencies are not re-installed every build and can potentially also be used by current and new developers working on Celix ?

@pnoltes
Copy link
Contributor Author

pnoltes commented Aug 24, 2023

Next to caching, could it maybe help to offer a apache/celix-build container image where all the dependencies are already preinstalled? This can be used during the CI build of Celix (where dependencies are not re-installed every build and can potentially also be used by current and new developers working on Celix ?

That is an interesting idea. I believe this is very doable and there might be some overlap with adding Gitpod support (also based on building in a container image). One of the image layers could be the installation of Conan Celix dependencies. I also expect (note assumption) that caching an image is well-supported and documented.

That being said, I would also like to retain the build on Ubuntu and MacOS systems. In my opinion, this demonstrates and proves that Apache Celix is usable on those systems. In other words, +1 for adding a celix-build image and using that in our CI, but in my opinion, this should be complementary to the already existing Ubuntu and MacOS builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/environment Categorizes an issue or PR relevant to the build environment. good first issue Denotes an issue ready for a new contributor kind/wish Categorizes issue or PR as a wish.
Projects
None yet
Development

No branches or pull requests

2 participants