mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-02 09:46:43 +08:00
- Fixed `NCollection_KDTree::KNearestPoints` to properly handle empty tree/K=0 cases by initializing output arrays to empty instead of calling Resize with invalid bounds - Enhanced Linux vcpkg cache download action to include debug library paths for better debug build support
100 lines
4.1 KiB
YAML
100 lines
4.1 KiB
YAML
name: 'Download vcpkg Cache'
|
|
description: 'Download and restore vcpkg installed packages and cache'
|
|
|
|
inputs:
|
|
artifact-name:
|
|
description: 'Name of the artifact containing vcpkg cache'
|
|
required: true
|
|
build-directory:
|
|
description: 'Build directory where vcpkg_installed should be restored'
|
|
required: false
|
|
default: 'build'
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
|
|
- name: Download vcpkg tar archive
|
|
uses: actions/download-artifact@v4.3.0
|
|
with:
|
|
name: ${{ inputs.artifact-name }}
|
|
path: ${{ inputs.build-directory }}
|
|
|
|
- name: Extract vcpkg dependencies
|
|
run: |
|
|
cd ${{ inputs.build-directory }}
|
|
tar -xzf vcpkg-dependencies.tar.gz
|
|
rm vcpkg-dependencies.tar.gz
|
|
shell: bash
|
|
|
|
- name: Copy manual-link libraries and set paths for Windows
|
|
if: runner.os == 'Windows'
|
|
run: |
|
|
$vcpkg_bin = "${{ inputs.build-directory }}/vcpkg_installed/x64-windows/bin"
|
|
$vcpkg_lib = "${{ inputs.build-directory }}/vcpkg_installed/x64-windows/lib"
|
|
$vcpkg_manual = "${{ inputs.build-directory }}/vcpkg_installed/x64-windows/lib/manual-link"
|
|
|
|
# Copy manual-link DLLs to bin directory for runtime access
|
|
if (Test-Path $vcpkg_manual) {
|
|
Write-Host "Copying manual-link libraries to bin directory"
|
|
Copy-Item "$vcpkg_manual\*" "$vcpkg_bin\" -Force -ErrorAction SilentlyContinue
|
|
}
|
|
|
|
# Set library search paths
|
|
$current_path = $env:PATH
|
|
echo "PATH=$vcpkg_bin;$vcpkg_lib;$vcpkg_manual;$current_path" >> $env:GITHUB_ENV
|
|
shell: pwsh
|
|
|
|
- name: Copy manual-link libraries and set paths for Linux
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
vcpkg_lib="${{ inputs.build-directory }}/vcpkg_installed/x64-linux-dynamic/lib"
|
|
vcpkg_manual="${{ inputs.build-directory }}/vcpkg_installed/x64-linux-dynamic/lib/manual-link"
|
|
vcpkg_debug_lib="${{ inputs.build-directory }}/vcpkg_installed/x64-linux-dynamic/debug/lib"
|
|
vcpkg_debug_manual="${{ inputs.build-directory }}/vcpkg_installed/x64-linux-dynamic/debug/lib/manual-link"
|
|
|
|
# Copy manual-link libraries to main lib directory for runtime access
|
|
if [ -d "$vcpkg_manual" ]; then
|
|
echo "Copying manual-link libraries to main lib directory"
|
|
cp -f "$vcpkg_manual"/* "$vcpkg_lib/" 2>/dev/null || true
|
|
fi
|
|
|
|
# Copy debug manual-link libraries to debug lib directory for runtime access
|
|
if [ -d "$vcpkg_debug_manual" ]; then
|
|
echo "Copying debug manual-link libraries to debug lib directory"
|
|
cp -f "$vcpkg_debug_manual"/* "$vcpkg_debug_lib/" 2>/dev/null || true
|
|
fi
|
|
|
|
# Set library search paths (include debug paths if they exist).
|
|
LIB_PATHS="$vcpkg_lib:$vcpkg_manual"
|
|
if [ -d "$vcpkg_debug_lib" ]; then
|
|
LIB_PATHS="$vcpkg_debug_lib:$LIB_PATHS"
|
|
fi
|
|
if [ -d "$vcpkg_debug_manual" ]; then
|
|
LIB_PATHS="$vcpkg_debug_manual:$LIB_PATHS"
|
|
fi
|
|
echo "LD_LIBRARY_PATH=$LIB_PATHS:$LD_LIBRARY_PATH" >> $GITHUB_ENV
|
|
shell: bash
|
|
|
|
- name: Copy manual-link libraries and set paths for macOS
|
|
if: runner.os == 'macOS'
|
|
run: |
|
|
vcpkg_lib="${{ inputs.build-directory }}/vcpkg_installed/arm64-osx-dynamic/lib"
|
|
vcpkg_manual="${{ inputs.build-directory }}/vcpkg_installed/arm64-osx-dynamic/lib/manual-link"
|
|
vcpkg_debug_lib="${{ inputs.build-directory }}/vcpkg_installed/arm64-osx-dynamic/debug/lib"
|
|
|
|
# Copy manual-link libraries to main lib directory for runtime access
|
|
if [ -d "$vcpkg_manual" ]; then
|
|
echo "Copying manual-link libraries to main lib directory"
|
|
cp -f "$vcpkg_manual"/* "$vcpkg_lib/" 2>/dev/null || true
|
|
fi
|
|
|
|
# Set library search paths (include debug paths if they exist)
|
|
LIB_PATHS="$vcpkg_lib:$vcpkg_manual"
|
|
if [ -d "$vcpkg_debug_lib" ]; then
|
|
LIB_PATHS="$vcpkg_debug_lib:$LIB_PATHS"
|
|
fi
|
|
echo "DYLD_FALLBACK_LIBRARY_PATH=$LIB_PATHS:$DYLD_FALLBACK_LIBRARY_PATH" >> $GITHUB_ENV
|
|
echo "DYLD_LIBRARY_PATH=$LIB_PATHS:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
|
|
shell: bash
|