Skip to content

Commit

Permalink
Enable PDB files for both dynamic and static builds (openvinotoolkit#…
Browse files Browse the repository at this point in the history
…29174)

### Details:
- Use default `/Zi` instead of `/Z7`, which allows to reduce binary size
of static libraries in debug build.
- Create cpack component for PDB files and build them for Release, Debug
and both static / dynamic builds.
- Switched cmake generator for Windows static build to MSVC because of
issue with default names for PDB files in Ninja. Can be reverted back
once oneapi-src/oneDNN#2795 is merged and used
within OpenVINO.

### Tickets:
 - CVS-160554
 - CVS-163245
  • Loading branch information
ilya-lavrenov authored Mar 3, 2025
1 parent dd2580f commit 097892a
Show file tree
Hide file tree
Showing 50 changed files with 835 additions and 683 deletions.
1 change: 0 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:
-DCMAKE_VERBOSE_MAKEFILE=ON
-DENABLE_PYTHON=ON
-DENABLE_ONEDNN_FOR_GPU=ON
-DBUILD_SHARED_LIBS=ON
-DENABLE_TESTS=ON
-DENABLE_OV_ONNX_FRONTEND=ON
-DENABLE_FASTER_BUILD=ON
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dev_cpu_linux_snippets_libxsmm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,15 @@ jobs:
path: ${{ env.SCCACHE_ERROR_LOG }}
if-no-files-found: 'ignore'

- name: Upload openvino package
- name: Upload OpenVINO package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_package
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
if-no-files-found: 'error'

- name: Upload openvino tests package
- name: Upload OpenVINO tests package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/job_build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,10 @@ jobs:

