|
51 | 51 | github_token: ${{ secrets.GITHUB_TOKEN}} |
52 | 52 | # missingInclude: cppcheck can't find stl, openvino, opencv |
53 | 53 | other_options: --suppress=missingInclude -Isrc/cpp/models/include -Isrc/cpp/utils/include -Isrc/cpp/pipelines/include --check-config |
| 54 | + CPP-Precommit: |
| 55 | + runs-on: ubuntu-22.04 |
| 56 | + steps: |
| 57 | + - uses: actions/checkout@v3 |
| 58 | + - uses: actions/setup-python@v4 |
| 59 | + with: |
| 60 | + python-version: "3.10" |
| 61 | + cache: pip |
| 62 | + - name: Create and start a virtual environment |
| 63 | + run: | |
| 64 | + python -m venv venv |
| 65 | + source venv/bin/activate |
| 66 | + - name: Install dependencies |
| 67 | + run: | |
| 68 | + source venv/bin/activate |
| 69 | + python -m pip install --upgrade pip |
| 70 | + pip install src/python/[tests,build] --extra-index-url https://download.pytorch.org/whl/cpu |
| 71 | +
|
| 72 | + sudo bash src/cpp/install_dependencies.sh |
| 73 | + - name: Prepare test data |
| 74 | + run: | |
| 75 | + source venv/bin/activate |
| 76 | + python tests/cpp/precommit/prepare_data.py -d data -p tests/cpp/precommit/public_scope.json |
| 77 | + - name: Build |
| 78 | + run: | |
| 79 | + mkdir build && cd build |
| 80 | + pip install nanobind==2.4.0 |
| 81 | + pip install typing_extensions==4.12.2 |
| 82 | + cmake ../tests/cpp/precommit/ |
| 83 | + cmake --build . -j $((`nproc`*2+2)) |
| 84 | + - name: Run test |
| 85 | + run: | |
| 86 | + build/test_sanity -d data -p tests/cpp/precommit/public_scope.json && build/test_model_config -d data |
| 87 | + CPP-Windows-Precommit: |
| 88 | + runs-on: windows-latest |
| 89 | + steps: |
| 90 | + - uses: actions/checkout@v3 |
| 91 | + - uses: actions/setup-python@v4 |
| 92 | + with: |
| 93 | + python-version: 3.9 |
| 94 | + cache: pip |
| 95 | + - name: Create and start a virtual environment |
| 96 | + shell: bash |
| 97 | + run: | |
| 98 | + python -m venv venv |
| 99 | + source venv/Scripts/activate |
| 100 | + - name: Install dependencies |
| 101 | + shell: bash |
| 102 | + run: | |
| 103 | + source venv/Scripts/activate |
| 104 | + python -m pip install --upgrade pip |
| 105 | + pip install src/python/[tests,build] --extra-index-url https://download.pytorch.org/whl/cpu |
| 106 | + curl https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.6/windows/w_openvino_toolkit_windows_2024.6.0.17404.4c0f47d2335_x86_64.zip --output w_openvino_toolkit_windows.zip |
| 107 | + unzip w_openvino_toolkit_windows.zip |
| 108 | + rm w_openvino_toolkit_windows.zip |
| 109 | + curl -L https://github.com/opencv/opencv/releases/download/4.10.0/opencv-4.10.0-windows.exe --output opencv-4.10.0-windows.exe |
| 110 | + ./opencv-4.10.0-windows.exe -oopencv -y |
| 111 | + rm opencv-4.10.0-windows.exe |
| 112 | + - name: Prepare test data |
| 113 | + shell: bash |
| 114 | + run: | |
| 115 | + source venv/Scripts/activate |
| 116 | + python tests/cpp/precommit/prepare_data.py -d data -p tests/cpp/precommit/public_scope.json |
| 117 | + - name: Build |
| 118 | + shell: bash |
| 119 | + run: | |
| 120 | + mkdir build && cd build |
| 121 | + MSYS_NO_PATHCONV=1 cmake ../examples/cpp/ -DOpenVINO_DIR=$GITHUB_WORKSPACE/w_openvino_toolkit_windows_2024.6.0.17404.4c0f47d2335_x86_64/runtime/cmake -DOpenCV_DIR=$GITHUB_WORKSPACE/opencv/opencv/build -DCMAKE_CXX_FLAGS=/WX |
| 122 | + cmake --build . --config Release -j $((`nproc`*2+2)) |
| 123 | + - name: Run sync sample |
| 124 | + shell: cmd |
| 125 | + # .\w_openvino_toolkit_windows_2023.0.0.10926.b4452d56304_x86_64\setupvars.bat exits with 0 code without moving to a next command. Set PATH manually |
| 126 | + run: | |
| 127 | + set PATH=opencv\opencv\build\x64\vc16\bin;w_openvino_toolkit_windows_2024.6.0.17404.4c0f47d2335_x86_64\runtime\bin\intel64\Release;w_openvino_toolkit_windows_2024.6.0.17404.4c0f47d2335_x86_64\runtime\3rdparty\tbb\bin;%PATH% |
| 128 | + .\build\Release\synchronous_api.exe .\data\otx_models\detection_model_with_xai_head.xml .\data\BloodImage_00007.jpg |
54 | 129 | serving_api: |
55 | 130 | strategy: |
56 | 131 | fail-fast: false |
|
0 commit comments