Switch Windows Conditional Compilation workflow to AKS runners (#21375)

* Switch Windows Conditional Compilation workflow to AKS runners

* Fix YAML syntax

* Limit number of threads for CC build

* Split build stages to two to avoid step being successful when it's not

* Install python to conditional compilation job

* Combine both build commands into a single step

* Trying to work around sccache port issue

Sometimes build hangs and then ends by timeout. The only error message
in the logs is "sccache: error: An attempt was made to access a socket in a way forbidden by its access permissions. (os error 10013)"

* Temporary disable ctest step

* Revert "Temporary disable ctest step"

This reverts commit 8714200994.

* Disable Windows conditional compilation for PRs
This commit is contained in:
Andrey Babushkin 2023-12-08 14:45:36 +00:00 committed by GitHub
parent ba34fa77e8
commit a84d615abd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,24 +4,24 @@ on:
schedule: schedule:
# run daily at 00:00 # run daily at 00:00
- cron: '0 0 * * *' - cron: '0 0 * * *'
# pull_request: # pull_request:
# paths-ignore: # paths-ignore:
# - '**/docs/**' # - '**/docs/**'
# - 'docs/**' # - 'docs/**'
# - '**/**.md' # - '**/**.md'
# - '**.md' # - '**.md'
# - '**/layer_tests_summary/**' # - '**/layer_tests_summary/**'
# - '**/conformance/**' # - '**/conformance/**'
# push: push:
# paths-ignore: paths-ignore:
# - '**/docs/**' - '**/docs/**'
# - 'docs/**' - 'docs/**'
# - '**/**.md' - '**/**.md'
# - '**.md' - '**.md'
# - '**/layer_tests_summary/**' - '**/layer_tests_summary/**'
# - '**/conformance/**' - '**/conformance/**'
# branches: branches:
# - master - master
concurrency: concurrency:
# github.ref is not unique in post-commit # github.ref is not unique in post-commit
@ -37,7 +37,7 @@ jobs:
defaults: defaults:
run: run:
shell: pwsh shell: pwsh
runs-on: windows-latest-8-cores runs-on: aks-win-16-cores-32gb
env: env:
CMAKE_BUILD_TYPE: 'Release' CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja Multi-Config' CMAKE_GENERATOR: 'Ninja Multi-Config'
@ -49,6 +49,8 @@ jobs:
BUILD_DIR: "${{ github.workspace }}\\openvino_build" BUILD_DIR: "${{ github.workspace }}\\openvino_build"
MODELS_PATH: "${{ github.workspace }}\\testdata" MODELS_PATH: "${{ github.workspace }}\\testdata"
SELECTIVE_BUILD_STAT_DIR: "${{ github.workspace }}\\selective_build_stat" SELECTIVE_BUILD_STAT_DIR: "${{ github.workspace }}\\selective_build_stat"
# TODO: specify version of compiler here
SCCACHE_AZURE_KEY_PREFIX: windows2022_x86_64_itt_Release
steps: steps:
- name: Clone OpenVINO - name: Clone OpenVINO
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -82,6 +84,11 @@ jobs:
should-setup-pip-paths: 'false' should-setup-pip-paths: 'false'
self-hosted-runner: 'false' self-hosted-runner: 'false'
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.3
with:
version: "v0.5.4"
- name: Install build dependencies - name: Install build dependencies
run: choco install --no-progress ninja run: choco install --no-progress ninja
@ -106,18 +113,6 @@ jobs:
- name: Configure Developer Command Prompt for Microsoft Visual C++ - name: Configure Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@v1 uses: ilammy/msvc-dev-cmd@v1
- name: Setup sccache
uses: hendrikmuhs/ccache-action@v1.2
with:
variant: sccache
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' }}
key: ${{ github.job }}-${{ runner.os }}-itt
restore-keys: |
${{ github.job }}-${{ runner.os }}-itt
- name: CMake configure - CC COLLECT - name: CMake configure - CC COLLECT
run: | run: |
cmake -G "${{ env.CMAKE_GENERATOR }}" ` cmake -G "${{ env.CMAKE_GENERATOR }}" `
@ -133,10 +128,29 @@ jobs:
-S ${{ env.OPENVINO_REPO }} ` -S ${{ env.OPENVINO_REPO }} `
-B ${{ env.BUILD_DIR }} -B ${{ env.BUILD_DIR }}
- name: Clean sccache stats
run: '& "$Env:SCCACHE_PATH" --zero-stats'
# to get more information on the issue
# described in the next step
- name: Show which network ports are used
run: netstat -ban
# the case is the following:
# sccache: error: An attempt was made to access a socket in a way forbidden by its access permissions. (os error 10013)
# This looks like the attempt to use
# a port below 1024 or a port
# which is occupied by another app
- name: Stop sccache server just in case
run: '& "$Env:SCCACHE_PATH" --stop-server'
- name: Cmake build - CC COLLECT - name: Cmake build - CC COLLECT
run: | run: |
cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} cmake --build ${{ env.BUILD_DIR }} --parallel 8 --config ${{ env.CMAKE_BUILD_TYPE }} && `
cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --target sea_itt_lib cmake --build ${{ env.BUILD_DIR }} --parallel 8 --config ${{ env.CMAKE_BUILD_TYPE }} --target sea_itt_lib
- name: Show sccache stats
run: '& "$Env:SCCACHE_PATH" --show-stats'
- name: Cmake install - OpenVINO - name: Cmake install - OpenVINO
run: cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake run: cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake
@ -216,7 +230,7 @@ jobs:
defaults: defaults:
run: run:
shell: pwsh shell: pwsh
runs-on: windows-latest-8-cores runs-on: aks-win-16-cores-32gb
env: env:
CMAKE_BUILD_TYPE: 'Release' CMAKE_BUILD_TYPE: 'Release'
CMAKE_CXX_COMPILER_LAUNCHER: sccache CMAKE_CXX_COMPILER_LAUNCHER: sccache
@ -225,6 +239,7 @@ jobs:
BUILD_DIR: "${{ github.workspace }}\\openvino_build" BUILD_DIR: "${{ github.workspace }}\\openvino_build"
MODELS_PATH: "${{ github.workspace }}\\testdata" MODELS_PATH: "${{ github.workspace }}\\testdata"
SELECTIVE_BUILD_STAT_DIR: "${{ github.workspace }}\\selective_build_stat" SELECTIVE_BUILD_STAT_DIR: "${{ github.workspace }}\\selective_build_stat"
SCCACHE_AZURE_KEY_PREFIX: windows2022_x86_64_cc_Release
steps: steps:
- name: Clone OpenVINO - name: Clone OpenVINO
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -249,6 +264,18 @@ jobs:
- name: Extract selective build statistics package - name: Extract selective build statistics package
run: Expand-Archive ${{ env.SELECTIVE_BUILD_STAT_DIR }}/openvino_selective_build_stat.zip -DestinationPath "${{ env.SELECTIVE_BUILD_STAT_DIR }}" run: Expand-Archive ${{ env.SELECTIVE_BUILD_STAT_DIR }}/openvino_selective_build_stat.zip -DestinationPath "${{ env.SELECTIVE_BUILD_STAT_DIR }}"
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
version: ${{ env.PYTHON_VERSION }}
should-setup-pip-paths: 'false'
self-hosted-runner: 'false'
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.3
with:
version: "v0.5.4"
- name: CMake configure - CC ON - name: CMake configure - CC ON
run: | run: |
cmake ` cmake `
@ -267,9 +294,15 @@ jobs:
-S ${{ env.OPENVINO_REPO }} ` -S ${{ env.OPENVINO_REPO }} `
-B ${{ env.BUILD_DIR }} -B ${{ env.BUILD_DIR }}
- name: Clean sccache stats
run: '& "$Env:SCCACHE_PATH" --zero-stats'
- name: Cmake build - CC ON - name: Cmake build - CC ON
run: cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --target benchmark_app run: cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --target benchmark_app
- name: Show sccache stats
run: '& "$Env:SCCACHE_PATH" --show-stats'
- name: List bin files - name: List bin files
shell: cmd shell: cmd
run: dir ${{ env.OPENVINO_REPO }}\bin\ /s run: dir ${{ env.OPENVINO_REPO }}\bin\ /s
@ -283,10 +316,11 @@ jobs:
CPU_Functional_Tests: CPU_Functional_Tests:
name: CPU functional tests name: CPU functional tests
needs: Build needs: Build
timeout-minutes: 70
defaults: defaults:
run: run:
shell: pwsh shell: pwsh
runs-on: windows-latest-8-cores runs-on: aks-win-8-cores-16gb
env: env:
OPENVINO_REPO: "${{ github.workspace }}\\openvino" OPENVINO_REPO: "${{ github.workspace }}\\openvino"
INSTALL_TEST_DIR: "${{ github.workspace }}\\tests_install" INSTALL_TEST_DIR: "${{ github.workspace }}\\tests_install"