- name: Cmake install - OpenVINO
run: |
cmake --install . --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${INSTALL_DIR}
cmake --install . --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${INSTALL_WHEELS_DIR} --component python_wheels
cmake --install . --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${INSTALL_TEST_DIR} --component tests
cmake --install . --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${DEVELOPER_PACKAGE_DIR} --component developer_package
working-directory: ${{ env.BUILD_DIR }}
cmake --install ${BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${INSTALL_DIR}
cmake --install ${BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${INSTALL_WHEELS_DIR} --component python_wheels
cmake --install ${BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${INSTALL_TEST_DIR} --component tests
cmake --install ${BUILD_DIR} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${DEVELOPER_PACKAGE_DIR} --component developer_package
- name: Pack openvino_package
run: tar -cvf - * | pigz > ${BUILD_DIR}/openvino_package.tar.gz
Expand Down Expand Up @@ -276,55 +275,55 @@ jobs:
path: ${{ env.SCCACHE_ERROR_LOG }}
if-no-files-found: 'ignore'

- name: Upload openvino package
- name: Upload OpenVINO package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_package
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
if-no-files-found: 'error'

- name: Upload openvino wheels
- name: Upload OpenVINO wheels
if: ${{ inputs.os != 'debian_10' && inputs.arch != 'arm' }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_wheels
path: ${{ env.INSTALL_WHEELS_DIR }}/wheels/*.whl
if-no-files-found: 'error'

- name: Upload openvino js package
- name: Upload OpenVINO js package
if: ${{ fromJSON(inputs.affected-components).JS_API && inputs.build-js }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_js_package
path: ${{ env.BUILD_DIR }}/openvino_js_package.tar.gz
if-no-files-found: 'error'

- name: Upload openvino developer package
- name: Upload OpenVINO developer package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_developer_package
path: ${{ env.BUILD_DIR }}/openvino_developer_package.tar.gz
if-no-files-found: 'error'

- name: Upload openvino RPM packages
- name: Upload OpenVINO RPM packages
if: ${{ inputs.build-rpm-packages }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_rpm_packages
path: ${{ env.BUILD_DIR }}/*.rpm
if-no-files-found: 'error'

- name: Upload openvino debian packages
- name: Upload OpenVINO debian packages
if: ${{ inputs.build-debian-packages }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_debian_packages
path: ${{ env.BUILD_DIR }}/*.deb
if-no-files-found: 'error'

- name: Upload openvino tests package
- name: Upload OpenVINO tests package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
Expand Down
44 changes: 30 additions & 14 deletions .github/workflows/job_build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
INSTALL_DIR_JS: "${{ github.workspace }}\\openvino_install\\js"
INSTALL_TEST_DIR: "${{ github.workspace }}\\tests_install"
INSTALL_WHEELS_DIR: "${{ github.workspace }}\\install\\wheels"
INSTALL_PDB_DIR: "${{ github.workspace }}\\install_pdb"
BUILD_DIR: "${{ github.workspace }}\\openvino_build"
ARTIFACTS_SHARE: "C:\\mount\\build-artifacts"
MANIFEST_PATH: "${{ github.workspace }}\\manifest.yml"
Expand Down Expand Up @@ -163,7 +164,7 @@ jobs:
run: echo SSL_CERT_FILE=$(python3 -m certifi) >> $env:GITHUB_ENV

- name: CMake configure
run: cmake -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }} ${{ inputs.cmake-options }}
run: cmake -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }} ${{ inputs.cmake-options }} -DCMAKE_CXX_FLAGS="/Zi" -DCMAKE_C_FLAGS="/Zi" -DCMAKE_SHARED_LINKER_FLAGS="/DEBUG" -DCMAKE_MODULE_LINKER_FLAGS="/DEBUG"

- name: Clean ccache stats
run: '& ccache --zero-stats'
Expand All @@ -176,10 +177,10 @@ jobs:

- name: Cmake install - OpenVINO
run: |
cmake --install . --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DIR }}
cmake --install . --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels
cmake --install . --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_TEST_DIR }} --component tests
working-directory: ${{ env.BUILD_DIR }}
cmake --install ${{ env.BUILD_DIR }} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DIR }}
cmake --install ${{ env.BUILD_DIR }} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels
cmake --install ${{ env.BUILD_DIR }} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_TEST_DIR }} --component tests
cmake --install ${{ env.BUILD_DIR }} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_PDB_DIR }} --component pdb
# Setup additional Python versions for wheels building
- name: Setup Python 3.9
Expand Down Expand Up @@ -218,18 +219,18 @@ jobs:
foreach ($pyVersion in $pyVersions) {
$pyBuildDir = "${{ github.workspace }}/py$pyVersion"
New-Item -ItemType Directory -Path "$pyBuildDir" -Force
$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" &&
cmake --build "$pyBuildDir" --parallel $ENV:NUMBER_OF_PROCESSORS --target ie_wheel --config ${{ env.CMAKE_BUILD_TYPE }} &&
cmake --build "$pyBuildDir" --parallel $ENV:NUMBER_OF_PROCESSORS --target ie_wheel --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"
Expand All @@ -255,6 +256,14 @@ jobs:
}
Compress-Archive @compress
$file=Get-ChildItem -Path "${{ env.INSTALL_PDB_DIR }}"
$compress = @{
Path = $file
CompressionLevel = "Optimal"
DestinationPath = "${{ env.BUILD_DIR }}/openvino_pdb.zip"
}
Compress-Archive @compress
- name: CMake configure, build and install - OpenVINO JS API
if: ${{ fromJSON(inputs.affected-components).JS_API }}
run: |
Expand All @@ -264,7 +273,7 @@ jobs:
-DENABLE_WHEEL=OFF
cmake --build ${{ env.BUILD_DIR }} --parallel $ENV:NUMBER_OF_PROCESSORS
cmake --install ${{ env.BUILD_DIR }} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DIR_JS }}
- name: Pack JS Artifacts
if: ${{ fromJSON(inputs.affected-components).JS_API }}
run: |
Expand All @@ -280,29 +289,36 @@ jobs:
# Upload build artifacts and logs
#

- name: Upload openvino package
- name: Upload OpenVINO package
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_package
path: ${{ env.BUILD_DIR }}/openvino_package.zip
if-no-files-found: 'error'
- name: Upload openvino wheels

- name: Upload OpenVINO wheels
if: ${{ inputs.build-type != 'Debug' }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_wheels
path: ${{ env.INSTALL_WHEELS_DIR }}/wheels/*.whl
if-no-files-found: 'error'

- name: Upload openvino tests package
- name: Upload OpenVINO tests package
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_tests
path: ${{ env.BUILD_DIR }}/openvino_tests.zip
if-no-files-found: 'error'

- name: Upload openvino js package
- name: Upload OpenVINO PDB package
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_pdb
path: ${{ env.BUILD_DIR }}/openvino_pdb.zip
if-no-files-found: 'error'

- name: Upload OpenVINO js package
if: ${{ fromJSON(inputs.affected-components).JS_API }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job_tokenizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
# Upload build artifacts
#

- name: Upload openvino tokenizers wheel
- name: Upload OpenVINO tokenizers wheel
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/linux_conditional_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,13 @@ jobs:
- name: Build C++ samples - OpenVINO build tree
run: |
cmake -G "${{ env.CMAKE_GENERATOR }}" -DOpenVINO_DIR=${BUILD_DIR} -S ${INSTALL_DIR}/samples/cpp -B ${BUILD_DIR}/cpp_samples
cmake -G "${{ env.CMAKE_GENERATOR }}" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DOpenVINO_DIR=${BUILD_DIR} -S ${INSTALL_DIR}/samples/cpp -B ${BUILD_DIR}/cpp_samples
cmake --build ${BUILD_DIR}/cpp_samples --parallel $(nproc) --config ${{ env.CMAKE_BUILD_TYPE }} --target hello_query_device
- name: Build C samples - OpenVINO install tree
run: ${INSTALL_DIR}/samples/c/build_samples.sh -i ${INSTALL_DIR} -b ${BUILD_DIR}/c_samples
env:
CMAKE_COMPILE_WARNING_AS_ERROR: 'ON'

- name: Ctest - OpenVINO unit tests
run: ctest -C ${{ env.CMAKE_BUILD_TYPE }} --test-dir ${BUILD_DIR} -V -L UNIT
Expand Down Expand Up @@ -236,7 +238,7 @@ jobs:
path: ${{ env.SCCACHE_ERROR_LOG }}
if-no-files-found: 'ignore'

- name: Upload openvino package
- name: Upload OpenVINO package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/linux_sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ jobs:
-DENABLE_SYSTEM_OPENCL=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCPACK_GENERATOR=TGZ \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_OV_TF_FRONTEND=ON \
-DENABLE_OV_TF_LITE_FRONTEND=ON \
-DENABLE_OV_PADDLE_FRONTEND=ON \
Expand Down Expand Up @@ -233,15 +232,15 @@ jobs:
path: ${{ env.SCCACHE_ERROR_LOG }}
if-no-files-found: 'error'

- name: Upload openvino package
- name: Upload OpenVINO package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_package_${{ matrix.SANITIZER }}
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
if-no-files-found: 'error'

- name: Upload openvino tests package
- name: Upload OpenVINO tests package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,38 +275,38 @@ jobs:
# Upload build artifacts
#

- name: Upload openvino package
- name: Upload OpenVINO package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_package
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
if-no-files-found: 'error'

- name: Upload openvino wheels
- name: Upload OpenVINO wheels
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_wheels
path: ${{ env.INSTALL_WHEELS_DIR }}/wheels/*.whl
if-no-files-found: 'error'

- name: Upload openvino tests package
- name: Upload OpenVINO tests package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_tests
path: ${{ env.BUILD_DIR }}/openvino_tests.tar.gz
if-no-files-found: 'error'

- name: Upload openvino developer package
- name: Upload OpenVINO developer package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_developer_package
path: ${{ env.BUILD_DIR }}/openvino_developer_package.tar.gz
if-no-files-found: 'error'

- name: Upload openvino js package
- name: Upload OpenVINO js package
if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/mac_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,30 +253,30 @@ jobs:
# Upload build artifacts
#

- name: Upload openvino package
- name: Upload OpenVINO package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_package
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
if-no-files-found: 'error'

- name: Upload openvino wheels
- name: Upload OpenVINO wheels
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_wheels
path: ${{ env.INSTALL_WHEELS_DIR }}/wheels/*.whl
if-no-files-found: 'error'

- name: Upload openvino tests package
- name: Upload OpenVINO tests package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_tests
path: ${{ env.BUILD_DIR }}/openvino_tests.tar.gz
if-no-files-found: 'error'

- name: Upload openvino js package
- name: Upload OpenVINO js package
if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manylinux_2014.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,23 +209,23 @@ jobs:
#
# Upload build artifacts
#
- name: Upload openvino package
- name: Upload OpenVINO package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_package
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
if-no-files-found: 'error'

- name: Upload openvino wheels
- name: Upload OpenVINO wheels
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: openvino_wheels
path: ${{ env.INSTALL_WHEELS_DIR }}/wheels/*.whl
if-no-files-found: 'error'

- name: Upload openvino tests package
- name: Upload OpenVINO tests package
if: ${{ always() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
Expand Down
Loading

0 comments on commit 097892a

Please sign in to comment.