Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dovyski/setup-opencv-action
Github Action to download and setup OpenCV
https://github.com/dovyski/setup-opencv-action
ci computer-vision github-action github-actions opencv opencv-library
Last synced: about 1 month ago
JSON representation
Github Action to download and setup OpenCV
- Host: GitHub
- URL: https://github.com/dovyski/setup-opencv-action
- Owner: Dovyski
- License: mit
- Created: 2020-05-25T19:02:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T05:47:29.000Z (over 1 year ago)
- Last Synced: 2024-10-15T13:35:07.026Z (about 1 month ago)
- Topics: ci, computer-vision, github-action, github-actions, opencv, opencv-library
- Language: JavaScript
- Homepage:
- Size: 608 KB
- Stars: 25
- Watchers: 4
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Setup OpenCV
This action downloads, compiles and installs OpenCV. You can choose the version to be installed, as well as how the build/install should occour. If you just want OpenCV installed and ready for use in your Github Actions, this is for you.
Check out the [`.github/workflows/basic.yml`](https://github.com/Dovyski/setup-opencv-action/blob/master/.github/workflows/basic.yml) file to see this action working.
> **NOTICE:** this action was created to support CI testings of [cvui](https://github.com/Dovyski/cvui), a GUI library for OpenCV.
## Inputs
| Name | Description | Default value |
|---|---|---|
| `opencv-verion` | OpenCV version to be installed. | - |
| `opencv-extra-modules` | If [opencv-contrib](https://github.com/opencv/opencv_contrib) (extra modules) should be included in the instalation. | `true` |
| `install-deps` | If dependencies should be installed as well, e.g. libs, cmake, etc. | `true` |
| `CMAKE_BUILD_TYPE` | | `RELEASE` |
| `CMAKE_CXX_COMPILER` | | `g++` |
| `CMAKE_INSTALL_PREFIX` | | `/usr/local` |
| `WITH_TBB` | | `ON` |
| `WITH_IPP` | | `ON` |
| `BUILD_NEW_PYTHON_SUPPORT` | | `OFF` |
| `WITH_V4L` | | `OFF` |
| `ENABLE_PRECOMPILED_HEADERS` | | `ON` |
| `INSTALL_C_EXAMPLES` | | `OFF` |
| `INSTALL_PYTHON_EXAMPLES` | | `OFF` |
| `BUILD_EXAMPLES` | | `OFF` |
| `WITH_QT` | | `OFF` |
| `WITH_OPENGL` | | `OFF` |
| `GENERATE_PKGCONFIG` | | `OFF` |## Usage
See [action.yml](action.yml)
Basic:
```yaml
steps:
- uses: actions/checkout@v2
- uses: Dovyski/[email protected]
with:
opencv-version: '4.0.0'
```Custom build and install:
```yaml
steps:
- uses: actions/checkout@v2
- uses: Dovyski/[email protected]
with:
opencv-version: 4.0.0
ENABLE_PRECOMPILED_HEADERS: OFF
INSTALL_C_EXAMPLES: ON
BUILD_EXAMPLES: ON
```Install development version (master branch, not released yet):
```yaml
steps:
- uses: actions/checkout@v2
- uses: Dovyski/[email protected]
with:
opencv-version: master
```Matrix testing:
```yaml
jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
opencv: [ '3.4.0', '4.0.0', '4.1.0' ]
name: OpenCV ${{ matrix.opencv }}
steps:
- uses: actions/checkout@v2
- name: Setup opencv
uses: Dovyski/[email protected]
with:
opencv-version: ${{ matrix.opencv }}
```