Test building with clang against the OpenCV built with clang
MODIFY
.github/workflows/opencv-rust.yml
.github/workflows/opencv-rust.yml
@@ -24,17 +24,28 @@ jobs:
version:
- opencv: 3.4.16
- opencv: 4.5.4
+ compiler:
+ - cc: gcc
+ cxx: g++
+ - cc: clang
+ cxx: clang++
exclude:
- os:
family: osx
version:
opencv: 3.4.16
+ - os:
+ family: osx
+ compiler:
+ cc: gcc
runs-on: ${{ matrix.os.image }}
env:
OS_FAMILY: ${{ matrix.os.family }}
RUST_TOOLCHAIN: ${{ matrix.rust }}
Atlas_ROOT_DIR: /usr/include/ # for cmake to find lapacke.h
OPENCV_VERSION: ${{ matrix.version.opencv }}
+ CC: ${{ matrix.compiler.cc }}
+ CXX: ${{ matrix.compiler.cxx }}
steps:
- uses: actions/checkout@v2
@@ -42,7 +53,7 @@ jobs:
uses: actions/cache@v1
with:
path: ~/build
- key: ${{ runner.os }}-${{ matrix.version.opencv }}-build
+ key: ${{ runner.os }}-${{ matrix.version.opencv }}-${{ matrix.compiler.cc }}-build
- name: Install dependencies
run: ci/install.sh

MODIFY
ci/script.sh
ci/script.sh
@@ -59,8 +59,3 @@ cargo test --release -vv --features clang-runtime
pushd ci/test-proj-clang-runtime
cargo run -vv
popd
-
-export CXX=clang++
-touch build.rs
-cargo test -vv
-cargo test --release -vv

Test building with clang against the OpenCV built with clang