From db4b33c862338a39e2ea28c5013b1974e64a8efb Mon Sep 17 00:00:00 2001 From: Andrei Kashchikhin Date: Wed, 31 Jan 2024 19:25:35 +0000 Subject: [PATCH] [CI] [GHA] Download `ninja` from GitHub instead of installing through `choco` in Windows workflows (#22570) * download ninja from github * add ninja to path * add note * add retries --- .github/workflows/windows.yml | 6 +++++- .github/workflows/windows_conditional_compilation.yml | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 04682416355d3f..caf1d2ee7edcce 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -128,7 +128,11 @@ jobs: version: "v0.7.5" - name: Install build dependencies - run: choco install --no-progress ninja + run: | + Invoke-WebRequest https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip -OutFile ninja-win.zip -MaximumRetryCount 10 + Expand-Archive -Force ninja-win.zip + # Add it to the GitHub Path so it would be available in the subsequent steps + Add-Content -Path $env:GITHUB_PATH -Value "${{ github.workspace }}/ninja-win" # # Build diff --git a/.github/workflows/windows_conditional_compilation.yml b/.github/workflows/windows_conditional_compilation.yml index a97c27c1faf456..6a47f620e73b30 100644 --- a/.github/workflows/windows_conditional_compilation.yml +++ b/.github/workflows/windows_conditional_compilation.yml @@ -106,10 +106,14 @@ jobs: - name: Install sccache uses: mozilla-actions/sccache-action@v0.0.4 with: - version: "v0.5.4" + version: "v0.7.5" - name: Install build dependencies - run: choco install --no-progress ninja + run: | + Invoke-WebRequest https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip -OutFile ninja-win.zip -MaximumRetryCount 10 + Expand-Archive -Force ninja-win.zip + # Add it to the GitHub Path so it would be available in the subsequent steps + Add-Content -Path $env:GITHUB_PATH -Value "${{ github.workspace }}/ninja-win" - name: Install python dependencies run: |