Enhance GitHub Actions workflow by adding vcpkg download cache preparation for Windows and macOS
- Introduced steps to prepare a download cache for vcpkg on both Windows and macOS, improving build efficiency and reducing download times. - Ensured that the cache directories are created conditionally based on the operating system, maintaining compatibility across platforms.
This commit is contained in:
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
@@ -184,6 +184,13 @@ jobs:
|
|||||||
brew install pkg-config ninja cmake
|
brew install pkg-config ninja cmake
|
||||||
|
|
||||||
# ---------- vcpkg (Windows & macOS) ----------
|
# ---------- vcpkg (Windows & macOS) ----------
|
||||||
|
- name: Prepare vcpkg download cache (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$dl = Join-Path $env:GITHUB_WORKSPACE 'vcpkg_downloads'
|
||||||
|
New-Item -ItemType Directory -Force -Path $dl | Out-Null
|
||||||
|
|
||||||
- name: Set up vcpkg (Windows)
|
- name: Set up vcpkg (Windows)
|
||||||
id: vcpkg_win
|
id: vcpkg_win
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
@@ -216,6 +223,10 @@ jobs:
|
|||||||
echo "VCPKG_AVAILABLE=false" >> $env:GITHUB_ENV
|
echo "VCPKG_AVAILABLE=false" >> $env:GITHUB_ENV
|
||||||
echo "YAZE_MINIMAL_BUILD=ON" >> $env:GITHUB_ENV
|
echo "YAZE_MINIMAL_BUILD=ON" >> $env:GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Prepare vcpkg download cache (macOS)
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: mkdir -p "${{ github.workspace }}/vcpkg_downloads"
|
||||||
|
|
||||||
- name: Set up vcpkg (macOS)
|
- name: Set up vcpkg (macOS)
|
||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
uses: lukka/run-vcpkg@v11
|
uses: lukka/run-vcpkg@v11
|
||||||
|
|||||||
Reference in New Issue
Block a user