diff --git a/.github/workflows/build-loader.yml b/.github/workflows/build-loader.yml index 9bb5293..f1f4cc9 100644 --- a/.github/workflows/build-loader.yml +++ b/.github/workflows/build-loader.yml @@ -16,10 +16,12 @@ jobs: timeout-minutes: 180 env: - VCPKG_ROOT: ${{ github.workspace }}\vcpkg - # Push to / pull from the GitHub Actions binary cache so a fresh - # checkout reuses already-built Qt instead of rebuilding from - # source on every push. + # NOTE: do not declare VCPKG_ROOT here. The windows-2022 runner + # ships VS Enterprise which pre-sets a system-wide VCPKG_ROOT + # pointing at its own (empty) vcpkg dir, and that pre-set value + # wins over a job-level env in PowerShell expansions. We export + # the right VCPKG_ROOT into $GITHUB_ENV inside the clone step + # so every later step sees our copy. VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" steps: @@ -61,10 +63,16 @@ jobs: - name: Clone & bootstrap vcpkg shell: pwsh run: | - git clone --depth=1 https://github.com/microsoft/vcpkg.git "$env:VCPKG_ROOT" - & "$env:VCPKG_ROOT\bootstrap-vcpkg.bat" -disableMetrics - Write-Host "vcpkg at $env:VCPKG_ROOT" - & "$env:VCPKG_ROOT\vcpkg.exe" version + $vcpkg = Join-Path $env:GITHUB_WORKSPACE 'vcpkg' + if (Test-Path $vcpkg) { + Write-Host "Reusing existing $vcpkg" + } else { + git clone --depth=1 https://github.com/microsoft/vcpkg.git $vcpkg + } + & "$vcpkg\bootstrap-vcpkg.bat" -disableMetrics + & "$vcpkg\vcpkg.exe" version + "VCPKG_ROOT=$vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + Write-Host "Exported VCPKG_ROOT=$vcpkg to GITHUB_ENV" - name: Install UPX shell: pwsh @@ -85,6 +93,9 @@ jobs: env: OPENZEN_BUILD_REVISION: ${{ steps.rev.outputs.sha }} run: | + Write-Host "VCPKG_ROOT = $env:VCPKG_ROOT" + Write-Host "JAVA_HOME = $env:JAVA_HOME" + Write-Host "OPENZEN_BUILD_REV = $env:OPENZEN_BUILD_REVISION" .\gradlew.bat --no-daemon clean dll upxCompress - name: Show artifact info