diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5054d7d..c030051d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,21 +71,7 @@ jobs: - name: Install Ninja (Windows) if: runner.os == 'Windows' - shell: pwsh - run: | - $ninjaDir = Join-Path $env:RUNNER_TEMP "ninja" - New-Item -ItemType Directory -Force -Path $ninjaDir | Out-Null - Invoke-WebRequest -Uri "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip" -OutFile "$ninjaDir\ninja.zip" - Expand-Archive "$ninjaDir\ninja.zip" -DestinationPath $ninjaDir -Force - $ninjaExe = Join-Path $ninjaDir "ninja.exe" - if (-not (Test-Path $ninjaExe)) { - Write-Host "::error::ninja.exe not found after extraction" - exit 1 - } - Write-Host "Ninja installed at $ninjaExe" - "$ninjaDir" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - $env:PATH = "$ninjaDir;$env:PATH" - & $ninjaExe --version + run: choco install ninja --no-progress -y - name: Set up vcpkg (Windows) if: runner.os == 'Windows' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9a418c89..a1e01259 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -145,21 +145,7 @@ jobs: - name: "Install Ninja (Windows only)" if: runner.os == 'Windows' - shell: pwsh - run: | - $ninjaDir = Join-Path $env:RUNNER_TEMP "ninja" - New-Item -ItemType Directory -Force -Path $ninjaDir | Out-Null - Invoke-WebRequest -Uri "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip" -OutFile "$ninjaDir\ninja.zip" - Expand-Archive "$ninjaDir\ninja.zip" -DestinationPath $ninjaDir -Force - $ninjaExe = Join-Path $ninjaDir "ninja.exe" - if (-not (Test-Path $ninjaExe)) { - Write-Host "::error::ninja.exe not found after extraction" - exit 1 - } - Write-Host "Ninja installed at $ninjaExe" - "$ninjaDir" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - $env:PATH = "$ninjaDir;$env:PATH" - & $ninjaExe --version + run: choco install ninja --no-progress -y - name: "Set up vcpkg (Windows only)" if: runner.os == 'Windows'