opencv build github actions

In my spring boot project, I’m using OpenCV which depends on native c++ library for OpenCV. While development and testing I’ve built those native libs in my system.

Unit test cases related to OpenCV are also supposed to run with every push in a PR.

Building OpenCV takes close to 20 minutes. I’m not sure if running that on every commit is feasible.

Can someone please tell me what is the way to achieve this?

We are using GitHub actions for CI. So all this OpenCV build happens in GitHub provided VM.

Hi @ashishchopra,

Thank you for being here! I see our private support replied and will post their answer here as it might help someone else on a similar project. Thanks again for reaching out!

We don’t currently have a way to cache dependencies, installed software, or files between workflow runs. This means that you would need to build and install this on each workflow run.

The Actions team are working on this though, so I’ll add your +1 to this request.

You may also wish to request this software be installed on the virtual environment by default. You can do this by opening an issue in the following repository:

https://github.com/actions/virtual-environments