10
10
CARGO_TERM_COLOR : always
11
11
12
12
jobs :
13
+ # Build and test the bindings using an existing OpenVINO installation.
14
+ test :
15
+ name : Build and test
16
+ runs-on : ${{ matrix.os }}
17
+ strategy :
18
+ matrix :
19
+ # TODO: macos-latest cannot yet be included in the list because a dependency cannot be
20
+ # found ("dyld: Library not loaded; '@rpath/libopenvino.2310.dylib'"). See
21
+ # https://github.com/abrown/openvino-rs/actions/runs/6423141936/job/17441022932#step:7:154
22
+ os : [ubuntu-20.04, ubuntu-22.04, windows-latest]
23
+ version : [2022.3.0, 2023.0.1, 2023.1.0]
24
+ apt : [false]
25
+ # We also spot-check that things work when installing from APT by adding to the matrix: see
26
+ # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
27
+ include :
28
+ - os : ubuntu-20.04
29
+ version : 2022.3.0
30
+ apt : true
31
+ env :
32
+ RUST_LOG : debug
33
+ RUST_BACKTRACE : 1
34
+ steps :
35
+ - uses : actions/checkout@v2
36
+ with :
37
+ submodules : true
38
+ lfs : true
39
+ - name : Checkout LFS objects
40
+ run : git lfs checkout
41
+ - uses : abrown/install-openvino-action@fe7412dddbed9fbd2243731a8d49f1bc55c2ba20
42
+ with :
43
+ version : ${{ matrix.version }}
44
+ apt : ${{ matrix.apt }}
45
+ - name : List files
46
+ run : find $OPENVINO_INSTALL_DIR
47
+ shell : bash
48
+ # First, check that we can find the OpenVINO libraries; this is a canary to find any library
49
+ # issues early (even if we duplicate some tests). If we run the tests in order, other tests will
50
+ # short-circuit the test run and logging may not be turned on (as it is in the "find a library"
51
+ # tests) for troubleshooting.
52
+ - name : Check openvino-finder
53
+ run : cargo test --package openvino-finder
54
+ # Now, run the dynamic-linking tests: this assumes the OpenVINO library is "findable" on the
55
+ # path and Cargo links the binary to it in the `build.rs` script.
56
+ - name : Check dynamic linking
57
+ run : cargo test
58
+ # TODO: the finder does not yet know how to distinguish between `*.lib` (required here) and
59
+ # `*.dll` (required by runtime-linking).
60
+ if : ${{ !startsWith(runner.os, 'windows') }}
61
+ # Finally, run the runtime-linking tests: the binddings do not link at build time, instead
62
+ # as the tests are run.
63
+ - name : Check runtime linking
64
+ run : cargo test --features openvino-sys/runtime-linking
65
+
13
66
format :
14
67
name : Check code format
15
68
runs-on : ubuntu-latest
@@ -31,52 +84,13 @@ jobs:
31
84
- uses : actions/checkout@v2
32
85
- uses : EmbarkStudios/cargo-deny-action@v1
33
86
34
- # Build and test from an existing OpenVINO installation inside a Docker image (i.e. download the
35
- # binaries, then compile against these).
36
- dynamic_binaries :
37
- name : From binaries
38
- runs-on : ubuntu-latest
39
- strategy :
40
- fail-fast : false
41
- matrix :
42
- os : [ubuntu18, ubuntu20]
43
- version : [2022.1.0, 2022.2.0, 2022.3.0]
44
- steps :
45
- - uses : actions/checkout@v2
46
- with :
47
- submodules : recursive
48
- lfs : true
49
- - name : Checkout LFS objects
50
- run : git lfs checkout
51
- - name : Build the Docker image
52
- run : docker build . --tag openvino-rs:${{ matrix.OS }}-${{ matrix.version }}-$(date +%s) --build-arg OS=${{ matrix.os }} --build-arg VERSION=${{ matrix.version }}
53
-
54
- # Build and test from an existing OpenVINO installation from an archive installed on the
55
- # filesystem.
56
- runtime_binaries :
57
- name : From runtime-linked binaries
58
- runs-on : ubuntu-22.04
59
- steps :
60
- - uses : actions/checkout@v2
61
- with :
62
- submodules : recursive
63
- lfs : true
64
- - name : Checkout LFS objects
65
- run : git lfs checkout
66
- - uses : abrown/install-openvino-action@v6
67
- with :
68
- apt : true
69
- - name : Build and run tests
70
- run : cargo test --features openvino-sys/runtime-linking
71
-
72
- # Check that the documentation builds.
73
87
docs :
74
- name : Documentation
88
+ name : Check documentation
75
89
runs-on : ubuntu-latest
76
90
steps :
77
91
- uses : actions/checkout@v2
78
92
with :
79
- submodules : recursive
93
+ submodules : true
80
94
lfs : true
81
95
- name : Build documentation
82
96
run : cargo doc --no-deps --features openvino-sys/runtime-linking
@@ -85,15 +99,15 @@ jobs:
85
99
# the OpenCV dependency is a bit fragile so the crate is not included by the default workspace
86
100
# commands.
87
101
converter :
88
- name : Converter tool
102
+ name : Check converter tool
89
103
runs-on : ubuntu-20.04
90
104
defaults :
91
105
run :
92
106
working-directory : crates/openvino-tensor-converter
93
107
steps :
94
108
- uses : actions/checkout@v2
95
109
with :
96
- submodules : recursive
110
+ submodules : true
97
111
- name : Install OpenCV
98
112
run : sudo apt update && sudo apt install libclang-dev libopencv-dev libopencv-core4.2
99
113
- name : Build
0 commit comments