-
Notifications
You must be signed in to change notification settings - Fork 2
74 lines (56 loc) · 1.88 KB
/
builld.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build
on:
push:
branches:
- main
pull_request:
env:
OPENCV_VERSION: "4.9.0"
jobs:
build-windows:
runs-on: windows-latest
env:
OPENCV_LINK_LIBS: "opencv_world490"
OPENCV_LINK_PATHS: "C:/tools/opencv/build/x64/vc16/lib,C:/tools/opencv/build/x64/vc15/lib"
OPENCV_INCLUDE_PATHS: "C:/tools/opencv/build/include"
steps:
- uses: actions/checkout@v4
- name: Setup OpenCV and LLVM
run: choco install opencv llvm
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Run check on Windows
run: cargo check --features=cli --bins
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup OpenCV and LLVM
run: brew install opencv llvm
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Run check on macOS
run: |
echo "setting DYLD_FALLBACK_LIBRARY_PATH to $(xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/lib/"
export DYLD_FALLBACK_LIBRARY_PATH="$(xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/lib/"
cargo check --features=cli,metal --bins
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup OpenCV for Ubuntu
run: |
sudo apt update -y
sudo apt install -y libopencv-dev clang libclang-dev
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Run check on Ubuntu
run: cargo check --features=cli --bin surya
- name: Run fmt check
run: cargo fmt --all --check
- name: Run clippy
run: cargo clippy --features=cli --bin surya --lib
- name: Run unit tests
run: cargo test --features=cli --bin surya --lib
- name: Test run surya
run: cargo run --features=cli --bin surya -- --help