diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 27792b39fb934b..b3d4bbb764c200 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -24,7 +24,7 @@ on: - master concurrency: - group: ${{ github.head_ref || github.run_id }}-linux + group: ${{ github.ref || github.run_id }}-linux cancel-in-progress: true jobs: @@ -32,34 +32,49 @@ jobs: defaults: run: shell: bash - runs-on: ubuntu-20.04-8-cores + runs-on: aks-linux-16-cores + container: + image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04 + volumes: + - /mount/caches:/mount/caches env: + DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input CMAKE_BUILD_TYPE: 'Release' CMAKE_GENERATOR: 'Ninja' CMAKE_CXX_COMPILER_LAUNCHER: ccache CMAKE_C_COMPILER_LAUNCHER: ccache - OPENVINO_REPO: ${{ github.workspace }}/openvino - OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib - INSTALL_DIR: ${{ github.workspace }}/install - INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests - SAMPLES_INSTALL_DIR: ${{ github.workspace }}/install/samples - LAYER_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/layer_tests - MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests - BUILD_DIR: ${{ github.workspace }}/build - OV_TEMP: ${{ github.workspace }}/openvino_temp + GITHUB_WORKSPACE: '/__w/openvino/openvino' + OPENVINO_REPO: /__w/openvino/openvino/openvino + OPENVINO_CONTRIB_REPO: /__w/openvino/openvino/openvino_contrib + INSTALL_DIR: /__w/openvino/openvino/install + INSTALL_TEST_DIR: /__w/openvino/openvino/install/tests + SAMPLES_INSTALL_DIR: /__w/openvino/openvino/install/samples + LAYER_TESTS_INSTALL_DIR: /__w/openvino/openvino/install/tests/layer_tests + MODEL_HUB_TESTS_INSTALL_DIR: /__w/openvino/openvino/install/tests/model_hub_tests + BUILD_DIR: /__w/openvino/openvino/build + OV_TEMP: /__w/openvino/openvino/openvino_temp PYTHON_STATIC_ARGS: -m "not dynamic_library" + CCACHE_DIR: /mount/caches/ccache/ubuntu20_x86_64_Release + CCACHE_TEMPDIR: /__w/openvino/openvino/ccache_temp + CCACHE_MAXSIZE: 50G steps: + - name: Install git + run: | + apt-get update + apt-get install -y git git-lfs + - name: Clone OpenVINO uses: actions/checkout@v4 with: - path: 'openvino' + path: ${{ env.OPENVINO_REPO }} submodules: 'true' - name: Clone OpenVINO Contrib uses: actions/checkout@v4 with: repository: 'openvinotoolkit/openvino_contrib' - path: 'openvino_contrib' + path: ${{ env.OPENVINO_CONTRIB_REPO }} + submodules: 'true' # # Dependencies @@ -67,13 +82,13 @@ jobs: - name: Install build dependencies run: | - sudo -E ${{ env.OPENVINO_REPO }}/install_build_dependencies.sh - sudo -E apt update - sudo -E apt --assume-yes install openjdk-11-jdk libbz2-dev clang unzip libpugixml-dev libtbb-dev intel-opencl-icd ocl-icd-opencl-dev opencl-headers + bash ${OPENVINO_REPO}/install_build_dependencies.sh + apt update + apt --assume-yes install openjdk-11-jdk libbz2-dev clang unzip libpugixml-dev libtbb-dev intel-opencl-icd ocl-icd-opencl-dev opencl-headers wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip unzip ninja-linux.zip - sudo cp -v ninja /usr/local/bin/ + cp -v ninja /usr/local/bin/ - uses: actions/setup-python@v4 with: @@ -84,46 +99,38 @@ jobs: # For Python API python3 -m pip install --upgrade pip python3 -m pip install Scons - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/requirements.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/requirements_test.txt + python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt + python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/requirements.txt + python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/requirements_test.txt # For running Python API tests - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt + python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt # For running ONNX frontend unit tests - python3 -m pip install --force-reinstall -r ${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/requirements.txt + python3 -m pip install --force-reinstall -r ${OPENVINO_REPO}/src/frontends/onnx/tests/requirements.txt # For running TensorFlow frontend unit tests - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/tensorflow/tests/requirements.txt + python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/tensorflow/tests/requirements.txt # For running Paddle frontend unit tests - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/paddle/tests/requirements.txt + python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/paddle/tests/requirements.txt - name: Install MO dependencies run: | - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_mxnet.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_caffe.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_kaldi.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_onnx.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_tf2.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_dev.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_mxnet.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_caffe.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_kaldi.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_onnx.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_tf2.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_dev.txt # # Build # - name: Setup ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - max-size: "2000M" - # Should save cache only if run in the master branch of the base repo - # github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push - save: ${{ github.ref_name == 'master' && 'true' || 'false' }} - verbose: 2 - key: linux-ubuntu - restore-keys: | - linux-ubuntu + run: | + mkdir -p $CCACHE_DIR - name: Get number of CPU cores uses: SimenB/github-actions-cpu-cores@v2 @@ -151,73 +158,73 @@ jobs: -DBUILD_nvidia_plugin=OFF \ -DENABLE_DEBUG_CAPS=ON \ -DCUSTOM_OPERATIONS="calculate_grid;complex_mul;fft;grid_sample;sparse_conv;sparse_conv_transpose" \ - -DOPENVINO_EXTRA_MODULES=${{ env.OPENVINO_CONTRIB_REPO }}/modules \ - -S ${{ env.OPENVINO_REPO }} \ - -B ${{ env.BUILD_DIR }} + -DOPENVINO_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO}/modules \ + -S ${OPENVINO_REPO} \ + -B ${BUILD_DIR} - name: Clean ccache stats run: ccache --zero-stats --show-config - name: Build - run: cmake --build ${{ env.BUILD_DIR }} --parallel ${{ steps.cpu-cores.outputs.count }} --config Release + run: cmake --build ${BUILD_DIR} --parallel ${{ steps.cpu-cores.outputs.count }} --config Release - name: Show ccache stats run: ccache --show-stats - name: Cmake Layer Tests - run: cmake -GNinja -S ${{ env.OPENVINO_REPO }}/tests/layer_tests -B ${{ env.BUILD_DIR }}/layer_tests + run: cmake -GNinja -S ${OPENVINO_REPO}/tests/layer_tests -B ${BUILD_DIR}/layer_tests - name: Cmake Model Hub Tests - run: cmake -GNinja -S ${{ env.OPENVINO_REPO }}/tests/model_hub_tests -B ${{ env.BUILD_DIR }}/model_hub_tests + run: cmake -GNinja -S ${OPENVINO_REPO}/tests/model_hub_tests -B ${BUILD_DIR}/model_hub_tests - name: Build Layer Tests - run: cmake --build ${{ env.BUILD_DIR }}/layer_tests --parallel --config Release + run: cmake --build ${BUILD_DIR}/layer_tests --parallel --config Release - name: Build Model Hub Tests - run: cmake --build ${{ env.BUILD_DIR }}/model_hub_tests --parallel --config Release + run: cmake --build ${BUILD_DIR}/model_hub_tests --parallel --config Release - name: Install wheel packages - run: cmake -DCOMPONENT=python_wheels -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake + run: cmake -DCOMPONENT=python_wheels -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake - name: Install Layer Tests - run: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/layer_tests/cmake_install.cmake + run: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/layer_tests/cmake_install.cmake - name: Install Model Hub Tests - run: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/model_hub_tests/cmake_install.cmake + run: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/model_hub_tests/cmake_install.cmake - name: Install python wheels - run: python3 -m pip install openvino-dev --find-links=${{ env.INSTALL_DIR }}/tools + run: python3 -m pip install openvino-dev --find-links=${INSTALL_DIR}/tools - name: Install tests - run: cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCOMPONENT=tests -P ${{ env.BUILD_DIR }}/cmake_install.cmake + run: cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCOMPONENT=tests -P ${BUILD_DIR}/cmake_install.cmake - name: Install OpenVINO - run: cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake + run: cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake - name: CMake Samples Tests - run: cmake -GNinja -S ${{ env.OPENVINO_REPO }}/tests/samples_tests -B ${{ env.BUILD_DIR }}/samples_tests + run: cmake -GNinja -S ${OPENVINO_REPO}/tests/samples_tests -B ${BUILD_DIR}/samples_tests - name: Build Samples Tests - run: cmake --build ${{ env.BUILD_DIR }}/samples_tests --config Release + run: cmake --build ${BUILD_DIR}/samples_tests --config Release - name: Install Samples Tests - run: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/samples_tests/cmake_install.cmake + run: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/samples_tests/cmake_install.cmake - name: Pack Artifacts run: | - pushd ${{ env.INSTALL_DIR }} - tar -czvf ${{ env.BUILD_DIR }}/openvino_package.tar.gz --exclude=tests * + pushd ${INSTALL_DIR} + tar -czvf ${BUILD_DIR}/openvino_package.tar.gz --exclude=tests * popd - pushd ${{ env.INSTALL_DIR }} - tar -czvf ${{ env.BUILD_DIR }}/openvino_tests.tar.gz tests/ + pushd ${INSTALL_DIR} + tar -czvf ${BUILD_DIR}/openvino_tests.tar.gz tests/ popd - name: Build cpp samples - run: ${{ env.SAMPLES_INSTALL_DIR }}/cpp/build_samples.sh -i ${{ env.INSTALL_DIR }} -b ${{ env.BUILD_DIR }}/cpp_samples + run: ${SAMPLES_INSTALL_DIR}/cpp/build_samples.sh -i ${INSTALL_DIR} -b ${BUILD_DIR}/cpp_samples - name: Build c samples - run: ${{ env.SAMPLES_INSTALL_DIR }}/c/build_samples.sh -i ${{ env.INSTALL_DIR }} -b ${{ env.BUILD_DIR }}/c_samples + run: ${SAMPLES_INSTALL_DIR}/c/build_samples.sh -i ${INSTALL_DIR} -b ${BUILD_DIR}/c_samples # # Tests @@ -225,26 +232,26 @@ jobs: - name: Samples tests run: | - python3 -m pip install --ignore-installed PyYAML -r ${{ env.INSTALL_TEST_DIR }}/smoke_tests/requirements.txt - export LD_LIBRARY_PATH=${{ env.IE_APP_PATH }}:$LD_LIBRARY_PATH + export WORKSPACE=${INSTALL_DIR} + export IE_APP_PATH=${INSTALL_DIR}/samples_bin + export IE_APP_PYTHON_PATH=${INSTALL_DIR}/samples/python + export SHARE=${INSTALL_TEST_DIR}/smoke_tests/samples_smoke_tests_data - source ${{ env.INSTALL_DIR }}/setupvars.sh + python3 -m pip install --ignore-installed PyYAML -r ${INSTALL_TEST_DIR}/smoke_tests/requirements.txt + export LD_LIBRARY_PATH=${IE_APP_PATH}:$LD_LIBRARY_PATH - python3 -m pytest -sv ${{ env.INSTALL_TEST_DIR }}/smoke_tests \ - --env_conf ${{ env.INSTALL_TEST_DIR }}/smoke_tests/env_config.yml \ - --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-SamplesSmokeTests.xml - env: - IE_APP_PATH: ${{ env.INSTALL_DIR }}/samples_bin - IE_APP_PYTHON_PATH: ${{ env.INSTALL_DIR }}/samples/python - SHARE: ${{ env.INSTALL_TEST_DIR }}/smoke_tests/samples_smoke_tests_data - WORKSPACE: ${{ env.INSTALL_DIR }} + source ${INSTALL_DIR}/setupvars.sh + + python3 -m pytest -sv ${INSTALL_TEST_DIR}/smoke_tests \ + --env_conf ${INSTALL_TEST_DIR}/smoke_tests/env_config.yml \ + --junitxml=${INSTALL_TEST_DIR}/TEST-SamplesSmokeTests.xml # Present in the "Build" job due to the fact that these tests require build directory - name: ONNX frontend tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_onnx_frontend_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU*:*FrontEndLoadFromTest.testLoadFromTwoStreams*:*FrontEndLoadFromTest.testLoadFromTwoFiles* \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ONNXFrontend.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_onnx_frontend_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU*:*FrontEndLoadFromTest.testLoadFromTwoStreams*:*FrontEndLoadFromTest.testLoadFromTwoFiles* \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ONNXFrontend.xml # # Upload build artifacts @@ -271,15 +278,20 @@ jobs: defaults: run: shell: bash - runs-on: ubuntu-20.04 + runs-on: aks-linux-4-cores + container: + image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04 + volumes: + - /mount/caches:/mount/caches env: - INSTALL_DIR: ${{ github.workspace }}/install - INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests + DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input + INSTALL_DIR: /__w/openvino/openvino/install + INSTALL_TEST_DIR: /__w/openvino/openvino/install/tests steps: - name: Create Directories run: | - mkdir -p ${{ env.INSTALL_DIR }} ${{ env.INSTALL_TEST_DIR }} + mkdir -p ${INSTALL_DIR} ${INSTALL_TEST_DIR} # # Dependencies @@ -287,8 +299,8 @@ jobs: - name: Install dependencies run: | - sudo -E apt update - sudo -E apt --assume-yes install openjdk-11-jdk libbz2-dev clang unzip libpugixml-dev libtbb-dev intel-opencl-icd ocl-icd-opencl-dev opencl-headers + apt update + apt --assume-yes install openjdk-11-jdk libbz2-dev clang unzip libpugixml-dev libtbb-dev intel-opencl-icd ocl-icd-opencl-dev opencl-headers libsnappy-dev - name: Download OpenVINO package uses: actions/download-artifact@v3 @@ -304,11 +316,11 @@ jobs: - name: Extract OpenVINO packages run: | - pushd ${{ env.INSTALL_DIR }} - tar -xzf openvino_package.tar.gz -C ${{ env.INSTALL_DIR }} && rm openvino_package.tar.gz || exit 1 + pushd ${INSTALL_DIR} + tar -xzf openvino_package.tar.gz -C ${INSTALL_DIR} && rm openvino_package.tar.gz || exit 1 popd - pushd ${{ env.INSTALL_TEST_DIR }} - tar -xzf openvino_tests.tar.gz -C ${{ env.INSTALL_DIR }} && rm openvino_tests.tar.gz || exit 1 + pushd ${INSTALL_TEST_DIR} + tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} && rm openvino_tests.tar.gz || exit 1 popd # @@ -317,137 +329,137 @@ jobs: - name: OpenVINO Core Unit Tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVCoreUT.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-OVCoreUT.xml - name: OpenVINO Inference Functional Tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_inference_functional_tests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-InferenceFunc.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_inference_functional_tests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-InferenceFunc.xml - name: OpenVINO Inference Unit Tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_inference_unit_tests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-InferenceUnit.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_inference_unit_tests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-InferenceUnit.xml - name: Low Precision Transformations Tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_lp_transformations_tests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-LpTransformations.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_lp_transformations_tests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-LpTransformations.xml - name: OpenVINO Conditional compilation tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_conditional_compilation_tests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ConditionalCompilation.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_conditional_compilation_tests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ConditionalCompilation.xml - name: IR frontend tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_ir_frontend_tests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-IRFrontend.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_ir_frontend_tests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-IRFrontend.xml # Disabled in Azure: https://github.com/openvinotoolkit/openvino/blob/master/.ci/azure/linux.yml#L403 # - name: PaddlePaddle frontend tests # run: | - # source ${{ env.INSTALL_DIR }}/setupvars.sh - # ${{ env.INSTALL_TEST_DIR }}/paddle_tests --gtest_print_time=1 --gtest_filter=*smoke* \ - # --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-PaddleTests.xml + # source ${INSTALL_DIR}/setupvars.sh + # ${INSTALL_TEST_DIR}/paddle_tests --gtest_print_time=1 --gtest_filter=*smoke* \ + # --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-PaddleTests.xml # Present in the "Build" job as these tests require build directory # - name: ONNX frontend tests # run: | - # source ${{ env.INSTALL_DIR }}/setupvars.sh - # ${{ env.INSTALL_TEST_DIR }}/ov_onnx_frontend_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU*:*FrontEndLoadFromTest.testLoadFromTwoStreams*:*FrontEndLoadFromTest.testLoadFromTwoFiles* \ - # --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ONNXFrontend.xml + # source ${INSTALL_DIR}/setupvars.sh + # ${INSTALL_TEST_DIR}/ov_onnx_frontend_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU*:*FrontEndLoadFromTest.testLoadFromTwoStreams*:*FrontEndLoadFromTest.testLoadFromTwoFiles* \ + # --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ONNXFrontend.xml - name: TensorFlow Common tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_tensorflow_common_tests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TensorFlowCommonFrontend.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_tensorflow_common_tests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-TensorFlowCommonFrontend.xml - name: TensorFlow frontend tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_tensorflow_frontend_tests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TensorFlowFrontend.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_tensorflow_frontend_tests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-TensorFlowFrontend.xml - name: TensorFlow Lite frontend tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_tensorflow_lite_frontend_tests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TensorFlowLiteFrontend.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_tensorflow_lite_frontend_tests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-TensorFlowLiteFrontend.xml - name: Transformations Tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_transformations_tests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-Transformations.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_transformations_tests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-Transformations.xml - name: Common test utils tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_util_tests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-CommonUtilTests.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_util_tests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-CommonUtilTests.xml - name: Snippets func tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_snippets_func_tests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-SnippetsFuncTests.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_snippets_func_tests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-SnippetsFuncTests.xml - name: CPU plugin unit tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_cpu_unit_tests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-CPUUnitTests.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_cpu_unit_tests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-CPUUnitTests.xml # Disabled in Azure: https://github.com/openvinotoolkit/openvino/blob/master/.ci/azure/linux.yml#L409 # - name: GNA plugin unit tests # run: | - # source ${{ env.INSTALL_DIR }}/setupvars.sh - # ${{ env.INSTALL_TEST_DIR }}/ov_gna_unit_tests --gtest_print_time=1 \ - # --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-GNAUnitTests.xml + # source ${INSTALL_DIR}/setupvars.sh + # ${INSTALL_TEST_DIR}/ov_gna_unit_tests --gtest_print_time=1 \ + # --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-GNAUnitTests.xml - name: AUTO UT run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_auto_unit_tests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_unit_tests.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_auto_unit_tests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ov_auto_unit_tests.xml - name: Template plugin tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_template_func_tests --gtest_print_time=1 \ + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_template_func_tests --gtest_print_time=1 \ --gtest_filter=*smoke* \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TemplateFuncTests.xml + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-TemplateFuncTests.xml - name: Inference Engine C API tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/InferenceEngineCAPITests --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-InferenceEngineCAPITests.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/InferenceEngineCAPITests --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-InferenceEngineCAPITests.xml - name: OpenVINO C API tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_capi_test --gtest_print_time=1 \ - --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OpenVINOCAPITests.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_capi_test --gtest_print_time=1 \ + --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-OpenVINOCAPITests.xml - name: AutoBatch FuncTests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_auto_batch_func_tests --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_batch_func_tests.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_auto_batch_func_tests --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ov_auto_batch_func_tests.xml - name: Proxy Plugin Tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_proxy_plugin_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVProxyTests.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_proxy_plugin_tests --gtest_print_time=1 --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-OVProxyTests.xml - name: Hetero Unit Tests run: | @@ -456,8 +468,8 @@ jobs: - name: Hetero Func Tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - ${{ env.INSTALL_TEST_DIR }}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVHeteroFuncTests.xml + source ${INSTALL_DIR}/setupvars.sh + ${INSTALL_TEST_DIR}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-OVHeteroFuncTests.xml - name: Upload Test Results uses: actions/upload-artifact@v3 @@ -472,23 +484,32 @@ jobs: defaults: run: shell: bash - runs-on: ubuntu-20.04 + runs-on: aks-linux-4-cores + container: + image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04 + volumes: + - /mount/caches:/mount/caches env: - OPENVINO_REPO: ${{ github.workspace }}/openvino - OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib - INSTALL_DIR: ${{ github.workspace }}/install - INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests - SAMPLES_INSTALL_DIR: ${{ github.workspace }}/install/samples - LAYER_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/layer_tests - MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests - BUILD_DIR: ${{ github.workspace }}/build - OV_TEMP: ${{ github.workspace }}/openvino_temp + DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input + OPENVINO_REPO: /__w/openvino/openvino/openvino + OPENVINO_CONTRIB_REPO: /__w/openvino/openvino/openvino_contrib + INSTALL_DIR: /__w/openvino/openvino/install + INSTALL_TEST_DIR: /__w/openvino/openvino/install/tests + SAMPLES_INSTALL_DIR: /__w/openvino/openvino/install/samples + LAYER_TESTS_INSTALL_DIR: /__w/openvino/openvino/install/tests/layer_tests + MODEL_HUB_TESTS_INSTALL_DIR: /__w/openvino/openvino/install/tests/model_hub_tests + OV_TEMP: /__w/openvino/openvino/openvino_temp PYTHON_STATIC_ARGS: -m "not dynamic_library" steps: - name: Create Directories run: | - mkdir -p ${{ env.INSTALL_DIR }} ${{ env.INSTALL_TEST_DIR }} + mkdir -p ${INSTALL_DIR} ${INSTALL_TEST_DIR} + + - name: Install git + run: | + apt update + apt --assume-yes install git git-lfs - name: Clone OpenVINO uses: actions/checkout@v4 @@ -501,8 +522,8 @@ jobs: - name: Install dependencies run: | - sudo -E apt update - sudo -E apt --assume-yes install openjdk-11-jdk libbz2-dev clang unzip libpugixml-dev libtbb-dev intel-opencl-icd ocl-icd-opencl-dev opencl-headers + apt update + apt --assume-yes install openjdk-11-jdk libbz2-dev clang unzip libpugixml-dev libtbb-dev intel-opencl-icd ocl-icd-opencl-dev opencl-headers libsnappy-dev - uses: actions/setup-python@v4 with: @@ -512,32 +533,32 @@ jobs: run: | # For Python API python3 -m pip install --upgrade pip - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/requirements.txt + python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt + python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/requirements.txt # For running Python API tests - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt + python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt # For running ONNX frontend unit tests - python3 -m pip install --force-reinstall -r ${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/requirements.txt + python3 -m pip install --force-reinstall -r ${OPENVINO_REPO}/src/frontends/onnx/tests/requirements.txt # For running TensorFlow frontend unit tests - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/tensorflow/tests/requirements.txt + python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/tensorflow/tests/requirements.txt # For running Paddle frontend unit tests - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/paddle/tests/requirements.txt + python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/paddle/tests/requirements.txt # For torchvision to OpenVINO preprocessing converter - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/src/openvino/preprocess/torchvision/requirements.txt + python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/openvino/preprocess/torchvision/requirements.txt - name: Install MO dependencies run: | - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_mxnet.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_caffe.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_kaldi.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_onnx.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_tf2.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_dev.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_mxnet.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_caffe.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_kaldi.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_onnx.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_tf2.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_dev.txt - name: Download OpenVINO package uses: actions/download-artifact@v3 @@ -553,169 +574,169 @@ jobs: - name: Extract OpenVINO packages run: | - pushd ${{ env.INSTALL_DIR }} - tar -xzf openvino_package.tar.gz -C ${{ env.INSTALL_DIR }} && rm openvino_package.tar.gz || exit 1 + pushd ${INSTALL_DIR} + tar -xzf openvino_package.tar.gz -C ${INSTALL_DIR} && rm openvino_package.tar.gz || exit 1 popd - pushd ${{ env.INSTALL_TEST_DIR }} - tar -xzf openvino_tests.tar.gz -C ${{ env.INSTALL_DIR }} && rm openvino_tests.tar.gz || exit 1 + pushd ${INSTALL_TEST_DIR} + tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} && rm openvino_tests.tar.gz || exit 1 popd - name: Install Python wheels run: | - python3 -m pip install openvino-dev --find-links=${{ env.INSTALL_DIR }}/tools + python3 -m pip install openvino-dev --find-links=${INSTALL_DIR}/tools - name: nGraph and IE Python Bindings Tests run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - python3 -m pytest -s ${{ env.INSTALL_TEST_DIR }}/pyngraph ${{ env.PYTHON_STATIC_ARGS }} \ - --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-Pyngraph.xml \ - --ignore=${{ env.INSTALL_TEST_DIR }}/pyngraph/tests/test_onnx/test_zoo_models.py \ - --ignore=${{ env.INSTALL_TEST_DIR }}/pyngraph/tests/test_onnx/test_backend.py + source ${INSTALL_DIR}/setupvars.sh + python3 -m pytest -s ${INSTALL_TEST_DIR}/pyngraph ${{ env.PYTHON_STATIC_ARGS }} \ + --junitxml=${INSTALL_TEST_DIR}/TEST-Pyngraph.xml \ + --ignore=${INSTALL_TEST_DIR}/pyngraph/tests/test_onnx/test_zoo_models.py \ + --ignore=${INSTALL_TEST_DIR}/pyngraph/tests/test_onnx/test_backend.py - name: Python API 2.0 Tests run: | # For python imports to import pybind_mock_frontend - export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}:$PYTHONPATH - source ${{ env.INSTALL_DIR }}/setupvars.sh - export LD_LIBRARY_PATH=${{ env.INSTALL_TEST_DIR }}:$LD_LIBRARY_PATH + export PYTHONPATH=${INSTALL_TEST_DIR}:$PYTHONPATH + source ${INSTALL_DIR}/setupvars.sh + export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}:$LD_LIBRARY_PATH - python3 -m pytest -sv ${{ env.INSTALL_TEST_DIR }}/pyopenvino ${{ env.PYTHON_STATIC_ARGS }} \ - --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-Pyngraph.xml \ - --ignore=${{ env.INSTALL_TEST_DIR }}/pyopenvino/tests/test_utils/test_utils.py \ - --ignore=${{ env.INSTALL_TEST_DIR }}/pyopenvino/tests/test_onnx/test_zoo_models.py \ - --ignore=${{ env.INSTALL_TEST_DIR }}/pyopenvino/tests/test_onnx/test_backend.py + python3 -m pytest -sv ${INSTALL_TEST_DIR}/pyopenvino ${{ env.PYTHON_STATIC_ARGS }} \ + --junitxml=${INSTALL_TEST_DIR}/TEST-Pyngraph.xml \ + --ignore=${INSTALL_TEST_DIR}/pyopenvino/tests/test_utils/test_utils.py \ + --ignore=${INSTALL_TEST_DIR}/pyopenvino/tests/test_onnx/test_zoo_models.py \ + --ignore=${INSTALL_TEST_DIR}/pyopenvino/tests/test_onnx/test_backend.py - name: Python API snippets run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}:${{ github.workspace }}/openvino/docs/:$PYTHONPATH - export LD_LIBRARY_PATH=${{ env.INSTALL_TEST_DIR }}:$LD_LIBRARY_PATH + source ${INSTALL_DIR}/setupvars.sh + export PYTHONPATH=${INSTALL_TEST_DIR}:${OPENVINO_REPO}/docs/:$PYTHONPATH + export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}:$LD_LIBRARY_PATH - python3 ${{ github.workspace }}/openvino/docs/snippets/main.py + python3 ${OPENVINO_REPO}/docs/snippets/main.py - name: Model Optimizer UT run: | - export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:${{ env.INSTALL_TEST_DIR }}:${{ env.INSTALL_DIR }}/python/python3.11:$PYTHONPATH + export PYTHONPATH=${OPENVINO_REPO}/tools/mo/:${LAYER_TESTS_INSTALL_DIR}:${INSTALL_TEST_DIR}:${INSTALL_DIR}/python/python3.11:$PYTHONPATH # TODO: figure out why they need to be reinstalled - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_mxnet.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_caffe.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_kaldi.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_onnx.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_tf2.txt - python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_dev.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_mxnet.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_caffe.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_kaldi.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_onnx.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_tf2.txt + python3 -m pip install -r ${OPENVINO_REPO}/tools/mo/requirements_dev.txt - source ${{ env.INSTALL_DIR }}/setupvars.sh + source ${INSTALL_DIR}/setupvars.sh - python3 -m pytest -s ${{ env.INSTALL_TEST_DIR }}/mo/unit_tests \ - --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-ModelOptimizer.xml + python3 -m pytest -s ${INSTALL_TEST_DIR}/mo/unit_tests \ + --junitxml=${INSTALL_TEST_DIR}/TEST-ModelOptimizer.xml - name: PyTorch Layer Tests run: | - python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH - source ${{ env.INSTALL_DIR }}/setupvars.sh + python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt + export PYTHONPATH=${OPENVINO_REPO}/tools/mo/:${LAYER_TESTS_INSTALL_DIR}:$PYTHONPATH + source ${INSTALL_DIR}/setupvars.sh - python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/pytorch_tests -m precommit --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-pytorch.xml + python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/pytorch_tests -m precommit --junitxml=${INSTALL_TEST_DIR}/TEST-pytorch.xml env: TEST_DEVICE: CPU TEST_PRECISION: FP16 - name: TensorFlow 1 Layer Tests - TF FE run: | - python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt + python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt - export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH + export PYTHONPATH=${OPENVINO_REPO}/tools/mo/:${LAYER_TESTS_INSTALL_DIR}:$PYTHONPATH - source ${{ env.INSTALL_DIR }}/setupvars.sh + source ${INSTALL_DIR}/setupvars.sh - python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf_fe.xml + python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/tensorflow_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=${INSTALL_TEST_DIR}/TEST-tf_fe.xml env: TEST_DEVICE: CPU TEST_PRECISION: FP16 - name: TensorFlow 2 Layer Tests - TF FE run: | - python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH + python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt + export PYTHONPATH=${OPENVINO_REPO}/tools/mo/:${LAYER_TESTS_INSTALL_DIR}:$PYTHONPATH - source ${{ env.INSTALL_DIR }}/setupvars.sh + source ${INSTALL_DIR}/setupvars.sh - python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow2_keras_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf2_fe.xml + python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/tensorflow2_keras_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=${INSTALL_TEST_DIR}/TEST-tf2_fe.xml env: TEST_DEVICE: CPU TEST_PRECISION: FP16 - name: JAX Layer Tests - TF FE run: | - python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - export PYTHONPATH=${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH + python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt + export PYTHONPATH=${LAYER_TESTS_INSTALL_DIR}:$PYTHONPATH - source ${{ env.INSTALL_DIR }}/setupvars.sh + source ${INSTALL_DIR}/setupvars.sh - python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/jax_tests/ -m precommit --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-jax.xml + python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/jax_tests/ -m precommit --junitxml=${INSTALL_TEST_DIR}/TEST-jax.xml env: TEST_DEVICE: CPU - name: TensorFlow 1 Layer Tests - Legacy FE run: | - python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH - source ${{ env.INSTALL_DIR }}/setupvars.sh + python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt + export PYTHONPATH=${OPENVINO_REPO}/tools/mo/:${LAYER_TESTS_INSTALL_DIR}:$PYTHONPATH + source ${INSTALL_DIR}/setupvars.sh - python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow_tests/test_tf_Roll.py --ir_version=10 --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf_Roll.xml + python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/tensorflow_tests/test_tf_Roll.py --ir_version=10 --junitxml=${INSTALL_TEST_DIR}/TEST-tf_Roll.xml - name: TensorFlow 2 Layer Tests - Legacy FE run: | - python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH - source ${{ env.INSTALL_DIR }}/setupvars.sh + python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt + export PYTHONPATH=${OPENVINO_REPO}/tools/mo/:${LAYER_TESTS_INSTALL_DIR}:$PYTHONPATH + source ${INSTALL_DIR}/setupvars.sh - python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow2_keras_tests/test_tf2_keras_activation.py \ - --ir_version=11 --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf2_Activation.xml -k "sigmoid" + python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/tensorflow2_keras_tests/test_tf2_keras_activation.py \ + --ir_version=11 --junitxml=${INSTALL_TEST_DIR}/TEST-tf2_Activation.xml -k "sigmoid" env: TEST_DEVICE: CPU TEST_PRECISION: FP16 - name: TensorFlow Lite Layer Tests - TFL FE run: | - python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH - source ${{ env.INSTALL_DIR }}/setupvars.sh + python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt + export PYTHONPATH=${OPENVINO_REPO}/tools/mo/:${LAYER_TESTS_INSTALL_DIR}:$PYTHONPATH + source ${INSTALL_DIR}/setupvars.sh - python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow_lite_tests/ --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tfl_fe.xml + python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/tensorflow_lite_tests/ --junitxml=${INSTALL_TEST_DIR}/TEST-tfl_fe.xml env: TEST_DEVICE: CPU TEST_PRECISION: FP16 - name: MO Python API Tests run: | - python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH - source ${{ env.INSTALL_DIR }}/setupvars.sh + python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt + export PYTHONPATH=${OPENVINO_REPO}/tools/mo/:${LAYER_TESTS_INSTALL_DIR}:$PYTHONPATH + source ${INSTALL_DIR}/setupvars.sh - python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml + python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/mo_python_api_tests --junitxml=${INSTALL_TEST_DIR}/TEST-test_mo_convert.xml env: TEST_DEVICE: CPU TEST_PRECISION: FP16 - name: Python Frontend tests run: | - python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt - export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH - source ${{ env.INSTALL_DIR }}/setupvars.sh + python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt + export PYTHONPATH=${OPENVINO_REPO}/tools/mo/:${LAYER_TESTS_INSTALL_DIR}:$PYTHONPATH + source ${INSTALL_DIR}/setupvars.sh - python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/py_frontend_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_py_fontend.xml + python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/py_frontend_tests --junitxml=${INSTALL_TEST_DIR}/TEST-test_py_fontend.xml - name: Conversion UT run: | # For python imports to import pybind_mock_frontend - export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}:$PYTHONPATH - source ${{ env.INSTALL_DIR }}/setupvars.sh + export PYTHONPATH=${INSTALL_TEST_DIR}:$PYTHONPATH + source ${INSTALL_DIR}/setupvars.sh - python3 -m pytest -s ${{ env.OPENVINO_REPO }}/tools/ovc/unit_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-OpenVinoConversion.xml + python3 -m pytest -s ${OPENVINO_REPO}/tools/ovc/unit_tests --junitxml=${INSTALL_TEST_DIR}/TEST-OpenVinoConversion.xml - name: Upload Test Results uses: actions/upload-artifact@v3 @@ -732,21 +753,26 @@ jobs: defaults: run: shell: bash - runs-on: ubuntu-20.04-4-cores + runs-on: aks-linux-4-cores + container: + image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04 + volumes: + - /mount/caches:/mount/caches env: - INSTALL_DIR: ${{ github.workspace }}/install - INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests - PARALLEL_TEST_SCRIPT: ${{ github.workspace }}/install/tests/functional_test_utils/run_parallel.py - PARALLEL_TEST_CACHE: ${{ github.workspace }}/install/tests/test_cache.lst + DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input + INSTALL_DIR: /__w/openvino/openvino/install + INSTALL_TEST_DIR: /__w/openvino/openvino/install/tests + PARALLEL_TEST_SCRIPT: /__w/openvino/openvino/install/tests/functional_test_utils/run_parallel.py + PARALLEL_TEST_CACHE: /__w/openvino/openvino/install/tests/test_cache.lst steps: - name: Create Directories - run: mkdir -p ${{ env.INSTALL_DIR }} ${{ env.INSTALL_TEST_DIR }} + run: mkdir -p ${INSTALL_DIR} ${INSTALL_TEST_DIR} - name: Install dependencies run: | - sudo -E apt update - sudo -E apt --assume-yes install openjdk-11-jdk libbz2-dev clang unzip libpugixml-dev libtbb-dev intel-opencl-icd ocl-icd-opencl-dev opencl-headers + apt update + apt --assume-yes install openjdk-11-jdk libbz2-dev clang unzip libpugixml-dev libtbb-dev intel-opencl-icd ocl-icd-opencl-dev opencl-headers libsnappy-dev - name: Download OpenVINO package uses: actions/download-artifact@v3 @@ -762,17 +788,21 @@ jobs: - name: Extract OpenVINO packages run: | - pushd ${{ env.INSTALL_DIR }} - tar -xzf openvino_package.tar.gz -C ${{ env.INSTALL_DIR }} && rm openvino_package.tar.gz || exit 1 + pushd ${INSTALL_DIR} + tar -xzf openvino_package.tar.gz -C ${INSTALL_DIR} && rm openvino_package.tar.gz || exit 1 popd - pushd ${{ env.INSTALL_TEST_DIR }} - tar -xzf openvino_tests.tar.gz -C ${{ env.INSTALL_DIR }} && rm openvino_tests.tar.gz || exit 1 + pushd ${INSTALL_TEST_DIR} + tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR} && rm openvino_tests.tar.gz || exit 1 popd + - uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Install python dependencies run: | python3 -m pip install --upgrade pip - python3 -m pip install -r ${{ env.INSTALL_TEST_DIR }}/functional_test_utils/requirements.txt + python3 -m pip install -r ${INSTALL_TEST_DIR}/functional_test_utils/requirements.txt - name: Restore tests execution time uses: actions/cache/restore@v3 @@ -784,9 +814,9 @@ jobs: - name: Intel CPU plugin func tests (parallel) run: | - source ${{ env.INSTALL_DIR }}/setupvars.sh - python3 ${{ env.PARALLEL_TEST_SCRIPT }} -e ${{ env.INSTALL_TEST_DIR }}/ov_cpu_func_tests -c ${{ env.PARALLEL_TEST_CACHE }} -w ${{ env.INSTALL_TEST_DIR }} -s suite -rf 0 -- --gtest_print_time=1 --gtest_filter=*smoke* - timeout-minutes: 25 + source ${INSTALL_DIR}/setupvars.sh + python3 ${PARALLEL_TEST_SCRIPT} -e ${INSTALL_TEST_DIR}/ov_cpu_func_tests -c ${PARALLEL_TEST_CACHE} -w ${INSTALL_TEST_DIR} -s suite -rf 0 -- --gtest_print_time=1 --gtest_filter=*smoke* + timeout-minutes: 40 - name: Save tests execution time uses: actions/cache/save@v3 @@ -882,6 +912,7 @@ jobs: shell: bash runs-on: ${{ github.event_name == 'schedule' && 'ubuntu-20.04-8-cores' || 'ubuntu-20.04'}} env: + DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input INSTALL_DIR: ${{ github.workspace }}/install INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests @@ -924,6 +955,7 @@ jobs: - name: Install Python wheels run: | python3 -m pip install openvino --find-links=${{ env.INSTALL_DIR }}/tools + - name: Install requirements run: | python3 -m pip install -r ${{ env.MODEL_HUB_TESTS_INSTALL_DIR }}/torch_tests/requirements.txt diff --git a/tools/mo/unit_tests/mo/utils/cli_parser_test.py b/tools/mo/unit_tests/mo/utils/cli_parser_test.py index 1f2cce048aba07..b3c7c4c125d540 100644 --- a/tools/mo/unit_tests/mo/utils/cli_parser_test.py +++ b/tools/mo/unit_tests/mo/utils/cli_parser_test.py @@ -1224,11 +1224,13 @@ def test_single_writable_dir(self): self.assertEqual(__class__.WRITABLE_DIR, writable_dir(__class__.WRITABLE_DIR)) @unittest.skipIf(sys.platform.startswith("win"), "chmod() on Windows do nor support not writable dir") + @unittest.skipIf(os.geteuid() == 0, "root user does not support not writable dir") def test_single_non_writable_dir(self): with self.assertRaises(Error) as cm: writable_dir(__class__.NOT_WRITABLE_DIR) @unittest.skipIf(sys.platform.startswith("win"), "chmod() on Windows do nor support not writable dir") + @unittest.skipIf(os.geteuid() == 0, "root user does not support not writable dir") def test_single_non_writable_sub_dir(self): with self.assertRaises(Error) as cm: writable_dir(__class__.NOT_WRITABLE_SUB_DIR)