|
| 1 | +name: Fedora (RHEL), Python 3.9 |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + pull_request: |
| 5 | + paths-ignore: |
| 6 | + - '**/docs/**' |
| 7 | + - 'docs/**' |
| 8 | + - '**/**.md' |
| 9 | + - '**.md' |
| 10 | + - '**/layer_tests_summary/**' |
| 11 | + - '**/conformance/**' |
| 12 | + push: |
| 13 | + paths-ignore: |
| 14 | + - '**/docs/**' |
| 15 | + - 'docs/**' |
| 16 | + - '**/**.md' |
| 17 | + - '**.md' |
| 18 | + - '**/layer_tests_summary/**' |
| 19 | + - '**/conformance/**' |
| 20 | + branches: |
| 21 | + - master |
| 22 | + - 'releases/**' |
| 23 | + |
| 24 | +concurrency: |
| 25 | + # github.ref is not unique in post-commit |
| 26 | + group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-fedora33 |
| 27 | + cancel-in-progress: true |
| 28 | + |
| 29 | +jobs: |
| 30 | + Build: |
| 31 | + defaults: |
| 32 | + run: |
| 33 | + shell: bash |
| 34 | + runs-on: aks-linux-16-cores |
| 35 | + container: |
| 36 | + image: fedora:33 |
| 37 | + volumes: |
| 38 | + - /mount/caches:/mount/caches |
| 39 | + env: |
| 40 | + CMAKE_BUILD_TYPE: 'Release' |
| 41 | + CMAKE_GENERATOR: 'Ninja' |
| 42 | + CMAKE_CXX_COMPILER_LAUNCHER: ccache |
| 43 | + CMAKE_C_COMPILER_LAUNCHER: ccache |
| 44 | + GITHUB_WORKSPACE: '/__w/openvino/openvino' |
| 45 | + OPENVINO_REPO: /__w/openvino/openvino/openvino |
| 46 | + INSTALL_DIR: /__w/openvino/openvino/openvino_install |
| 47 | + INSTALL_TEST_DIR: /__w/openvino/openvino/tests_install |
| 48 | + BUILD_DIR: /__w/openvino/openvino/openvino_build |
| 49 | + CCACHE_DIR: /mount/caches/ccache/fedora33_x86_64_Release |
| 50 | + CCACHE_TEMPDIR: /__w/openvino/openvino/ccache_temp |
| 51 | + CCACHE_MAXSIZE: 50G |
| 52 | + steps: |
| 53 | + - name: Install git |
| 54 | + run: yum update -y && yum install -y git |
| 55 | + |
| 56 | + - name: Clone OpenVINO |
| 57 | + uses: actions/checkout@v4 |
| 58 | + with: |
| 59 | + path: ${{ env.OPENVINO_REPO }} |
| 60 | + submodules: 'true' |
| 61 | + |
| 62 | + # |
| 63 | + # Dependencies |
| 64 | + # |
| 65 | + |
| 66 | + - name: Install build dependencies |
| 67 | + run: bash ${OPENVINO_REPO}/install_build_dependencies.sh |
| 68 | + |
| 69 | + - name: Install python dependencies |
| 70 | + run: | |
| 71 | + python3 -m pip install -U pip |
| 72 | + # For Python API: build and wheel packaging |
| 73 | + python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt |
| 74 | + python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt |
| 75 | +
|
| 76 | + # For running ONNX frontend unit tests |
| 77 | + python3 -m pip install --force-reinstall -r ${OPENVINO_REPO}/src/frontends/onnx/tests/requirements.txt |
| 78 | +
|
| 79 | + # For running TensorFlow frontend unit tests |
| 80 | + python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/tensorflow/tests/requirements.txt |
| 81 | +
|
| 82 | + # For running TensorFlow Lite frontend unit tests |
| 83 | + python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/tensorflow_lite/tests/requirements.txt |
| 84 | +
|
| 85 | + # For running Paddle frontend unit tests |
| 86 | + python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/paddle/tests/requirements.txt |
| 87 | +
|
| 88 | + # |
| 89 | + # Build |
| 90 | + # |
| 91 | + |
| 92 | + - name: CMake configure - OpenVINO |
| 93 | + run: | |
| 94 | + cmake \ |
| 95 | + -G "${{ env.CMAKE_GENERATOR }}" \ |
| 96 | + -DENABLE_CPPLINT=OFF \ |
| 97 | + -DENABLE_NCC_STYLE=OFF \ |
| 98 | + -DENABLE_TESTS=ON \ |
| 99 | + -DENABLE_STRICT_DEPENDENCIES=OFF \ |
| 100 | + -DENABLE_SYSTEM_TBB=ON \ |
| 101 | + -DENABLE_SYSTEM_OPENCL=ON \ |
| 102 | + -DENABLE_SYSTEM_PUGIXML=ON \ |
| 103 | + -DENABLE_PYTHON_PACKAGING=ON \ |
| 104 | + -DCPACK_GENERATOR=TGZ \ |
| 105 | + -DCMAKE_COMPILE_WARNING_AS_ERROR=ON \ |
| 106 | + -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \ |
| 107 | + -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \ |
| 108 | + -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \ |
| 109 | + -S ${OPENVINO_REPO} \ |
| 110 | + -B ${BUILD_DIR} |
| 111 | +
|
| 112 | + - name: Cmake build - OpenVINO |
| 113 | + run: cmake --build ${BUILD_DIR} --parallel --verbose |
| 114 | + |
| 115 | + - name: Show ccache stats |
| 116 | + run: ccache --show-stats |
| 117 | + |
| 118 | + - name: Cmake install - OpenVINO |
| 119 | + run: | |
| 120 | + cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake |
| 121 | + cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_TEST_DIR} -DCOMPONENT=tests -P ${BUILD_DIR}/cmake_install.cmake |
| 122 | + cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCOMPONENT=python_wheels -P ${BUILD_DIR}/cmake_install.cmake |
| 123 | +
|
| 124 | + - name: Pack Artifacts |
| 125 | + run: | |
| 126 | + pushd ${INSTALL_DIR} |
| 127 | + tar -czvf ${BUILD_DIR}/openvino_package.tar.gz * |
| 128 | + popd |
| 129 | +
|
| 130 | + pushd ${INSTALL_TEST_DIR} |
| 131 | + tar -czvf ${BUILD_DIR}/openvino_tests.tar.gz * |
| 132 | + popd |
| 133 | +
|
| 134 | + - name: Build RPM packages |
| 135 | + run: | |
| 136 | + cmake -DCPACK_GENERATOR=RPM \ |
| 137 | + -DENABLE_TESTS=OFF \ |
| 138 | + ${BUILD_DIR} |
| 139 | + cmake --build ${BUILD_DIR} --parallel --target package --verbose |
| 140 | +
|
| 141 | + # |
| 142 | + # Upload build artifacts |
| 143 | + # |
| 144 | + |
| 145 | + - name: Upload openvino package |
| 146 | + if: ${{ always() }} |
| 147 | + uses: actions/upload-artifact@v3 |
| 148 | + with: |
| 149 | + name: openvino_package |
| 150 | + path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz |
| 151 | + if-no-files-found: 'error' |
| 152 | + |
| 153 | + - name: Upload openvino RPM packages |
| 154 | + if: ${{ always() }} |
| 155 | + uses: actions/upload-artifact@v3 |
| 156 | + with: |
| 157 | + name: openvino_rpm_packages |
| 158 | + path: ${{ env.BUILD_DIR }}/*.rpm |
| 159 | + if-no-files-found: 'error' |
| 160 | + |
| 161 | + - name: Upload openvino tests package |
| 162 | + if: ${{ always() }} |
| 163 | + uses: actions/upload-artifact@v3 |
| 164 | + with: |
| 165 | + name: openvino_tests |
| 166 | + path: ${{ env.BUILD_DIR }}/openvino_tests.tar.gz |
| 167 | + if-no-files-found: 'error' |
| 168 | + |
| 169 | + RPM_Packages: |
| 170 | + needs: Build |
| 171 | + defaults: |
| 172 | + run: |
| 173 | + shell: bash |
| 174 | + runs-on: ubuntu-20.04 |
| 175 | + container: |
| 176 | + image: fedora:33 |
| 177 | + env: |
| 178 | + RPM_PACKAGES_DIR: /__w/openvino/packages/ |
| 179 | + |
| 180 | + steps: |
| 181 | + - name: Create Directories |
| 182 | + run: mkdir -p ${RPM_PACKAGES_DIR} |
| 183 | + |
| 184 | + - name: Download OpenVINO RPM packages |
| 185 | + uses: actions/download-artifact@v3 |
| 186 | + with: |
| 187 | + name: openvino_rpm_packages |
| 188 | + path: ${{ env.RPM_PACKAGES_DIR }} |
| 189 | + |
| 190 | + - name: Install RPM packages & check conflicts |
| 191 | + run: | |
| 192 | + tee > /tmp/openvino-2023.repo << EOF |
| 193 | + [OpenVINO] |
| 194 | + name=Intel(R) Distribution of OpenVINO 2023 |
| 195 | + baseurl=https://yum.repos.intel.com/openvino/2023 |
| 196 | + enabled=1 |
| 197 | + gpgcheck=1 |
| 198 | + repo_gpgcheck=1 |
| 199 | + gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB |
| 200 | + EOF |
| 201 | +
|
| 202 | + # install previous release version |
| 203 | + mv /tmp/openvino-2023.repo /etc/yum.repos.d |
| 204 | + yum install -y openvino |
| 205 | +
|
| 206 | + # install current version |
| 207 | + yum install --allowerasing -y *.rpm |
| 208 | + working-directory: ${{ env.RPM_PACKAGES_DIR }} |
| 209 | + |
| 210 | + - name: Test RPM packages |
| 211 | + run: | |
| 212 | + /usr/share/openvino/samples/cpp/build_samples.sh |
| 213 | + /usr/share/openvino/samples/c/build_samples.sh |
| 214 | + ~/openvino_cpp_samples_build/intel64/Release/hello_query_device |
| 215 | + python3 /usr/share/openvino/samples/python/hello_query_device/hello_query_device.py |
| 216 | + python3 -c 'from openvino import Core; Core().get_property("CPU", "AVAILABLE_DEVICES")' |
| 217 | + python3 -c 'from openvino import Core; Core().get_property("GPU", "AVAILABLE_DEVICES")' |
| 218 | + python3 -c 'from openvino import Core; Core().get_property("AUTO", "SUPPORTED_METRICS")' |
| 219 | + python3 -c 'from openvino import Core; Core().get_property("MULTI", "SUPPORTED_METRICS")' |
| 220 | + python3 -c 'from openvino import Core; Core().get_property("HETERO", "SUPPORTED_METRICS")' |
| 221 | + python3 -c 'from openvino import Core; Core().get_property("BATCH", "SUPPORTED_METRICS")' |
| 222 | + python3 -c 'from openvino.frontend import FrontEndManager; assert len(FrontEndManager().get_available_front_ends()) == 6' |
| 223 | + benchmark_app --help |
| 224 | + ovc --help |
0 commit comments