Skip to content

Port hough circle example from OpenCV 4.9.0 #882

Port hough circle example from OpenCV 4.9.0

Port hough circle example from OpenCV 4.9.0 #882

Workflow file for this run

name: opencv-rust
on:
push:
branches:
- "*"
tags_ignore:
- "*"
pull_request:
branches:
- "*"
jobs:
src:
strategy:
fail-fast: false
matrix:
os-image:
- ubuntu-22.04
- macos-12
opencv-version:
- 3.4.20
- 4.9.0
linkage:
- dynamic
include:
- os-image: ubuntu-22.04
opencv-version: 4.9.0
linkage: static
runs-on: ${{ matrix.os-image }}
env:
Atlas_ROOT_DIR: /usr/include/ # for cmake to find lapacke.h
OPENCV_VERSION: ${{ matrix.opencv-version }}
OPENCV_LINKAGE: ${{ matrix.linkage }}
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
CMAKE_C_COMPILER_LAUNCHER: "sccache"
CMAKE_CXX_COMPILER_LAUNCHER: "sccache"
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: mozilla-actions/sccache-action@v0.0.3
- uses: actions/cache@v3
with:
path: ~/dist
key: dist-${{ matrix.opencv-version }}
- uses: actions/cache@v3
with:
path: ~/build
key: build-${{ matrix.opencv-version }}-${{ matrix.linkage }}-${{ matrix.os-image }}
- name: Install dependencies
env:
OS_FAMILY: ${{ runner.os }}
run: ci/install.sh
shell: bash
- name: Test project
env:
OS_FAMILY: ${{ runner.os }}
run: ci/script.sh
shell: bash
vcpkg:
strategy:
fail-fast: false
matrix:
os-image:
- ubuntu-22.04
- windows-2022
vcpkg-version:
- 2023.11.20
runs-on: ${{ matrix.os-image }}
env:
VCPKG_VERSION: ${{ matrix.vcpkg-version }}
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: mozilla-actions/sccache-action@v0.0.3
- uses: actions/cache@v3
with:
path: ~/build
key: vcpkg-${{ matrix.vcpkg-version }}-${{ matrix.os-image }}
- name: Install dependencies
env:
OS_FAMILY: ${{ runner.os }}
run: ci/install.sh
shell: bash
- name: Test project
env:
OS_FAMILY: ${{ runner.os }}
run: ci/script.sh
shell: bash
bin:
strategy:
fail-fast: false
matrix:
os-image:
- macos-12
- windows-2022
version:
- opencv: 3.4.16
brew: "@3"
- opencv: 4.9.0
brew: "@4"
include:
- os-image: ubuntu-22.04
version:
opencv: 4.5.4
- os-image: ubuntu-20.04
version:
opencv: 4.2.0
exclude:
- os-image: macos-12 # brew@3 is broken as of 2023-12-05, requires libceres.3.dylib, but only 2 and 4 are available
version:
brew: "@3"
runs-on: ${{ matrix.os-image }}
env:
OPENCV_VERSION: ${{ matrix.version.opencv }}
BREW_OPENCV_VERSION: ${{ matrix.version.brew }}
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: mozilla-actions/sccache-action@v0.0.3
- name: Install dependencies
env:
OS_FAMILY: ${{ runner.os }}
run: ci/install.sh
shell: bash
- name: Test project
env:
OS_FAMILY: ${{ runner.os }}
run: ci/script.sh
shell: bash
docs-rs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Run a documentation generation test
run: ci/docs-rs.sh
shell: bash
msrv:
runs-on: ubuntu-20.04
env:
OPENCV_VERSION: 4.9.0
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
CMAKE_C_COMPILER_LAUNCHER: "sccache"
CMAKE_CXX_COMPILER_LAUNCHER: "sccache"
steps:
- uses: actions/checkout@v3
- uses: mozilla-actions/sccache-action@v0.0.3
- uses: actions/cache@v3
with:
path: ~/dist
key: dist-${{ env.OPENCV_VERSION }}
- uses: actions/cache@v3
with:
path: ~/build
key: build-${{ env.OPENCV_VERSION }}-ubuntu-20.04
- name: Get MSRV package metadata
id: metadata
run: cargo metadata --no-deps --format-version 1 | jq -r '"msrv="+(.packages[]|select(.name=="opencv").rust_version)' >> $GITHUB_OUTPUT
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.metadata.outputs.msrv }}
- name: Install dependencies
env:
OS_FAMILY: ${{ runner.os }}
run: ci/install.sh
shell: bash
- name: Check project
env:
OS_FAMILY: ${{ runner.os }}
run: ci/msrv.sh
shell: bash