From d658f3f513d632a60c7829f0442d01e54edcdd41 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 11 Dec 2024 11:08:53 +0000 Subject: [PATCH 1/3] setup cache dir per Python; do not use cache for Python setup --- .github/actions/setup_python/action.yml | 5 +---- .github/workflows/job_build_windows.yml | 6 +++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup_python/action.yml b/.github/actions/setup_python/action.yml index 96968f55636df9..d1290508ab778f 100644 --- a/.github/actions/setup_python/action.yml +++ b/.github/actions/setup_python/action.yml @@ -22,7 +22,6 @@ inputs: runs: using: 'composite' steps: - - name: Check if Python is already installed (Linux) if: ${{ runner.os == 'Linux' }} shell: bash @@ -54,13 +53,11 @@ runs: with: python-version: ${{ inputs.version }} - - if: ${{ runner.os == 'macOS' || runner.os == 'Windows' || (runner.os == 'Linux' && runner.arch != 'ARM64' && steps.check_python.outputs.installed == 'false' ) }} + - if: ${{ runner.os == 'macOS' || runner.os == 'Windows' || (runner.os == 'Linux' && runner.arch != 'ARM64' && steps.check_python.outputs.installed == 'false') }} name: Setup Python ${{ inputs.version }} uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{ inputs.version }} - env: - PIP_CACHE_DIR: ${{ inputs.self-hosted-runner == 'true' && inputs.pip-cache-path || '' }} - if: ${{ inputs.should-setup-pip-paths == 'true' && runner.os != 'Windows' }} name: Setup pip variables (cache and install path) diff --git a/.github/workflows/job_build_windows.yml b/.github/workflows/job_build_windows.yml index 7b682f208c3435..fbd64634c64361 100644 --- a/.github/workflows/job_build_windows.yml +++ b/.github/workflows/job_build_windows.yml @@ -220,7 +220,11 @@ jobs: $pythonCommand = "py -$pyVersion -c `"import sys; print(f'{sys.executable}')`"" $pythonExecutablePath = & cmd /c $pythonCommand - + + $pipVersion = & $pythonExecutablePath -c "import pip; print(pip.__version__)" + Write-Host "Using pip version: $pipVersion for $pyVersion" + $env:PIP_CACHE_DIR="${{ env.PIP_CACHE_PATH }}/$pipVersion" + & $pythonExecutablePath -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir" From 1a042296d2eaadb95224d743e9c127cee1ef52a8 Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 11 Dec 2024 13:14:55 +0000 Subject: [PATCH 2/3] add error to look for --- .github/scripts/workflow_rerun/errors_to_look_for.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/scripts/workflow_rerun/errors_to_look_for.json b/.github/scripts/workflow_rerun/errors_to_look_for.json index b1074fa43e7200..2a6e9529a038b8 100644 --- a/.github/scripts/workflow_rerun/errors_to_look_for.json +++ b/.github/scripts/workflow_rerun/errors_to_look_for.json @@ -82,5 +82,9 @@ { "error_text": "Upload progress stalled", "ticket": 152933 + }, + { + "error_text": "because the GET request got Content-Type", + "ticket": 158400 } ] \ No newline at end of file From 46cea195e7c7ed14993ea01c69bcf4b2e29c1d0e Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Thu, 12 Dec 2024 14:19:55 +0000 Subject: [PATCH 3/3] exit from loop if errors in build --- .github/workflows/job_build_windows.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/job_build_windows.yml b/.github/workflows/job_build_windows.yml index fbd64634c64361..674c0bc73e9fdd 100644 --- a/.github/workflows/job_build_windows.yml +++ b/.github/workflows/job_build_windows.yml @@ -227,9 +227,13 @@ jobs: & $pythonExecutablePath -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt - cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir" - cmake --build "$pyBuildDir" --parallel --config ${{ env.CMAKE_BUILD_TYPE }} + cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir" && + cmake --build "$pyBuildDir" --parallel --config ${{ env.CMAKE_BUILD_TYPE }} && cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels + if ($LASTEXITCODE -ne 0) { + Write-Host "Failed to build Python wheels for Python $pyVersion" + exit 1 + } } - name: Pack Artifacts