Kokoro: adds the Ninja from DEPS to the PATH on Windows

Change-Id: I8667b7e74db2bee7bf7a6751e7e76e33bdf2d03c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117891
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Corentin Wallez 2023-02-02 19:20:47 +00:00 committed by Dawn LUCI CQ
parent 0761764256
commit 78b14285bc
1 changed files with 7 additions and 13 deletions

View File

@ -44,8 +44,8 @@ exit /b 0
set ORIGINAL_SRC_DIR= %~dp0\..\..\..
set TEMP_DIR=%TEMP%\dawn-temp
set SRC_DIR="%TEMP_DIR%\dawn-src"
set BUILD_DIR="%TEMP_DIR%\dawn-build"
set SRC_DIR=%TEMP_DIR%\dawn-src
set BUILD_DIR=%TEMP_DIR%\dawn-build
cd /d %ORIGINAL_SRC_DIR%
if not exist ".git\" (
@ -92,17 +92,6 @@ call gclient || goto :error
@echo off
popd
@REM Install Ninja after depot_tools to make sure it's in PATH before depot_tools
call :status "Fetching and installing Ninja"
@echo on
@REM set WINSDK_DLL_INSTALLER=https://go.microsoft.com/fwlink/?linkid=2164145
@REM set WINSDK_VERSION=10.0.20348.0
set NINJA_ZIP=https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip
curl -k -L %NINJA_ZIP% --output "%TEMP_DIR%\ninja.zip" || goto :error
powershell.exe -Command "Expand-Archive -LiteralPath '%TEMP_DIR%\ninja.zip' -DestinationPath '%TEMP_DIR%\ninja'" || goto :error
set PATH=%TEMP_DIR%\ninja;%PATH%
@echo off
call :status "Cloning to clean source directory"
@echo on
mkdir %SRC_DIR% || goto :error
@ -116,6 +105,11 @@ copy scripts\standalone.gclient .gclient || goto :error
call gclient sync || goto :error
@echo off
call :status "Adding the Ninja from DEPS to the PATH"
@echo on
set PATH=%SRC_DIR%\third_party\ninja;%PATH%
@echo off
call :status "Configuring build system"
@echo on
mkdir %BUILD_DIR%