apache / apache/celix

Add github cache actions for build dependencies

Open
#614 2 comments 1 reaction 0 assignees View on GitHub
build/environment good first issue kind/wish
Dominant language
C
Stars
193
Forks
99
Avg merge
1m
Merged PRs (30d)
1

Description

# 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](https://github.com/actions/cache). 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:

- `apt install` in the Linux ubuntu builds (https://github.com/apache/celix/blob/master/.github/workflows/ubuntu.yml), this is for the "Configure and install dependencies" step
- `brew install` in the masos builds (https://github.com/apache/celix/blob/master/.github/workflows/macos.yml), this is for the "Install dependencies" step
~~- `conan install` in the Linux ubuntu and coverage builds (https://github.com/apache/celix/blob/master/.github/workflows/ubuntu.yml and https://github.com/apache/celix/blob/master/.github/workflows/coverage.yml), this is for the "Configure and install dependencies" step.~~ Done in #628

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.