feat(ci): enhance release workflow with pkg-config path setup and system binaries
- Added a step to the Windows release workflow to include pkg-config in the PATH if it exists, improving build environment setup. - Introduced the VCPKG_FORCE_SYSTEM_BINARIES environment variable to ensure system binaries are prioritized during builds. Benefits: - Streamlines the CI process by ensuring necessary tools are available, reducing potential build issues related to missing dependencies. - Enhances compatibility with system-installed libraries, facilitating smoother integration and build performance.
This commit is contained in:
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@@ -23,6 +23,7 @@ env:
|
|||||||
BUILD_TYPE: Release
|
BUILD_TYPE: Release
|
||||||
# CI optimizations
|
# CI optimizations
|
||||||
CMAKE_BUILD_PARALLEL_LEVEL: 4 # Limit parallel jobs to avoid OOM
|
CMAKE_BUILD_PARALLEL_LEVEL: 4 # Limit parallel jobs to avoid OOM
|
||||||
|
VCPKG_FORCE_SYSTEM_BINARIES: 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# ======================================================================================
|
# ======================================================================================
|
||||||
@@ -326,6 +327,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
arch: x64
|
arch: x64
|
||||||
|
|
||||||
|
- name: "Add pkg-config to PATH (Windows)"
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$pkgPath = 'C:\msys64\usr\bin'
|
||||||
|
if (Test-Path $pkgPath) {
|
||||||
|
$pkgPath | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
|
Write-Host "Added $pkgPath to PATH"
|
||||||
|
} else {
|
||||||
|
Write-Host "::warning::pkg-config not found at $pkgPath"
|
||||||
|
}
|
||||||
|
|
||||||
- name: "Free Disk Space (Linux)"
|
- name: "Free Disk Space (Linux)"
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
Reference in New Issue
Block a user